下面的 Java 条件如何转换s:if test="..."
为struts2?
if(company.getAffiliateId().asInt() != com.foo.bar.Affiliates.XYZ.asInt()){
// do something
}
company.getAffiliateId()返回BigDecimal
com.foo.bar.Affiliates是enum
这不起作用:
<s:if test="%{company.affiliateId.asInt() != com.foo.bar.Affiliates.XYZ.asInt() }">
alert("do something");
</s:if>