You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dennis Muhlestein <de...@zserve.com> on 2003/05/08 18:08:08 UTC
html:hidden behavior with session form - BUG?
I have a ActionForm in the session scope and am seeing some weird
behavior with the html:hidden tag.
When I go from page 1 to page 2, my controller action sets the page
attribute in my form from 1 to 2.
On page 1 the <html:hidden property="page" /> renders:
<input type="hidden" name="page" value="1" />
On page 2 the the <html:hidden tag renders the exact same thing, even
though the property of the form has been incremented in the controller.
If I use bean:write instead of html:input it works:
ie:
<input type="hidden" name="page" value="<bean:write name="myForm"
property="page" />">
The output of this is:
<input type="hidden" name="page" value="2" />
Which is the desired result.
Is this a bug in the html:hidden tag? It used the value of the
parameter submitted to the action (ie: /SomeAction.do?page=1&...)
instead of the property of the bean set in the action after the post
(ie: BeanUtils.setProperty(form,"page",2)) to render it's output.
I am using a nightly build 20030501
TIA
-Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org