Set Property Values via Hidden Inputs
A component might contain one or more properties whose values are not visible on the form and which are set programmatically, often computed from other user-supplied values. A form can set these properties through hidden input tags. On form submission, these input tags write their values to the properties associated with them.
For example, the Student_01.lastSubmit
property stores the timestamp of the last form submission. You can set this property from the ATG platform component /atg/dynamo/service/CurrentDate
through a hidden form input, as follows:
<dsp:input type="hidden"
bean="/samples/Student_01.lastSubmit"
beanvalue="/atg/dynamo/service/CurrentDate.secondAsDate"/>
Hidden input tags are commonly used to save and restore values of the properties of a request-scoped component from one request to the next. This lets you retain those values across multiple requests—typically, for the duration of the current session.