You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/07/18 00:10:01 UTC

Mapped property

Subject: Mapped property
From: "Sen�n de Diego" <ra...@altavista.net>
 ===
I've seen that, if I have a class declared as:

    class SomeBean {
        ..
        java.util.Map getValues(){..};
        ..
    }

and foo is a bean of this class, I can use this syntax:

    <bean:write name="foo" property="values(color)"/>

which is equivalent to:

    out.write(foo.getValues().get("color"));

My question is: How can I use this functionality when the name of the value
to retrieve is given by another bean?

In fact, I intend to do :

 <logic:iterate id="propertyName" name="anotherBean"
property="propertyNames" type="String">
     <bean:write name="foo" property="values(<%=propertyName%>"/>
 </logic:iterate>

where "propertyNames" is a Collection, but that doesn't work...

Thanks,
Sen�n




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