Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with Editable Datatable  RSS feed

Phoenix Kilimba
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sirs et Madames,
I have an application where an editable datatable displays attributes names (eg HOUSEHOLD ID) and values (eg K001). The first column of the datatable is a checkbox which when clicked renders the value column editable (by displaying an inputText component). When I perform the editing on the value comumn and I click on submit, sometimes the corresponding value objects value attribute is changed and most times it isn't. This is very strange as java code shouldn't choose when to work and when not to work. Furthermore as you can see from the backing bean, the first line of the code block the submit button goes into when clicked is a print statement saying "AM PRESSED". However on the server log, it shows this print statement comes AFTER a hibernate SELECT call is executed, ie the JSP page is being reloaded even BEFORE geting to the "return null" statement at the end ot the submit buttons code block. This seems counter-intuitive to how java works as code is gone through sequentially is it not? The "return null" statement should be the last statement executed yet it seems to be the first, otherwise why else would the page reload before the "AM PRESSED print statement? Here is the JSP code for the datatable:

Here is the backing bean:

Here is a GroupAttribute class:

The server log output:

What could possibly be the reason why changes on the user interface inputText component do not change the state of the corresponding value object (or more accurately why does it pick and choose WHEN to do so and when not to?)

Please help.
Thanks in advance

PS I have made a further discovery. Editing does work, but not at the first time of asking. I always have to press F5 (refresh my browser) for the changes to actually take effect. I still dont know what the problem is but am hoping this narrows down the issue maybe?... Help
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!