aspose file tools*
The moose likes JSF and the fly likes Dynamic values for JSF selectOneMenu using javascrpt. JSF validation error. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamic values for JSF selectOneMenu using javascrpt. JSF validation error. " Watch "Dynamic values for JSF selectOneMenu using javascrpt. JSF validation error. " New topic
Author

Dynamic values for JSF selectOneMenu using javascrpt. JSF validation error.

Swaminathan Natarajan
Greenhorn

Joined: Aug 04, 2009
Posts: 10
Hi,
Im using Myfaces 1.2 (tomahawk) . I have a very bulky page having lot of drop down menus. It has a datatable containing four drop downs in a row and the datatable has close to 40 rows (with pagination) . Each of the drop downs have close to 100 items . This makes the page size very huge and not suitable for an internet application.

Im thinking of a way to have the drop downs populated using javascript in body onload event so that the page size reduces drastically. I have defined a selectOneMenu without selectItems. So before page load there will be no items in the drop down. The body onLoad method populates the drop downs and the page gets rendered as expected. All the javascript events related to these drop downs works fine. When page is submitted i want the selected value in the bean variable.


But when the page gets submitted im getting the error

Validation Error: Value is not valid

Can someone let me know the reason behind this and a way to solve this problem . Its really URGENT...
Please help....

Thanks,
Swami.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

You would probably be better off using an AJAX-friendly tag library like RichFaces instead of trying tedious brute force with Tomahawk. RichFaces prefers to extend basic JSF tag capabilities where possible, so the work of converting is often very small.

Note that if you really feel the need to load that much data via JavaScript/AJAX before the page is usable, the process of loading the page via onLoad-requested operations is going to be even slower than loading the whole page and its data via a single page request.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic values for JSF selectOneMenu using javascrpt. JSF validation error.
 
Similar Threads
selectmanyListBox - scroll position
selectOneMenu update from backing bean
Wierd DataTable Problem
ValueChangeListeners in DataTable
how jsf component get the value from backing bean instead of submitted value after validation error