我們有以下豐富:ComponentControl:問題,從豐富的傳遞布爾值:ComponentControl以呈現豐富:的菜單項
<rich:componentControl event="onRowClick" for="ctxMenu" operation="show">
<f:param value="#{item.hasDocuments}" name="hasDocuments" />
</rich:componentControl>
的#{} item.hasDocuments值被成功地從bean作爲傳遞無論是真或假。
下面是這是應該有條件地顯示該項目的文本菜單:
<rich:contextMenu id="ctxMenu" submitMode="ajax" attached="false">
<rich:menuItem ajaxSingle="true" value="View Documents oncomplete="#{rich:component('documentsMenu')}.doShow(event, {})" reRender="documentsMenu" rendered="#{hasDocuments}">
<a4j:actionparam name="selectedApplicationId" value="#{applicationId}" assignTo="#{activeAppsForm.applicationId}" />
</rich:menuItem>
</rich:contextMenu>
的問題是,它總是隱藏鏈接,即使{} hasDocuments是真實的。 我的猜測是{hasDocuments}的值被視爲字符串而不是布爾值,因此呈現將始終爲假。
有關如何解決此問題的任何想法?
你應該更新你的問題解決了EL語法錯誤,避免紅鯡魚。 – BalusC 2010-09-17 17:30:09
更新了問題。任何其他想法如何解決這個問題? – droidy 2010-09-17 17:32:34