views:

243

answers:

1

I have a rich:componentControl which sets a parameter called applicationId and displays a rich:contextMenu:

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

and here's the rich:contextMenu:

<rich:contextMenu id="ctxMenu" submitMode="ajax">           
<rich:menuItem ajaxSingle="true" value="View Resume" action="#{activeAppsForm.viewResume}" rendered="#{activeAppsForm.hasResume}" >
<a4j:actionparam name="selectedApplicationId" value="{applicationId}" assignTo="#{activeAppsForm.applicationId}"/>
</rich:menuItem>
</rich:contentMenu>

My problem is with the rendered attribute. The backing bean property it's calling needs access to applicationId before being able to correctly get the rendered value. How can I assign the applicationId value to #{activeAppsForm.applicationId} when the menu is rendered?

Thanks.

A: 

hi use this

enter code here <f:setPropertyActionListener target="#{MyBean.myProperty}" value="#{value to be set}"/>
taher
Should that go inside of the rich:componentControl?
droidy
Tried putting inside of the rich:componentControl and got this error:<f:setPropertyActionListener> Parent is not of type ActionSource, type is: org.richfaces.component.html.HtmlComponentControl@19b6c59
droidy
you have specified rowclick event so you can set value in one of the column in rich datatable.
taher