This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Problem With the Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem With the "action" Attribute" Watch "Problem With the "action" Attribute" New topic

Problem With the "action" Attribute

zohreh talebi
Ranch Hand

Joined: Sep 01, 2006
Posts: 41
I want to edit some of my table data. I have put <h:commandButton> around my <hutputText ...> so that if I click on the button, the changes would be saved to database. The action of the button is : "tableData.saveEditedRow".
The problem is that when I click on the button nothing happens.
These are some part of my code (please kindly help me) :

edit.jsp : :

My bean class ( :

zohreh talebi
Ranch Hand

Joined: Sep 01, 2006
Posts: 41
Please somebody guide me...
Tak Ng

Joined: Jun 05, 2007
Posts: 19
On the line
<h:commandButton action="tableData.saveEditedRow" value="save">

you must surround "tableData.saveEditedRow" with #{} so it becomes

<h:commandButton action="#{tableData.saveEditedRow}" value="save">
wood burning stoves
subject: Problem With the "action" Attribute
Similar Threads
Problem in Editing Table Data
problem with datatable binding attribute
data table,selectbooleancheckbox and row deleting
Does action attribute not work with function call having parameters?
Sortinng 'h:tableData