Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

inputText values don't get updated to database

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic