Thx a lot. This is a good method but I'm not using DynaActionForms = ( .....
Cliff ----- Original Message ----- From: "rmanchu" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Monday, May 09, 2005 1:48 PM Subject: Re: The field name in jsp > have used the following extensively with DynaActionForms. i would think > that this would work with any extension of ActionForms. The form fields > are represented by FormPropertyConfig objects contained within the > FormBeanConfig objects. you could place the following code in you JSP > and see what happens. > > > HttpServletRequest request = > (HttpServletRequest)pageContext.getRequest(); > ModuleConfig moduleConfig = > (ModuleConfig)request.getAttribute(Globals.MODULE_KEY); > FormBeanConfig formBean = moduleConfig.findFormBeanConfig(formName); > FormPropertyConfig[] formProps = formBean.findFormPropertyConfigs(); > for (int i = 0; i < formProps.length; i++) { > // get property > FormPropertyConfig prop = formProps[i]; > System.out.println(prop.getName()); > } > > Cliff Lam wrote: > > Should I hard code the field name in the collection ? > > > > I want to do it in each page in my web application .... =.=" > > > > Cliff > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]