You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Taylor, Jeremy" <jt...@lehman.COM> on 2000/11/30 15:01:38 UTC

Improvement to MultiboxTag.java and BeanUtils.java

I would like to put forward some changes to MultiboxTag and BeanUtils. These
small changes made my life
much easier and allowed me to have the following in my jsp:

<tr>
  <logic:iterate id="listingString"  name="dealReferenceBean"
property="listings">
    <td>
      <form:multibox name="dealForm" property="listings"
value="listingString"/>
      <bean:write name="listingString" />
    </td>
  </logic:iterate>
</tr>

where dealReferenceBean.getListings returned a Collection of all possible
listings and dealForm returned a Collection of 
the currently selected listings.

1. The value attribute of multibox should accept either a bean or a run-time
value. I find accepting a bean much more useful.

 <<MultiboxTag.java>>  

2. BeanUtils  method getArrayProperty should handle a bean attribute that is
a Collection as well as an Array. I like Collections....

 <<BeanUtils.java>>