2012-09-09 23 views
2
<h:commandLink value="next" action="#{student.getNext()}" rendered="#{! (student.maximumSize<=student.idvalue.size)}" ></h:commandLink> 

但我在student.maximumSize <得到錯誤= student.idvalue.size如何檢查是否在JSF標籤條件

< =我能代替這裏..?

+0

獲取* what *錯誤? – EJP

+0

在該行找到多個註解: \t - 語法錯誤在EL \t - 屬性的「再現」的值與元素類型「H:commandLink」相關聯不能包含在「<」 \t字符。 \t - EL語法錯誤:期待表達。 – ashokhein

回答

9

最好是去掉!和使用gt

<h:commandLink rendered="#{student.maximumSize gt student.idvalue.size}" value="next" action="#{student.getNext()}"></h:commandLink> 

或嘗試應該被用來代替像==<>等跡象這

<h:commandLink rendered="#{not (student.maximumSize le student.idvalue.size)}" value="next" action="#{student.getNext()}"></h:commandLink> 

這裏的EL表達式...

== --> eq 
!= --> ne 
< --> lt 
> --> gt 
<= --> le 
>= --> ge 
1

您需要將'< ='更改爲'le',或使用& lt;語法爲<。