Win a copy of Rust Web Development this week in the Other Languages 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

jsf not updating the database

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

jsf not updating the database

i tried to update the database but null values were updated. I think the problem
is from the form inputs

below is the form fields and the bean class
























 
Saloon Keeper
Posts: 24826
172
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's correct. JSF is not updating the database.

JSF doesn't do databases. Could care less about databases, in fact. Anything done with a database is something you have to do yourself.

Aside from that, you shouldn't be attempting to use the JSF EL as a "programming language" and passing parameters with it.
 
muntago Richard
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Update is not among Data Manipulation Language just like Insert,Delete etc. If yes then your wrong.
i have achieve a lot of things with jsf.
They must be away and i guess the problem is from the form fields

 
Ranch Hand
Posts: 39
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
instead of

muntago Richard wrote:



you have to use



I think this will solve your problem...!












 
Tim Holloway
Saloon Keeper
Posts: 24826
172
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not a good way to solve it, though. Although in this particular case, you can probably use this code safely, consistently coding like that will eventually open you up to SQL injection attack exploitation.

A PreparedStatement is a better approach.
 
muntago Richard
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have resolved the problem. its from the form inputs.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic