Forums Register Login

A4j:Support Problem

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Try onchange, instead.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Hi
It is very easy yaar
put <a4j:support event="onchange" reRender="ID"/>
+Pie Number of slices to send: Send
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"/>
+Pie Number of slices to send: Send
 

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.
I love a woman who dresses in stainless steel ... and carries tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2516 times.
Similar Threads
help in sql
AJAX Frameworks that integrate with Struts
Struts1.3 with ajax : i want dynamic select box country and state and city
Updating data from jsp pages into an xml file
Is there any way to access a java class method from within my javascript
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:01:31.