You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by home <we...@suwei.homeip.net> on 2002/08/17 17:43:31 UTC

Nested Mapped Property not working right?

I have been using struts1.1b1 and common1.3. One feature I have been using
is the nested map property. ie.
      <html:text property="testMapBean.mapValue(test)" />

Now I switched to 1.1b2 and common1.4, this code seems to be broken. I
looked at the source(class PropertyUtil, method:setNestedProperty  line
1516-1526).
it looks like now it can only handle something like:

<html:text property="map(test).objValue" />

When I copied the common1.3 code (same method) back to common1.4, my code
start working again.

Is this supposed to be a new feature or just a new bug?

Another question I have is about the implementation of this property thing.
It use the full property name as the tag's name (ie <input
name='map(test).objValue' value='..'>. However, this requires your
ActionForm to be set the same way. This seems to me to be a duty beyond
ActionForm and should be in the business logic. So I changed the tld and a
few tags to have a nameid property so that I can decide what's the name is
and therefore, the setter of my ActionForm is simpler and only used as a
carrier of plain data rather than hierachy of data. Any thought?

Thanks,

Wei





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>