|
From: <tho...@tr...> - 2006-07-25 14:50:14
|
Is there a convenient way to assign a fixed value from a hidden form
element and have it bound to the command object? I'm using the new <form>
tags.
the <form:hidden> tag does not have a value attribute.
Tried to mix in a <spring:bind> tag but this resulted in the preperty
being set to null on the command object even though it originally had a
value pre-assigned when the command object was created.
Can we mix and match <form:> and <spring:bind> tags?
Here is a simplified version of what I'm using:
<h4>New Login Account</h4>
<form:form commandName="command" action="new_user.htm">
<table>
<tr>
<td class="prompt">Login ID:</td><td class="value">
<form:input path="user.userName"/>
</td>
</tr>
<tr class="even">
<td class="prompt">Password:</td><td class="value">
<form:password path="user.password"/>
</td>
<td>Retype Password:</td><td class="value">
<form:password path="user.retypePassword"/>
</td>
</tr>
</table>
<table>
<tr>
<td class="submit"><input name="_eventId_submit" type="submit"
value="NEXT"/></td>
</tr>
</table>
<spring:bind path="command.step">
<input type="hidden" name="_step" value="STEP1"/>
</spring:bind>
<input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}"/>
</form:form>
The "command.step" is the property that I want to be able to set to a
fixed value from the form, like STEP1 in the example.
Thomas
|