wood burning stoves 2.0*
The moose likes JSF and the fly likes How to add support for oncomplete event to rich:comboBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to add support for oncomplete event to rich:comboBox" Watch "How to add support for oncomplete event to rich:comboBox" New topic
Author

How to add support for oncomplete event to rich:comboBox

Saurabh Kulkarni
Greenhorn

Joined: Mar 11, 2013
Posts: 8

I need to write a comboBox which calls a backing bean method on change event & after processing this method, I need to show a popup. Complexity lies where I need to show popup oncomplete event of the valueChangeListener. But oncomplete event is not supported by rich:comboBox. I tried to write code as:



But as comboBox don't support oncomplete event, its not possible. Can anyone help me to find out what can be done in this case? Or Is there any workaround to add support for oncomplete event to comboBox?

Thanks & Regards,
Saurabh Kulkarni
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

"oncomplete" is a javascript event method that is fired after a SUBMIT is complete. The rich:comboBox control does not have AJAX capabilities, and therefore does not SUBMIT. Hence, there is no oncomplete option. If you want oncomplete, code it on the a4j:support elements, since they do AJAX SUBMITs.

The valueChangeListener is not fired when a the user changes a control's value. It is invoked as part of the SUBMIT process when a form is submitted (via commandLink, commandButton or AJAX) AND a change in the value was seen in the submitted form. A valueChangeListener should NEVER set the input value (it will be overridden by JSF's internal set methods), and it is a poor place to do validation as well. The primary thing I use it for is to trigger a cascade of side-effects, such as the famous country/state/city series of selection lists, where changing the country changes the list of selectable states and changing the state changes the list of selectable cities.


Customer surveys are for companies who didn't pay proper attention to begin with.
Saurabh Kulkarni
Greenhorn

Joined: Mar 11, 2013
Posts: 8

oncomplete event is not available with combobox & hence following needs to be done:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add support for oncomplete event to rich:comboBox
 
Similar Threads
[JSF 1.1] Asynchronous JSF Update
Dynamically deciding either to show or hide modalPanel
rich modelpanel problem in IE7
rich:comboBox valueChangeListener is not working
rich:comboBox fails to reRender due to rich:ajaxValidator