求救!!!!
JSP页面代码
<s:iterator value="#request.types" id="type" status="loop">
<s:if test="#type.childtypes.size > 0">
<a href="/control/product/selectUI.action/>"><b><s:property value="#type.name"/></a>
</s:if>
</s:iterator>
上面的if语句访问不了#type.childtypes.size
type的其他属性都可以访问
type是List<ProductType>类型
放入request中的bean
public class ProductType implements Serializable{
private static final long serialVersionUID = -1582077397901095995L;
/** 类别id **/
private Integer typeid;
/** 子类别 **/
private Set<ProductType> childtypes = new HashSet<ProductType>();
getter and setter
}
Action中
request.put("types", types);
JSP页面代码
<s:iterator value="#request.types" id="type" status="loop">
<s:if test="#type.childtypes.size > 0">
<a href="/control/product/selectUI.action/>"><b><s:property value="#type.name"/></a>
</s:if>
</s:iterator>
上面的if语句访问不了#type.childtypes.size
type的其他属性都可以访问
type是List<ProductType>类型
放入request中的bean
public class ProductType implements Serializable{
private static final long serialVersionUID = -1582077397901095995L;
/** 类别id **/
private Integer typeid;
/** 子类别 **/
private Set<ProductType> childtypes = new HashSet<ProductType>();
getter and setter
}
Action中
request.put("types", types);