Retaining checkbox state after validation errors
Hello,
I have a simple database login form consisting of edit fields for username, password, and database, and also a checkbox to activate a debugging feature.
For validation errors, I have been easily able to retain previously entered data in the three edit fields, in case one of the DB parameters was entered wrong and the user needs to re-enter a specific field. But I have not been able to save the checked/unchecked state of the checkbox.
Here is the code I use to retain the previously entered data of the database name edit field, for example:
<input type="text" name="databaseName" value='${param.databaseName}' size="20"/>
Works fine. But with the checkbox, I don't know how to retain the checked/unchecked state:
<input type="checkbox" name="useTestFile"
checked="?"/> Use sample XML file
What should go into the ? {$param.useTestFile .... ?} so that the state is retained between entry errors?
Thanks,
Glen

