how would 'if' help with 'next'.  can you please give an example?

On Sun, May 31, 2009 at 12:58 AM, Musachy Barroso <musa...@gmail.com> wrote:

> duh..I sometimes read the whole email, believe me :). I have had a
> couple of scenarios where break would be nice, but I always go around
> it using "if", same thing for "next", just more often.
>
> musachy
>
> On Sat, May 30, 2009 at 8:10 PM, Bhaarat Sharma <bhaara...@gmail.com>
> wrote:
> > Musachy,
> >
> > I think you have the wrong impression.
> >
> > This is not a 'break' tag...this would work same as in iterator tag BUT
> > would also have a functionality where the user can go to the next element
> > within the iteration.
> >
> > Thanks
> >
> > On Sat, May 30, 2009 at 11:46 AM, Musachy Barroso <musa...@gmail.com>
> wrote:
> >
> >> I will take a look at it when I have a chance, this would be very easy
> >> to implement.
> >>
> >> musachy
> >>
> >> On Sat, May 30, 2009 at 11:45 AM, Musachy Barroso <musa...@gmail.com>
> >> wrote:
> >> > I would suggest you to write a new tag, as a patch to struts core
> >> > (look at the other tags, all you need is 2 classes and a couple of
> >> > annotations). What this "break" tag would need to do is find the
> >> > parent "iterator" tag, and somehow let it know that the iteration is
> >> > over.
> >> >
> >> > musachy
> >> >
> >> > On Sat, May 30, 2009 at 10:51 AM, Martin Gainty <mgai...@hotmail.com>
> >> wrote:
> >> >>
> >> >> Bharaat
> >> >>
> >> >> did you get a change to read musachy's tag developer guide
> >> >> http://struts.apache.org/2.0.14/docs/tag-developers-guide.html
> >> >>
> >> >> ?
> >> >> Martin Gainty
> >> >> ______________________________________________
> >> >> Verzicht und Vertraulichkeitanmerkung/Note de déni et de
> confidentialité
> >> >>
> >> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
> unbefugte
> >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
> Nachricht
> >> dient lediglich dem Austausch von Informationen und entfaltet keine
> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> >> >> Ce message est confidentiel et peut être privilégié. Si vous n'êtes
> pas
> >> le destinataire prévu, nous te demandons avec bonté que pour satisfaire
> >> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie
> >> de ceci est interdite. Ce message sert à l'information seulement et
> n'aura
> >> pas n'importe quel effet légalement obligatoire. Étant donné que les
> email
> >> peuvent facilement être sujets à la manipulation, nous ne pouvons
> accepter
> >> aucune responsabilité pour le contenu fourni.
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>> Date: Sat, 30 May 2009 08:51:17 -0400
> >> >>> Subject: Re: why doesnt iterator tag provide 'next'
> >> >>> From: bhaara...@gmail.com
> >> >>> To: user@struts.apache.org
> >> >>>
> >> >>> I actually would like to make a custom tag out of this as I think it
> >> might
> >> >>> be helpful to others as well.  However, I cant find any good
> >> documentation
> >> >>> on how to create one.  I have 'Struts2 web 2.0 projects' book by Ian
> >> Roughly
> >> >>> and it does not show how to create your own custom tags.
> >> >>>
> >> >>> I believe If I were to create a custom tag for this I will take most
> of
> >> the
> >> >>> code from the iterator tag and just add a few bits to it?
> >> >>>
> >> >>> Can someone please just exaplain some steps that are involved in
> making
> >> a
> >> >>> custom tag?
> >> >>>
> >> >>> Thanks
> >> >>> -bhaarat
> >> >>>
> >> >>> On Sat, May 30, 2009 at 8:00 AM, Martin Gainty <mgai...@hotmail.com
> >
> >> wrote:
> >> >>>
> >> >>> >
> >> >>> > Good Morning Bharaat
> >> >>> >
> >> >>> > struts tags have an extensible design which can be expanded for
> >> future
> >> >>> > requirements
> >> >>> > can you suggest a testcase to implement this functionality?
> >> >>> >
> >> >>> > thanks,
> >> >>> > Martin Gainty
> >> >>> > ______________________________________________
> >> >>> > Verzicht und Vertraulichkeitanmerkung/Note de déni et de
> >> confidentialité
> >> >>> >
> >> >>> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> >> >>> > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
> >> unbefugte
> >> >>> > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
> >> Nachricht
> >> >>> > dient lediglich dem Austausch von Informationen und entfaltet
> keine
> >> >>> > rechtliche Bindungswirkung. Aufgrund der leichten
> Manipulierbarkeit
> >> von
> >> >>> > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> >> >>> > Ce message est confidentiel et peut être privilégié. Si vous
> n'êtes
> >> pas le
> >> >>> > destinataire prévu, nous te demandons avec bonté que pour
> satisfaire
> >> >>> > informez l'expéditeur. N'importe quelle diffusion non autorisée ou
> la
> >> copie
> >> >>> > de ceci est interdite. Ce message sert à l'information seulement
> et
> >> n'aura
> >> >>> > pas n'importe quel effet légalement obligatoire. Étant donné que
> les
> >> email
> >> >>> > peuvent facilement être sujets à la manipulation, nous ne pouvons
> >> accepter
> >> >>> > aucune responsabilité pour le contenu fourni.
> >> >>> >
> >> >>> >
> >> >>> >
> >> >>> >
> >> >>> > > Date: Sat, 30 May 2009 00:25:16 -0400
> >> >>> > > From: newton.d...@yahoo.com
> >> >>> > > To: user@struts.apache.org
> >> >>> > > Subject: Re: why doesnt iterator tag provide 'next'
> >> >>> > >
> >> >>> > > Bhaarat Sharma wrote:
> >> >>> > > > Iterator it = myList.iterator()
> >> >>> > > > while (it.hasNext()) {
> >> >>> > > >     SomeClass ob1 = (SomeClass) it.next();
> >> >>> > > >     SomeClass ob2 = (SomeClass) it.next();
> >> >>> > > >     //do something
> >> >>> > > > }
> >> >>> > > >
> >> >>> > > > why can we not achieve the same with s:iterator tag.
> >> >>> > > > What was the reasoning behind not providing a 'next' or
> something
> >> >>> > similar?
> >> >>> > >
> >> >>> > > Because it's a simple iterator, just like Java's for (Type var :
> >> >>> > > collection) construct or JSTL's forEach tag.
> >> >>> > >
> >> >>> > > Dave
> >> >>> > >
> >> >>> > >
> >> ---------------------------------------------------------------------
> >> >>> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> >>> > > For additional commands, e-mail: user-h...@struts.apache.org
> >> >>> > >
> >> >>> >
> >> >>> > _________________________________________________________________
> >> >>> > Insert movie times and more without leaving Hotmail®.
> >> >>> >
> >> >>> >
> >>
> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
> >> >>> >
> >> >>
> >> >> _________________________________________________________________
> >> >> Insert movie times and more without leaving Hotmail®.
> >> >>
> >>
> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
> >> >
> >> >
> >> >
> >> > --
> >> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >> >
> >>
> >>
> >>
> >> --
> >> "Hey you! Would you help me to carry the stone?" Pink Floyd
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to