You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Howe <jw...@allencreek.com> on 2001/01/05 22:18:55 UTC
question
I'm using the 1/3/2001 build and I just tried using the <form:hidden> tag
and I'm either misunderstanding the documentation or there is a bug. What
I need to be able to do is give the hidden field a name which is different
from the propery used to populate the field. After reading the
documentation, I thought I could use the following form to get the result I
need:
<form:hidden name="beanName" property="fieldName" value="beanProperty"/>
I was hoping it would generate:
<input type="hidden" name="fieldName" value=".. value of
beanName.getBeanProperty() ..">
but instead I got
<input type="hidden" name="fieldName" value="beanProperty">
In other words, the value was taken as a literal value, not the name of a
bean property. The documentation for the value attribute states:
"Value to which this field should be initialized. [Use the corresponding
bean property value] "
I took this to mean that the value of value would be treated as a property
name and would be dynamically retrieved.
Did I misunderstand something?
Thanks.