Meaningless Drivel is fun!*
The moose likes JSF and the fly likes problem in using selectonemenu inside datatable - please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "problem in using selectonemenu inside datatable - please help" Watch "problem in using selectonemenu inside datatable - please help" New topic
Author

problem in using selectonemenu inside datatable - please help

castro mcwin
Greenhorn

Joined: Dec 09, 2011
Posts: 2
I use datatable to display a set of values. I have a selectonemenu inside it. The display is fine. But after changing the menu value and clicking submit , the new value is not getting updated. Instead only the old value is passed

JSP:



handler:


please help

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

I have added Code tags to make your code more readable. There's a button on the message editor for that. One thing that would also help would be if you could reduce your sample to just its more essential lines. I have a hard enough time following multiple screens of text when I'm being paid for it.

You might want to put a "<h:messages/>" tag on your page. JSF will not update backing bean if ANY control value on the submitted form is invalid, but this tag will display the error message(s). Also, you don't seem to have a Submit button (commandButton or commandLink). To get the control value to update, you must have a Submit control and the Submit control must be in the same JSF form as the control(s) that you want to update the backing bean(s) from.


Customer surveys are for companies who didn't pay proper attention to begin with.
castro mcwin
Greenhorn

Joined: Dec 09, 2011
Posts: 2
Thank you so much. Sorry this is the first time for me. I will reduce my code next time.

The point you made resolved the problem. I added a submit the same JSF form which updates the backing bean.

Thanks again for your help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in using selectonemenu inside datatable - please help
 
Similar Threads
Autocomplete page does not come out
inserting JCheckbox inside JTable and rendering
Convert result set into input stream
JSF(managed) beans, can not work with JPA
problem JSF - datatable from DB