You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ricardo Gladwell <ri...@btinternet.com> on 2004/08/05 14:27:19 UTC

Cannot set nested bean properties on ActionForms

Hi All,

Struts looses 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 Gladwell

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org