Hey Werner,
a short hack follows.
Hope that helps.
Enumeration enum = something;
public String getFoo(int index)
{
if (enum.hasMoreElements())
{
return (String)enum.nextElement();
}
else
{
return null;
}
}
bye Roland
-----Urspr�ngliche Nachricht-----
Von: Werner Hennrich [mailto:[EMAIL PROTECTED]]
Gesendet am: Mittwoch, 3. M�rz 1999 10:48
An: [EMAIL PROTECTED]
Betreff: <LOOP> on Enumeration
Hi,
I may be blind, but...
Is there really no way to have a <LOOP> work on an Enumeration
rather then on a mulivalued propperty ?
An Enumeration works with the hasMoreElements() and nextElement() methods,
so the entire ResultSet doesn't have to be wrapped in an arry in advance.
For a lot of situations I would really prefer that scenario.
I wonder why they haven't put that into JSP. Or is there a simple and cheap
way to achive the same via 'String[] getFoo()' or 'String getFoo(int)'? I
don't think so. Well, one could fake the Enumeration's iterative aproach
into 'String getFoo(int)' and check that 'int' is strictly incemented by 1
for every call, but who would consider this good design (since it pretends
to be a different thing and imposes an invisible restriction on the way it
can be used)?
Thanks & bye
Werner
===========================================================================
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".