unless u have a method by which u can select which fields u want to display, yup it'll render all fields on form.
i currently use customized Form*Config's to give it hints in the struts-config.xml file. the ability to use "set-property key/value" is hopefully coming soon (struts 1.3-dev). but using these "hints", i render most of my forms from a single tag. u could set a property which means - display field A if the property value = "something" <!-- picture form --> <form-bean name="comment_fields_Form" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="article" type="java.lang.String"> <set-property key="htmlIndex" value="cc" /> <set-property key="htmlControl" value="hidden" /> </form-property> <form-property name="comment" type="java.lang.String"> <set-property key="htmlIndex" value="dd" /> <set-property key="htmlSize" value="60" /> <set-property key="htmlMaxLength" value="6" /> <set-property key="htmlControl" value="textarea" /> </form-property> <form-property name="email" type="java.lang.String"> <set-property key="htmlIndex" value="ee" /> <set-property key="htmlSize" value="40" /> <set-property key="htmlMaxLength" value="42" /> <set-property key="htmlControl" value="text" /> </form-property> </form-bean> riyaz Cliff Lam wrote: > Hi riyaz, > > Thank you very much. > I have try it. > > I think this method is mot suitable for me as I only want to get the fields > in jsp not all the field in the form. > > As some field in the form is not used in jsp and some field is used by the > other action. > > Anyway thank a lot. > > Do you still have any method let me try ?? > > Cliff > > this is your last method: > > 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()); > } > > > ----- Original Message ----- > From: "rmanchu" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <user@struts.apache.org> > Sent: Tuesday, May 10, 2005 5:05 PM > Subject: Re: The field name in jsp > > > >>did u try with ur forms? i think it should work. also, if you're jsp is >>not backed by an action then, u'll need to create a form, which u can >>easily by using a RequestUtils.createActionForm method >> >>riyaz >> >> >>Cliff Lam wrote: >> >>>Thx a lot. >>> >>>This is a good method but I'm not using DynaActionForms = ( ..... >>> >> >>--------------------------------------------------------------------- >>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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]