You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ScottC <sc...@verizon.net> on 2003/06/17 21:33:06 UTC

Inconsistent use of property in nested tags

A <nested:write property="aPropertyInAClass" /> extracts the "value" of
aPropertyInAClass and displays the value on my .jsp.

However, when working with <nested:radio property="id" value="123" />,
property translates to <input type="radio" name="id" value="123"> and
"property" is really the name of the property, not the value of the property
in question (as it was in the <nested:write/> tag). I have been frustrated
trying to get the "value" of the property in the "value" portion of the
radio tag. So many examples of <nested:radio/> show static values in the
value field and I've not seen examples of how to get the true "value" out of
the form bean stuck into the value="" portion of the tag. The only way I've
been successful so far in getting the value of the selected radio button on
my form (which is a matrix of 12 radio buttons) is this:
<input type="radio" name="selectedMember" value=" <nested:write
property="lookup" /> "> and then using a request.getProperty on the
"selectedMember" name. Because you can't nest the <nested:write/> in the
value portion of the <nested:radio/> tag, I'm stuck. If you can point me to
a working example of how to design and code a matrix of radio buttons, it
would be greatly appreciated. :-)

Thanks for your advice,
Scott




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org