----- Original Message ----- From: "Robert Taylor" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, October 14, 2003 6:47 PM Subject: RE: DynaActionForms
> I'm not sure what you mean when you ask "what view technology". > > You can find ListUtils here: > http://jakarta.apache.org/commons/collections/api/org/apache/commons/collect > ions/ListUtils.html > > I've rendered these lists using a variety of <html:* .../> > components - checkboxes, multiboxes, select lists, text, hidden, etc... > > I admit, I had a hard time getting my head around how to use indexed > properties > and dynamically generated fields but they work. You will most likely have to > subclass the DynaActionForm and override the reset(). > > Heres a link to using indexed properties: > http://jakarta.apache.org/struts/faqs/indexedprops.html > > Let me know if I answered your question. > > robert > > > -----Original Message----- > > From: Edgar P Dollin [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 14, 2003 8:12 AM > > To: Struts Users Mailing List > > Subject: RE: DynaActionForms > > > > > > Interesting idea. My other choice is to stick a map in a standard action > > form. What view technology are you using with these lists? > > > > Edgar > > > > > -----Original Message----- > > > From: Robert Taylor [mailto:[EMAIL PROTECTED] > > > Sent: Monday, October 13, 2003 4:07 PM > > > To: Struts Users Mailing List > > > Subject: RE: DynaActionForms > > > > > > > > > Edgar, have you thought about using indexed properties together with > > > ListUtils.lazylist() > > > with DynaActionForms. > > > > > > I've successfully used them with DynaActionForms where my > > > fields are completely dynamic. > > > > > > Just a thought. > > > > > > robert > > > > > > > > > > -----Original Message----- > > > > From: Edgar P Dollin [mailto:[EMAIL PROTECTED] > > > > Sent: Monday, October 13, 2003 4:39 PM > > > > To: Struts Users Mailing List > > > > Subject: RE: DynaActionForms > > > > > > > > > > > > Thanks for the input. I did some more research and I think I > > > > understand the forms a little better. > > > > > > > > The following code will create a DynaActionForm with one > > > String field: > > > > > > > > FormBeanConfig formBean = new FormBeanConfig(); > > > > FormPropertyConfig fpc = null; > > > > > > > > fpc = new FormPropertyConfig(); > > > > fpc.setName("testField1"); > > > > fpc.setType(java.lang.String.class.getName()); > > > > fpc.setInitial("testField1Value"); > > > > > > > > formBean.addFormPropertyConfig(fpc); > > > > > > > > > > > formBean.setType(org.apache.struts.action.DynaActionForm.class > > > .getName()); > > > > formBean.freeze(); > > > > > > > > DynaActionFormClass dFC = > > > > DynaActionFormClass.createDynaActionFormClass(formBean); > > > > DynaActionForm dynaForm = (DynaActionForm) > > > dFC.newInstance(); > > > > > > > > > > > > I think I know the answer already (my apologies), but will > > > this code > > > > break with new releases of struts. > > > > > > > > Thanks > > > > > > > > Edgar > > > > > > > > > -----Original Message----- > > > > > From: Nick [mailto:[EMAIL PROTECTED] > > > > > Sent: Monday, October 13, 2003 2:41 PM > > > > > To: Struts Users Mailing List > > > > > Subject: Re: DynaActionForms > > > > > > > > > > > > > > > I do not believe that you can do dynamically add fields to a > > > > > DynaForm, as the config is frozen at app startup. Might > > > work with > > > > > an internal HashMap though. > > > > > > > > > > On Mon, Oct 13, 2003 at 03:31:32PM -0400, Chen, Gin wrote: > > > > > > I'm assuming that he meant create a new property that is > > > > > not already > > > > > > defined in the struts-config. In which case I think your > > > > > reply would > > > > > > fail with an property not found type exception. :-/ > > > > > > One way around this is to have a Hashmap within the > > > > > hashmapped dynaform. > > > > > > That will allow you to do something like: > > > > > > > > > > > > Hashmap myDynaproperties = > > > > > (Hashmap)myDynaform.get("dynaProperties"); > > > > > > myDynaproperties.set("foo", bar); > > > > > > Etc. > > > > > > > > > > > > Another possibility (although I havent tried it) is to operate > > > > > > directly on the map. > > > > > > > > > > > > myDynaproperties.getMap().put("foo", bar); > > > > > > > > > > > > -Tim > > > > > > > > > > > > -----Original Message----- > > > > > > From: Carlos Sanchez [mailto:[EMAIL PROTECTED] > > > > > > Sent: Monday, October 13, 2003 3:21 PM > > > > > > To: 'Struts Users Mailing List' > > > > > > Subject: RE: DynaActionForms > > > > > > > > > > > > > > > > > > yourdynaform.set("propertyname",propertyvalue); > > > > > > > > > > > > > -----Mensaje original----- > > > > > > > De: Edgar P Dollin [mailto:[EMAIL PROTECTED] Enviado el: > > > > > > > lunes, 13 de octubre de 2003 19:35 > > > > > > > Para: Struts Users Mailing List > > > > > > > Asunto: DynaActionForms > > > > > > > > > > > > > > > > > > > > > I have an application with configuration files > > > already. Rather > > > > > > > than have struts-config configure DynaForms, I would like to > > > > > > > populate the forms myself. > > > > > > > > > > > > > > Does anyone have any experience with how this behaves > > > in struts? > > > > > > > > > > > > > > Thanks > > > > > > > > > > > > > > Edgar > > > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------------- > > > > > > > - > > > > > > > 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] > > > > > > > > > > -- > > > > > Nick Heudecker > > > > > SystemMobile, Inc. > > > > > Email: [EMAIL PROTECTED] > > > > > Web: http://www.systemmobile.com > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > 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]

