struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From victor sosa <victorns...@gmail.com>
Subject Re: Problem developing a tag using Struts 2 Arch for Tags
Date Tue, 04 Dec 2007 11:14:45 GMT

Sorry about the while is just a code for test, because I don't know exactly
how S2 work for the iterator tag. I am aware about the code ;) 

Yes, I did see the S2 iterator tag, I see that there isn't any while or for
into the code, I suppose that the code repeat using the return of the
method. but How to uses it? I try twice but the code never iterate using the
return value of the #start() and #end() method


newton.dave wrote:
> 
> Well, you call "iterateOverItems" which has the
> following code:
> 
>> while (iterator.hasNext()){
>>     Object currentItem = iterator.next();
>>     valueStack.push(currentItem);
>>     LOG.debug("item: " + currentItem);
>> }
> 
> That just loops over the collection and pushes each
> onto the stack; I guess I'm not sure what you expected
> that code to do.
> 
> Did you look at the code for the S2 iterator tag? That
> would probably give you a hint about how to accomplish
> what you want.
> 
> Here's a hint: don't iterate over the entire
> collection at once. "start" begins the iteration.
> "end" sees if there's more to iterate over.
> 
> d.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-developing-a-tag-using-Struts-2-Arch-for-Tags-tf4939292.html#a14148747
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message