-
1. Get click on h:selectOneListbox in BackingBean
ilya_shaikovsky Jan 18, 2011 4:20 AM (in response to pschuett)From the beginning I'm not sure such construction has sence...
<h:selectOneListbox id="waitingTaskInfos" value="#{userProcessingBean.selectedWaitingTaskId}"
style="height:15em;min-width:15em">
<a4j:support event="onclick" render="waitingTaskInfos, otherControl"/>
</h:selectOneListbox>
and
<h:selectOneListbox id="waitingTaskInfos" value="#{userProcessingBean.selectedWaitingTaskId}"
style="height:15em;min-width:15em">
<a4j:ajax event="click" render="waitingTaskInfos, otherControl"/>
</h:selectOneListbox>
this code already means that new values will be populated to selectedWaitingTaskId.. so see no reason to use additional setting using parameter.
If you had any problems and just workarounded them in that way - it's better to make one step backward and solve original problems instead of using additional parameters.
-
2. Get click on h:selectOneListbox in BackingBean
pschuett Jan 18, 2011 11:23 AM (in response to ilya_shaikovsky)Hallo,
thanks for your hint. It was easier than I thought.
<h:selectOneListbox id="waitingTaskInfos" value="#{userProcessingBean.selectedWaitingTaskId}"
style="height:15em;min-width:15em">
<a4j:ajax event="click" render="waitingTaskInfos,otherControl">
</a4j:ajax>
<f:selectItems value="#{userProcessingBean.waitingTaskItems}" />
</h:selectOneListbox>
This works.
Ciao
Peter Schütt