Hi,
 
I have a problem at the moment where I wish to set a hidden field on a form depending 
on which button a users selects.  So my JSP loads with N number of possible rows in a 
table.  Each row has a button (Edit) associated with it.  When the user hits the 
Submit button I want a hidden field to be set so my Action class can read it from the 
form and act appropriately.  The problem is that after defining my bean I cannot 
evaluate the property - the parameter I retrieve in my Action class is set to <%= 
(String) theCode %> and not the value I require!
 
Here is an extract of the code:
 
<logic:iterate id="item" scope="session" indexId="index" 
collection='<%=session.getAttribute("theList")%>'>
<tr> 
<TD class="body_text"><bean:write name="item" property="section"/>
<bean:define id="theCode" name="item" property="title"></bean:define>
<html:submit onclick="this.form.hiddenId.value='<%=(String) theCode %>'; " 
value="Edit" />
</TD>
</TR>
</logic:iterate>

The problem is compounded by the fact that the page works using standard html as 
follows:
 
<input type=button onclick="this.form.hiddenId.value='<%= (String) theCode %>'; 
value="Edit" />

but I need to use Struts Html if my DynaValidatorActionForm is to work (I think!).
 
I have looked through the archives and although I have found people having similar 
problems I cannot get a solution.  I have also tried all combinations of quotes and 
escaping quotes etc with no success.
 
I'd appreciate any help people could give.
 
Regards,
Simon.


This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to