aspose file tools
The moose likes JSF and the fly likes Problem in Editing Table Data Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Problem in Editing Table Data " Watch "Problem in Editing Table Data " New topic
Author

Problem in Editing Table Data

Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
I'm trying to edit some data in a table. The database result appears in the table (with a check box next to each row) but when I click on the check box this exception occurs :




Here are my source codes :

TableData.java :




UserBean.java :




Please tell me what I should do.

Thanks in advance,
Maryam
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
editUsers.jsp :


[ June 12, 2007: Message edited by: Maryam Nouhnejad ]
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
Please somebody help me!
Gabriel Claramunt
Ranch Hand

Joined: May 26, 2007
Posts: 375
Look at the exception:
SEVERE: Error testing property 'fullName' in bean of type null

Somehow, when you are iterating over the collection, you have a null userBean.
Probably you need to do some debugging...
[ June 12, 2007: Message edited by: Gabriel Claramunt ]

Gabriel
Software Surgeon
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
I could solve my problm. Actually the number of rows in database was 26 but when I counted the number of rows printed in the web page I saw that it's 78 (26*3)...it was related to my array data; when I corrected the SIZE_USERS to :

and added them to my code (TableData.java) under


It worked and there were no more exceptions.



Now, I can edit the user information in the web page but how can I add the changes to the database? ... I mean if I have a submit edit button for all rows, how can I check which rows were changed?


Please guide me!

Thank you,
Maryam
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
Please help me for the last question!

Thank you!
a
Greenhorn

Joined: Jun 11, 2007
Posts: 7
Hi,
bind the dataTable to a HtmlDataTable attribute to get the selected row. Here a link how you can solve this problem: BalusC-Link
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
Thank you for the link!

I read it and added the code to my project.

Now I have a column like this & I want to save the changes (after editing) to database :



but first I want to be sure the saveEditedRow can be called.


These are the methods I added to my TableData.java :




... but nothing happens. There is no exception and nothing is printed in my console. Do you know why?
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
Any idea is appreciated!

Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
Please help me!!
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
I could solve my problem.
The problem was that I should write

instead of


Maryam
 
 
subject: Problem in Editing Table Data
 
Threads others viewed
Problem with "rendered" Flag
Again javax.el.PropertyNotFoundException
Why is the memory usage ZERO bytes of this program
problem with setting data from p:dataTable
data table,selectbooleancheckbox and row deleting
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture