aspose file tools
The moose likes JSF and the fly likes a4j:support - Can I have multiple actions for the same event? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "a4j:support - Can I have multiple actions for the same event?" Watch "a4j:support - Can I have multiple actions for the same event?" New topic
Author

a4j:support - Can I have multiple actions for the same event?

michelle wu
Greenhorn

Joined: Nov 06, 2007
Posts: 5
Hi guys,

Is it possible to add two actions to a <h:selectOneMenu> on the event of "onchange". Are following ways eligible to use?

<a:support id="aaa" event="onchange" action='#{methodA(a); methodB}' ajaxSingle='false'/>

or

<a:support id="aaa" event="onchange" action='#{methodA(a)}' ajaxSingle='false'/>
<a:support id="aaa" event="onchange" action='#{methodB}' ajaxSingle='false'/>

Thanks.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14568
    
    7

The first one is not proper JSF action invocation and if it works at all, it would only be because EL made it work, not JSF.

The second one will probably work. Try it. If it doesn't then you either are going to need to code an additional action method somewhere that calls the 2 methods or you'd have to use a set of ActionListeners. But let's hope you don't need listeners, since they would require recoding your backing-bean methods.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: a4j:support - Can I have multiple actions for the same event?
 
Similar Threads
Ajax status doesn't stop in IE8
Displaying user feedback with a4j:?
rich model panel datatable problem
Losing Tab Index Order After Ajax Request
Any idea what could cause new <br> tags to get added to the rendered code?