File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes html:hidden problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:hidden problem" Watch "html:hidden problem" New topic
Author

html:hidden problem

sreeram kosaraju
Greenhorn

Joined: Nov 01, 2012
Posts: 2
Hi All,

I have a problem with the html:hidden tag.

I am trying to assign the value of the hidden radioSelected property with a value derived from another property keyId.
I am not able to do so.

Below is my code.

<logic:iterate id="bankKeyTpTable" name="clientAdminForm" property="bankKeyTPAssocList" type="BankKeyTPAssoc">
<tr>
<bean:define id="key" name="bankKeyTpTable" property="keyId"/>
<td>
<html:multibox name="clientAdminForm" property="rpgpKeyIdsForAction">
<bean:write name="bankKeyTpTable" property="keyId"/>
</html:multibox>
</td>
<td align="left" class="<%= background %>"><bean:write name="bankKeyTpTable" property="keyId" /></td>
<td>
<html:radio name="bankKeyTpTable" property="signingAndDecrypting" value="true" >
</html:radio>
<html:hidden property="radioSelected" value="<%= %>" />
</td>
</tr>
</logic:iterate>

Can someone please help me in achieving this.
The value in of the hidden property should be set with the value from the keyId property.

Thanks in advance.

Sree.
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 297

Hi Sreeram,

you need to assign the value of selected radio button to hidden filed , you can achieve this with the javascrit.

Use onclick event of radio button and assign the value to hidden field.

Regards
Jatan
sreeram kosaraju
Greenhorn

Joined: Nov 01, 2012
Posts: 2
Hi Jatan,

Thanks for your reply.

I tried what you suggested. But I was not able to pass the bean property to the javascript function.
Can you please give me a code snippet.

Below is what i tried:




But I am getting a null here.
Please advice.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:hidden problem