views:

67

answers:

0

We have the following rich:ComponentControl:

<rich:componentControl event="onRowClick" for="ctxMenu" operation="show">
<f:param value="#{item.hasDocuments}" name="hasDocuments" />
</rich:componentControl>

The value of #{item.hasDocuments} is being successfully passed from the bean as either true or false.

Here's the contextMenu which is supposed to conditionally show the item:

<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>

The problem is that it's always hiding the link, even when {hasDocuments} is true. My guess is that the value for {hasDocuments} is being treated as string instead of boolean, and therefore rendered will always be false.

Any ideas on how to remedy this problem?