This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSF and the fly likes inputText values don't get updated to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSF
Bookmark "inputText values don Watch "inputText values don New topic

inputText values don't get updated to database

Sami M�nnist�

Joined: Sep 18, 2006
Posts: 9
I am working with Jboss, myfaces and hibernate.
I have a weird new problem. It seemed to work earlier and I can't find the problem.

I have a inputText fields and selectOneMenus inside a form witch updates values to database with entity endpoint. Fields get their disabled value from endpointEdit bean when entering to a page and from javascript after selectOneMenu onchange.

You want to create new endpoint.
Enter the page. Some fields are disabled. Works fine.
You change selectOneMenu value and fields get enabled. Works fine.
You write text to inputText fields.
Everything seems working and you press save button.

All inputText values are not saved to database. Those not disabled are saved.
Changed selectOneMenu value is saved correctly.

I have been fighting with this for sometime and am hoping some help.

example of code.
Sami M�nnist�

Joined: Sep 18, 2006
Posts: 9
I'v figured it out. Fields were disabled when save button was pressed because jsf called disabled functions again before it saved the new values. Had to modifide code quite a lot before could work around it.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: inputText values don't get updated to database
It's not a secret anymore!