This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
If I'm editing the values of TestObject taken from a database and I have parameters
name, email & telNo displayed on the screen, but dateCreated is not displayed
When I click 'save' values name, email & telNo of object testObject will be passed back to my Action from my JSP, dateCreated will now be
NULL as the value was never sent to the JSP in the first place.
Is there a way in which you should handle this properly in Struts2 to retain the original value from the database, or do you have to have a hidden
field on your JSP carrying the value of dateCreated?
I ask, because potentially you could have dozens of fields which you do not want on the screen, especially if only certain values are
editable on certain screens and it seems overkill to have to have them all as hidden fields.