wood burning stoves 2.0*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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.
jQuery in Action, 2nd edition
subject: inputText values don't get updated to database
Similar Threads
How to get selectOneMenu value
Issue With selectOneMenu ValueChangeListener Not Firing
Simple form: inputText does not reset
Help regarding the enabling of a button in an xhtml based on the value selected in a selectOneMenu
SelectOneMenu submit not working