File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes jsf not updating the database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "jsf not updating the database" Watch "jsf not updating the database" New topic
Author

jsf not updating the database

muntago Richard
Ranch Hand

Joined: Nov 13, 2010
Posts: 82

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
























Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
muntago Richard
Ranch Hand

Joined: Nov 13, 2010
Posts: 82
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

Avik Mazunder
Ranch Hand

Joined: Jun 27, 2012
Posts: 39

instead of
muntago Richard wrote:



you have to use



I think this will solve your problem...!












Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

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

Joined: Nov 13, 2010
Posts: 82
i have resolved the problem. its from the form inputs.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsf not updating the database