I had a situation where I had a list table with a multibox control and a
readonly version of the same list. I had to maintain the users selection
when the readonly was shown so I put this inplace:
Kinda the same thing but dynamic.
<nested:iterate id="currentIndex" property="../selectedCashReceipts" >
<nested:define id="currentValue" name="currentIndex"
type="java.lang.String"/>
<nested:hidden property="../selectedCashReceipts" value="<%= currentValue
%>"/>
</nested:iterate>
I would be interested if there a better way as well.
"Justin F. Knotzke" <[EMAIL PROTECTED]> on 03/28/2003 12:57:26 PM
Please respond to "Struts Users Mailing List"
<[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
cc:
Subject: String Array as hidden property
Hello,
I have a property that is an array of strings. The property will not
be changed by the user. However I need to access it in the JSP in order
to not lose the data upon returning from the JSP.
Normally I do the following:
<html:hidden property="day" value="<%=agendaForm.getDay()%>"/>
I could do the following to keep my array of Strings:
<html:hidden property="ids[1]" value="<%=agendaForm.getIds(1)%>"/>
..where in the Form I have a get and set that takes an index and
value.
But this requires me to write a hidden property for the entire size of
the array (in my case it's 24).
Is there another more elegant way to do this?
Thanks
Justin
--
Justin F. Knotzke
[EMAIL PROTECTED]
http://www.shampoo.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]