I guess I better elaborate. You're not using "nested" properties - you've defined a String property in your DynaActionForm that contains a period/full stop (i.e. ".") - now Struts is treating it as a "nested" property in the population process - but its not "nested" its just a simple String. If you want to actually use "nested" properties then define some kind of bean as a property in your DynaActionForm that has a "url" property - then it will work as a "nested" property - if you just want a simple property, then stop confusing struts and drop the period/full stop.
Niall ----- Original Message ----- From: "Niall Pemberton" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, August 06, 2004 4:37 PM Subject: Re: Problem setting nested bean properties on ActionForms > So my guess was correct - so see my previous answer. > > Niall > > ----- Original Message ----- > From: "Ricardo Gladwell" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, August 06, 2004 3:56 PM > Subject: Re: Problem setting nested bean properties on ActionForms > > > > Hi Niall, > > > > My form-bean definition is included below: > > > > <form-bean > > name="configureForm" > > type="org.apache.struts.action.DynaActionForm"> > > <form-property > > name="title" > > type="java.lang.String" > > /> > > <form-property > > name="webdav.url" > > type="java.lang.String" > > /> > > </form-bean> > > > > -- rg > > > > Niall Pemberton wrote: > > > If you have > > > > > > <html:text property="webdav.url" value="${config.webdav.url}"/> > > > > > > in your jsp, then Struts (using BeanUtils) will try and do a > get("webdav") > > > on your DynaActionForm so that it can then call set("url") on the bean > > > returned from the get. > > > > > > So when you say "I checked and the property setter method for the > > > DynaActionForm in the example I cited is being called and the > 'webdav.url' > > > string is being passed as the property name" - this doesn't seem right > to > > > me. If it is being called then its not the Struts form population > mechanism > > > thats doing it. > > > > > > I'm guessing that in your struts config for the DynaActionForm > definition > > > you have a property called "webdav.url" - if so then maybe its the form > > > initializtion thats setting "webdav.url" to null. If this is the case > then > > > its never going to work this way. You need a "webdav" property that is > some > > > kind of bean and then a "url" property in that bean and you somehow need > to > > > have that bean set up in your form before the population is done. > > > > > > If I'm completely off base here then you need to post more information - > how > > > about posting the form definition from your struts-config.xml. > > > > > > Niall > > > > > > ----- Original Message ----- > > > From: "Ricardo Gladwell" <[EMAIL PROTECTED]> > > > To: "Jakarta Struts Users" <[EMAIL PROTECTED]> > > > Sent: Friday, August 06, 2004 2:02 PM > > > Subject: Problem setting nested bean properties on ActionForms > > > > > > > > > > > >>Hi All, > > >> > > >>I'm having some problems with nested properties in Strust. Struts seems > > >>to loose property values when specifying nested bean properties in > > >>an action form. For example, the following fragment is an example of > > >>attempting to set a value in a view JSP: > > >> > > >><html:text property="webdav.url" value="${config.webdav.url}"/> > > >> > > >>When Struts attempts to set the webdav.url nested bean property for, > > >>example, a DynaActionForm the value is passed as null to the action form > > >>setter method. > > >> > > >>In the documentation it clearly states that "the property attribute for > > >>the Struts-HTML tags accept simple, nested, and indexed expressions": > > >> > > >> > > > > > > > http://struts.apache.org/api/org/apache/struts/taglib/html/package-summary.html#package_description > > > > > >>I checked and the property setter method for the DynaActionForm in the > > >>example I cited is being called and the 'webdav.url' string is being > > >>passed as the property name but the property value passed is 'null' > > >>despite the fact that I have entered a value. When I switch to using > > >>standard, non-nested property name values in the html:text tag the > > >>values are set correctly. > > >> > > >>Is this proper behaviour for Struts or is it some kind of bug? > > >> > > >>Kind regards... > > >> > > >>-- Ricardo > > >> > > >>--------------------------------------------------------------------- > > >>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] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]