You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Michael McGrady <mi...@michaelmcgrady.com> on 2004/07/14 18:14:42 UTC

::: ::: guaranteed behavior?

Hello, all,

I am not sure whether this is a dev or a user question, so, I am double 
posting.  If that is wrong, s'cuse, please!

I am my version of a BeanMap, cf. 
http://wiki.apache.org/struts/StrutsCatalogMappedBeans, and am putting a 
series of java.util.LinkedLists holding 
org.apache.struts.util.LabelValueBeans into the BeanMap via 
setProperty(Object key,Object value).  I am then accessing the lists via 
<logic:iterator> in Struts radio tags (where "eclipse" is a key in the 
BeanMap holding a list of LabelValueBeans) as follows:


               <logic:iterate id="row" name="layouts_schemes" 
property="eclipse">
                 <html:radio property="scheme" value="value" idName="row"/>
                 <bean:write name="row" property="label"/>
               </logic:iterate>

This works great!  However, I am not sure that this behavior will be 
guaranteed in the future, since it is not documented in the docs.

In the docs, the property for iterator is "defined" as the "Name of the 
property, of the JSP bean specified by name, whose getter returns the 
collection to be iterated".  Obviously, my code sneaks in the value of the 
property attribute as the "Name of the key in the BeanMap which returns the 
Collection saved is scope as "layouts_schemes".  Trust me, if I change the 
property value to a different key in the BeanMap, I do get a different 
collection (List) from the BeanMap on the page.

Will this be guaranteed in the future?  Or, is this an anomaly that I 
cannot count on in the future?

Michael McGrady



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