aspose file tools*
The moose likes JSF and the fly likes A4j:Support Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "A4j:Support Problem" Watch "A4j:Support Problem" New topic
Author

A4j:Support Problem

Arvind Purohit
Ranch Hand

Joined: Jun 18, 2010
Posts: 43
Hi All
I have Form In which User is entering his address details
Country State City Area PIN
this all fields are drop down list ( h:selectOneMenu )
When i select county it populates State and on selection of State It populates City so on
I am using a4j:support to call function.
My problem is user should be able to select State or city or pin by using keybord or by mouse
ie two event ( onkeyup and select ) shoud work
How to do it ???

THANKS YOU
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

Try onchange, instead.


Customer surveys are for companies who didn't pay proper attention to begin with.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

To be more precise, set up an a4j for onchange, create a changeListener for the selectOneMenuItem and prep the SelectItem list in the changeListener method.

I normally just null the cached SelectItem list in the changeListener and populate it in the get SelectItemList method when the cached copy of the list is found to be null.
sreekanth aleddulla
Greenhorn

Joined: Feb 08, 2011
Posts: 27

Hi
It is very easy yaar
put <a4j:support event="onchange" reRender="ID"/>
naveen gupta
Ranch Hand

Joined: Apr 12, 2006
Posts: 129
Just curious, can we use multiple tags instead of one to support both keyboard and mouse functionality using below code

<a4j:support event="onchange" reRender="ID"/>
<a4j:support event="onkeyup" reRender="ID"/>
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

naveen gupta wrote:Just curious, can we use multiple tags instead of one to support both keyboard and mouse functionality using below code

<a4j:support event="onchange" reRender="ID"/>
<a4j:support event="onkeyup" reRender="ID"/>


Yes, you can.
 
jQuery in Action, 2nd edition
 
subject: A4j:Support Problem