• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

html:hidden problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic