Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Updating a row in a datagrid/datatable  RSS feed

Ayan Afridi
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. I have a table in a db, that I would like to create CRUD (create update delete) operations for using JSF as a frontend, and ibatis on Spring. The first page you would see is a listing of the rows in a specific table. I am able to do this by binding a dataGrid to a bean that i created that gets a List of the rows in the db.

Now I want to be able to update any individual row, with new info. i want this updating to be done on a new jsf/jsp page where only that row's data is visible. If I put a command_hyperlink as a column of the row, and I assign it some action, how will that action know what data is in the rest of the row so as to allow me to display all of the row's data in the next page?

2. Also, the datagrid is bound to a bean's method called "getMappings", as such:
<hx:datagrid cellpadding="2" border="1" id="transactionListing" valueRef="txnMappingListBean.mappings"
var="mappings" pagesize="15" rowClasses="oddRow,evenRow">

where txnMappingListBean.getMappings() returns a list of all the mappings.
I put a stdout line in this method, and for some reason, this gets printed out like 50 times. I am only accessing the table once though. What does this occur?

3. If anyone knows WSAD - why does it not allow me to use "dataTable" as opposed to dataGrid, and what are the benefits of dataTable, or vice versa?

Thanks in advance!
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!