-
1. Re: Loading Dropdown List data On Click
mail.micke Jul 24, 2008 2:28 PM (in response to rmuruga)Have a look at the a4j:support tag (top left side on this page is a link to the developer docs which contains some more information).
This tag will allow you to initiate an ajax call on the onclick javascript event.
- micke
-
2. Re: Loading Dropdown List data On Click
rmuruga Jul 24, 2008 2:47 PM (in response to rmuruga)Hi Micke,
Thanks for Replying to my post ,but the a4j:support will re-render the given UI id , what i need is i need to display a drop-down list and while clicking it the data for the list should be loaded .Thanks
Muruga -
3. Re: Loading Dropdown List data On Click
mail.micke Jul 24, 2008 3:09 PM (in response to rmuruga)Aha, I see.
I haven't tried this one myself but the rich:suggestionbox might be what you are looking for.
- micke
-
4. Re: Loading Dropdown List data On Click
damianharvey.damianharvey.gmail.com Jul 24, 2008 4:53 PM (in response to rmuruga)So are you trying to late-load your drop-down after the page has rendered?
You can still accomplish this with a4j:support by doing something like this:
<h:selectOneMenu id="myfield" value="#{myBean.myField}"> <s:selectItems value="#{myBean.myFieldList}" var="field" label="#{field.name}" noSelectionLabel="click to load list" /> <s:convertEntity/> <a:support event="onfocus" ajaxSingle="true" reRender="myfield" action="#{myBean.loadMyFieldList}"/> <a:support event="onchange" ajaxSingle="true" reRender="anotherField"/> </h:selectOneMenu>
The only problem is the stutter when the list is reRendered, but it's not a bad option if you have a list that you'd rather not have on page load due to it's size.
Cheers,
Damian
-
5. Re: Loading Dropdown List data On Click
rmuruga Jul 25, 2008 9:02 AM (in response to rmuruga)Can you post any sample for Suggestion box, i have checked the link what you have given , not idea how the autoComplete method should be .Please suggest me how to do that.
-
6. Re: Loading Dropdown List data On Click
mail.micke Jul 25, 2008 9:11 AM (in response to rmuruga)Bookmark this page RichFaces live demo.
It contains demo, code snippets and links to the developer guide for all of the richfaces components. The source code for this is also in the SVN for you to download.
Here on the jboss richfaces
home
page you can find links to the forum and SVN.Other than this I can't offer much more help since I haven't used the component myself yet.
- micke