While developmening, I stumbled across an unexpected situation with respect
to nested properties. After thinking about it, the behavior is probably
correct but I though I'd toss it out discussion anyway.
I have a bean with a method getResults() that returns a Vector.
class MyBean
{
...
public Vector getResults() { ... return( vec ); }
....
}
The vector returned contains objects, all of the type CustomerInfo. The
CustomerInfo class has a method getCustomerId() which returns an integer.
class CustomerInfo
{
...
public int getCustomerId() { return( this.id ); }
...
}
The JSP code that caused me problems is this:
<USEBEAN NAME="MyBean:bean">
...
</USEBEAN>
[snip]
<LOOP PROPERTY="bean:Results" PROPERTY="x">
<li><DISPLAY PROPERTY="x:CustomerId"></li>
</LOOP>
My naive belief was that the CustomerId property value of object "x" would
be (magically -> introspection) retreived. This didn't happen. [you may
laugh now]
Upon review, my Bean class should return an array, not a Vector. Obscure
notes in the 0.92 spec confirm this.
I submit that the spec should specifically address looping when using
generic containers with the <LOOP> tag.
-Fred
Ready. Fire! Aim.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".