我有以下xhtml:
<s:fragment
rendered="#{selectCat.categoryTypes.contains('unclickable')}">
<h:outputText value="DONT CLICK #{selectCat.webName}" />
</s:fragment>
<s:fragment rendered="#{selectCat.categoryTypes eq null}">
<a href="/category/#{_category.fullName}"> #{selectCat.webName}</a>
</s:fragment>
我正在尝试阅读该类型是否不可点击..
后端 bean 读取:
@ManyToMany(fetch = FetchType.LAZY, targetEntity = C_Type.class)
@JoinTable(name = "Category_Type", joinColumns = @JoinColumn(name = "CategoryId"), inverseJoinColumns = @JoinColumn(name = "TypeId"))
@XmlTransient
public Set<C_Type> getCategoryTypes() {
for (C_Type cc : categoryTypes) {
System.out.println("=============="+cc.getC_type()+"==============");
}
return categoryTypes;
}
我做错了什么,或者我需要做什么才能将链接显示为不可点击?在前端?谢谢