Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Problem in Editing Table Data

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
editUsers.jsp :


[ June 12, 2007: Message edited by: Maryam Nouhnejad ]
 
Maryam Nouhnejad
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please somebody help me!
 
Ranch Hand
Posts: 376
Scala Monad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Maryam Nouhnejad
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please help me for the last question!

Thank you!
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any idea is appreciated!

 
Maryam Nouhnejad
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please help me!!
 
Maryam Nouhnejad
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I could solve my problem.
The problem was that I should write

instead of


Maryam
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic