This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

inputText values don't get updated to database

 
Sami M�nnist�
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
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.

JSF:
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.

Scenario:
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.

Problem:
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�
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!