DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17592>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17592

optionsCollection requires property while only name required?





------- Additional Comments From [EMAIL PROTECTED]  2003-03-03 16:35 -------
OptionsCollectionTag.java uses the RequestUtils.lookup method to retrieve the 
collection. This method returns the bean specified by the name attribute if the 
property attribute is empty / null. Since there are no other references in 
OptionsCollectionTag.java to the property attribute, functionality of 
retrieving the collection relies fully in RequestUtils.java, which supports 
retrieving beans/objects from request-scope with only the name attribute 
specified. 

I've changed the .tld file locally and the tag works perfectly. Fixing this 
would eliminate the need for the following JSP-code if the collection is not a 
property of another bean/object:

<html:select property="value">
  <logic:iterate name="collection" id="element" type="DynaBean">
    <html:option value='<%= element.get("value").toString() %>'>
      <bean:write name="element" property="label"/>
    </html:option>
  </logic:iterate>
</html:select>

and can be replaced with:

<html:select property="value">
  <html:optionsCollection name="collection" label="label" value="value"/>
</html:select>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to