File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Problem updating a dynamically populated selectOneChoice elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem updating a dynamically populated selectOneChoice elements" Watch "Problem updating a dynamically populated selectOneChoice elements" New topic
Author

Problem updating a dynamically populated selectOneChoice elements

Marc Doerflinger
Greenhorn

Joined: Jul 21, 2009
Posts: 1
Hello there,

i use jsf and apache myfaces trinidad library. i want to have a form with 2 tr:selectOneChoice elements where the first one will have some initial fields in it. the second one will become populated depending on what is chosen in the first one.

the jsf looks like this:



in my licenseAction bean i have the method customerSelected which updated the values of stores field dynamically depending on the value that was selected in the customers field.

if i select a value (customer) in the first menu, then the second menu gets populated with the correct values. but as i select a value from the second one, i get this very strange error:

sorry for the german. quick translation: index 0 of submittedValue of selectOne is out of valid range. should be between 0 and -1.



it looks to me that come internal value range is not updated once the menu has been populated with new valued.
does anyone know this bevhaviour and what i have to do to get rid of it?

Thanks,
Marc
Santhosh Krishnamoorthy
Greenhorn

Joined: Nov 24, 2008
Posts: 2
Set the valuePassThru="true" for both the components and try....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem updating a dynamically populated selectOneChoice elements