This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with getRowData of ListDataModel

daniel cs leung
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I feel nervous with the following issue of the getRowData() in ListDataModel. Pls kindly help.

In the bean, there is a property, called "user_list" (ListDataModel), storing the latest result of users from database. Also, there is a property, called "user" (User), storing selected user informaion.

prepareModifyUser() function will update "user" with the selected row of ListDataModel.

public ListDataModel getUser_list() {
return this.user_list;
public String prepareModifyUser() {
String fail_msg = "prepare_modify_user_fail", success_msg = "prepare_modify_user_success";
String status = success_msg;
User user = (User)getUser_list().getRowData();

try {
setUser(new User(user.getId()));
} catch (Exception e) {
Logger.log("UserRegistry.prepareModifyUser", e.toString());
status = fail_msg;

return status;

It is working well to show the list of user on the DataTable. Also, it is sucessfully to call "prepareModifyUser()" by clicking the link on the table, and go to the modify_user page and show all user information.

After the user saved the updated information , the page will be redirect to a modify_user_success page. There is a [back to list] button and [modify again] button only.

When I click the [modify again] button, the system should call prepareModifyUser() again and go to the modify_user page. But, it is fail and there is java.lang.IllegalArgumentException shown. I am sure that I haven't reseted the "user_list".

I am wondering if the cursor in the ListDataModel will be resetted after calling another page? Can anyone help me. Thanks a lot.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic