-
1. Re: Action method call on dropdown value change
iabughosh Oct 10, 2011 8:35 AM (in response to pradeep_nayak)it can be done with a4j:jsFunction :
<h:selectOneMenu id="select"
value="#{optionTree.value}">
<f:selectItem itemLabel="1" itemValue="1"/>
<f:selectItem itemLabel="2" itemValue="2"/>
<a4j:ajax event="change" execute="@this" oncomplete="navigate()"/>
</h:selectOneMenu>
<a4j:jsFunction name="navigate" action="yourNavigation rule"/>
-
2. Re: Action method call on dropdown value change
pradeep_nayak Oct 12, 2011 3:29 AM (in response to iabughosh)Thanks a lot Ibrahim.
It worked for me. but i have another problem. I have used your solution in a page. Same page has a4j:poll. When the poll is happening if I select the drop down its not calling the action method configured in a4j:jsfunction. But when the poll stops or poll is disabled it works. Does a4j:poll block other a4j requests. ( They are in diffferent forms). Do I have to use @execute in poll ? or Do ihave to use a4j:region ?
-
3. Re: Action method call on dropdown value change
iabughosh Oct 12, 2011 5:21 AM (in response to pradeep_nayak)honestly i didn't try this, could you please check @execute, a4j:region and reply back.
-
4. Re: Action method call on dropdown value change
pradeep_nayak Oct 21, 2011 3:36 AM (in response to iabughosh)I tried execute=''@none" it worked.
But there was a side effect. I had a pie chart displayed on page using a javascript on window load. That stopped displaying