Would somebody please tell me the proper way to set a form property from a
request parameter?
After reading the docs on the html:hidden tag I thought I could do it using
the value attribute:
<html:hidden property="mode" value="<%= request.getParameter('mode') %>"/>
But this doesn't appear to call the setMode() method of the Form.
Then I tried using the bean:define tag, again using the value attribute:
<bean:define id="mode" property="mode" name="testForm"
value="<%= request.getParameter('mode') %>"/>
But this doesn't work either.
Currently, this is the only way I found to do it, but it seems kind of
klunky.
<bean:define id="testForm" name="testForm"/>
<%
((web.app.test.TestForm)testForm).setMode(request.getParameter("mode"));
%>
Thanks in advance,
Vic