Hi!
i am new to
Struts and was using <html:multibox> in my jsp.I have to pass two bean properties to my Action when a checkbox is selected.One property i sent using body part of <html:multibox> tag.For second property, i wrote a javascript method which to be invoked when clicking a checkbox.
The problem i was facing is-
Bean property passed as argument to that javascript method is not being evaluated to its value.Its being passed as an
string.
Example code is below to better understand the problem :-)
<bean
efine id="prop22" name="bean" property="prop2"/>
<html:multibox name="myForm" property="selectedCheckbox" on click="javascript:findSelectedIndex(this.form,'<%=prop22%>');">
<bean:write name="bean" property="prop1"/>
</html:multibox>
If prop22 is having value "123XYZ", the value got by javascript method is '<%=prop22%>' not "123XYZ".
Looking for ur responses
Thanks in advance