You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Janarthan Sathiamurthy <ja...@yahoo.com> on 2004/03/12 07:04:06 UTC

Form bean property as java variable in page ?

Hi,
 
I have a form bean entry in my struts-config.xml, looks like -
<form-bean name="myForm" type="org.apache.struts.validator.DynaValidatorForm">
 <form-property name="pageNumber" type="java.lang.String" initial="0" />
 <form-property name="numberOfRows" type="java.lang.String" initial="0" />
</form-bean>
I have a jsp page in which i place this form as -
<html:form action="/myAction">
 <html:hidden property="pageNumber"/>
 <html:hidden property="numberOfRows"/>
</html:form>
I want the 'pageNumber' and 'numberOfRows' property of the form bean in a java variable in my page.
Is there any inbuilt functionality in Struts which i can use to achieve this ?
I tried with by placing the following code in my jsp just below the form -
<bean:define id="numberOfRowsA" name="commonOCSForm" property="numberOfRows" />
<%= numberOfRowsA %>
But it gives 'numberOfRowsA' not defined error when run. :-(
Please advice.
 
Regards,
Janarthan S



---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster.