That sucks! Can you open a bug with us and I'll
then pester Drew Davidson to fix it :)
----- Original Message -----
Sent: Friday, October 03, 2003 3:19
AM
Subject: [OS-webwork] OGNL wrapping
iterators?
I have just tried to use the Counter bean class
(which implements Iterator) from WW1 like so:
<ww:bean name="com.myorg.myapp.util.Counter">
<ww:param name="first" value="'1'"/>
<ww:param name="last" value="'9'"/>
<ww:iterator value="that">
<option value="<ww:property value="current"/>"><ww:property
value="current"/></option>
</ww:iterator>
</ww:bean>
I get this
error:
"org.apache.jasper.JasperException: can't set property first on
Iterator"
which I have traced to being thrown from OGNL
during the set operation. When I remove the Iterator interface from the
Counter bean and recompile OGNL sets the property fine. It appears that
OGNL does not allow you to set properties on objects that implement
Iterator. Maybe OGNL wraps Iterators in order to give them extra
functionality but in the process hides the original obejct.
John.
|