Unfortunately, you'll have to provide it. ActionForms don't carry the name they were declared with. The only object with that information is FormBeanConfig. There's no surefire failproof way to know what name, if any, is associated with a DynaActionForm with just an instance of it.
What are you trying to do? There may be other (better) ways to do what you're trying to without messing with FormBeanConfigs and FormPropertyConfigs. On Fri, 27 Aug 2004 11:27:45 -0400, Paul Spencer <[EMAIL PROTECTED]> wrote: > Hubert, > Where do I get the name of the form? > > Paul Spencer > > > > > Hubert Rabago wrote: > > > Well, it ain't that easy: > > > > // code taken from DynaActionFormClass > > DynaActionForm formBean = (DynaActionForm) form; > > FormBeanConfig config = > > ModuleUtils.getInstance().getModuleConfig(request).findFormBeanConfig("myFormName"); > > FormPropertyConfig props[] = config.findFormPropertyConfigs(); > > for (int i = 0; i < props.length; i++) { > > if ("fieldName".equals(props[i].getName())) { > > formBean.set(props[i].getName(), props[i].initial()); > > break; > > } > > } > > > > > > > > On Fri, 27 Aug 2004 11:10:03 -0400, Paul Spencer <[EMAIL PROTECTED]> wrote: > > > >>How can I reset one field on a DynaActionForm to it's initial value? > >> > >>Paul Spencer > >> > >>--------------------------------------------------------------------- > >>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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]