Simpatic question on datatable...

G

gbattine

Hi guys,
i've a great problem with JSF application and i'm not able to go on.
I've defined a datatable and it works fine.
I have an edit link that clicked allow user to edit fields in another
page.
I want to know if

1) Does exists a method for showing datatable giving immediately
possibility to user to modify fields, whitout press edit botton?
Can you say me how can i do it?

2) i'm trying to working this save method, to save an edited row but it
performs navigation but not update values

public String saveUser(){
try{
UsersTable table=new UsersTable();
table.getUserItem();
DataSource dataSource=Singleton.getInstance().getDataSource();
Connection conn=dataSource.getConnection();
if (conn != null) {
PreparedStatement pst = null;
pst = conn.prepareStatement("UPDATE utente set
username="+userItem.login+"password="+userItem.password+"nomegruppo="+userItem.teamname+"tipo="+userItem.role+"nome="+userItem.firstName+"cognome="+userItem.lastName+"citta="+userItem.city+"datanascita="+userItem.date+"indirizzo="+userItem.address+"professione="+userItem.profession+"email="+userItem.email);
pst.executeUpdate();
pst.close();
conn.close();

}
}
catch(Exception e){};

return "ok";
}

Can you help me?
I'm bit confused...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top