iterate over one collection two times in a jsp

2003-12-05 Thread Ralf Rapude
Hi,
with a logic:iterate tag I run over a Collection:

logic:present name=%=Constants.SUBJECTS % scope=session 
  logic:iterate id=subjects name=%=Constants.SUBJECTS %
...output
  /logic:iterate
/logic:present

It works well but if I try to iterate over the same collection after
changing the id (but still in the same jsp):

logic:present name=%=Constants.SUBJECTS % scope=session 
  logic:iterate id=subjectsmain name=%=Constants.SUBJECTS %
... output
  /logic:iterate
/logic:present

I got this Exception - Cannot create iterator for this collection

It works if I put my collection under a different name in the
session-scope, but in my Opinion there must be a more proper way to
handle the problem.

Thanks a lot
Ralf




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



Re: iterate over one collection two times in a jsp

2003-12-05 Thread Gurpreet Dhanoa
hi Ralf

I am facing the same trouble. If u come to know the answer Please let me
know as well
Thanks in Advance
Gary
- Original Message -
From: Ralf Rapude [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 05, 2003 4:49 PM
Subject: iterate over one collection two times in a jsp


 Hi,
 with a logic:iterate tag I run over a Collection:

 logic:present name=%=Constants.SUBJECTS % scope=session 
   logic:iterate id=subjects name=%=Constants.SUBJECTS %
 ...output
   /logic:iterate
 /logic:present

 It works well but if I try to iterate over the same collection after
 changing the id (but still in the same jsp):

 logic:present name=%=Constants.SUBJECTS % scope=session 
   logic:iterate id=subjectsmain name=%=Constants.SUBJECTS %
 ... output
   /logic:iterate
 /logic:present

 I got this Exception - Cannot create iterator for this collection

 It works if I put my collection under a different name in the
 session-scope, but in my Opinion there must be a more proper way to
 handle the problem.

 Thanks a lot
 Ralf




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



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



Re: iterate over one collection two times in a jsp

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, Gurpreet Dhanoa wrote:

 hi Ralf

 I am facing the same trouble. If u come to know the answer Please let me
 know as well

Not sure if this helps, but I do this in several places on my app.
However, I use JSTL c:forEach tag.



 Thanks in Advance
 Gary
 - Original Message -
 From: Ralf Rapude [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 4:49 PM
 Subject: iterate over one collection two times in a jsp


  Hi,
  with a logic:iterate tag I run over a Collection:
 
  logic:present name=%=Constants.SUBJECTS % scope=session 
logic:iterate id=subjects name=%=Constants.SUBJECTS %
  ...output
/logic:iterate
  /logic:present
 
  It works well but if I try to iterate over the same collection after
  changing the id (but still in the same jsp):
 
  logic:present name=%=Constants.SUBJECTS % scope=session 
logic:iterate id=subjectsmain name=%=Constants.SUBJECTS %
  ... output
/logic:iterate
  /logic:present
 
  I got this Exception - Cannot create iterator for this collection
 
  It works if I put my collection under a different name in the
  session-scope, but in my Opinion there must be a more proper way to
  handle the problem.
 
  Thanks a lot
  Ralf
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


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



-- 
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org


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



Re: iterate over one collection two times in a jsp

2003-12-05 Thread Lynn Guy
I've done this and I just repeat exactly the same iterate with different output and it 
works fine.

Gurpreet Dhanoa [EMAIL PROTECTED] wrote:hi Ralf

I am facing the same trouble. If u come to know the answer Please let me
know as well
Thanks in Advance
Gary
- Original Message -
From: Ralf Rapude 
To: 
Sent: Friday, December 05, 2003 4:49 PM
Subject: iterate over one collection two times in a jsp


 Hi,
 with a logic:iterate tag I run over a Collection:

  scope=session
 
 ...output
 
 

 It works well but if I try to iterate over the same collection after
 changing the id (but still in the same jsp):

  scope=session
 
 ... output
 
 

 I got this Exception - Cannot create iterator for this collection

 It works if I put my collection under a different name in the
 session-scope, but in my Opinion there must be a more proper way to
 handle the problem.

 Thanks a lot
 Ralf




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



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



RE: iterate over a collection

2003-11-02 Thread Seyhan BASMACI (Internet Yazilimlari Yetkilisi)

The Vector container was adapted so that it could fit as a Collection and a List.
Keep in mind though, that the Vector container WAS NOT improved 
in the new Java 2 container libraries, but rather included only to support pre-Java 
2 code. 

you should not use vector class, vector is a legacy class for java 2 container,
try with ArrayList, also ArrayList is a bit faster than Vector and is not thread safe,


-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:25 PM
To: [EMAIL PROTECTED]
Subject: iterate over a collection


hi!
can someone tell me whats wrong with this?
I am placing a vector of TransactionBean in session as
session.setAttribute(resVector, resVector);
i then place an empty TransactionBean in session scope as well
TransactionBean tb = new TransactionBean();
session.setAttribute(transactionBean, tb);

in my jsp i have a logic:iterate tag that goes
logic:iterate collection=resVector id=tb
//print bean values
/logic:iterate
this gives me an error saying, it cant iterate over this type of collection.

could someone help and tell me what i am doing wrong

thanks
Ajay

_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp


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


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



iterate over a collection

2003-10-29 Thread ajay brar
hi!
can someone tell me whats wrong with this?
I am placing a vector of TransactionBean in session as
session.setAttribute(resVector, resVector);
i then place an empty TransactionBean in session scope as well
TransactionBean tb = new TransactionBean();
session.setAttribute(transactionBean, tb);
in my jsp i have a logic:iterate tag that goes
logic:iterate collection=resVector id=tb
//print bean values
/logic:iterate
this gives me an error saying, it cant iterate over this type of collection.
could someone help and tell me what i am doing wrong

thanks
Ajay
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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


RE: iterate over a collection

2003-10-29 Thread shishir.katdare
Instead of Vector try using the ArrayList.

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: 29 October 2003 13:25
To: [EMAIL PROTECTED]
Subject: iterate over a collection


hi!
can someone tell me whats wrong with this?
I am placing a vector of TransactionBean in session as
session.setAttribute(resVector, resVector);
i then place an empty TransactionBean in session scope as well
TransactionBean tb = new TransactionBean();
session.setAttribute(transactionBean, tb);

in my jsp i have a logic:iterate tag that goes
logic:iterate collection=resVector id=tb
//print bean values
/logic:iterate
this gives me an error saying, it cant iterate over this type of collection.

could someone help and tell me what i am doing wrong

thanks
Ajay

_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp


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


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



RE: iterate over a collection

2003-10-29 Thread ajay brar
hi!
should it matter, they both implement the Collection interface and thats 
what is really required here.

cheers
ajay

From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: iterate over a collection
Date: Wed, 29 Oct 2003 13:26:32 -
Instead of Vector try using the ArrayList.

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: 29 October 2003 13:25
To: [EMAIL PROTECTED]
Subject: iterate over a collection
hi!
can someone tell me whats wrong with this?
I am placing a vector of TransactionBean in session as
session.setAttribute(resVector, resVector);
i then place an empty TransactionBean in session scope as well
TransactionBean tb = new TransactionBean();
session.setAttribute(transactionBean, tb);
in my jsp i have a logic:iterate tag that goes
logic:iterate collection=resVector id=tb
//print bean values
/logic:iterate
this gives me an error saying, it cant iterate over this type of 
collection.

could someone help and tell me what i am doing wrong

thanks
Ajay
_
Hot chart ringtones and polyphonics. Go to
http://ninemsn.com.au/mobilemania/default.asp
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Hot chart ringtones and polyphonics. Go to  
http://ninemsn.com.au/mobilemania/default.asp

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