Filter the List before sent to jsp, can you do it? or you must do it in
jsp?

you can implement your own custom tag extending iterate.


Other solution is to define a variable in jsp with c:set when you found
and item, and only print when variable isn't set or false.

Take a look to jstl common tags.


El dom, 14 de 05 de 2006 a las 18:49, J Gotsch escribió:

> I guess my problem is larger than using an if/else statement. I figured how 
> to do that, but I'm iterating over a List in the JSP, and want to be able to 
> exit the loop whenever certain item exist. I don't suppose there's a way to 
> do that, is there?
>    
>   My requirement in a nutshell: the List could have role1, role2, and role3. 
> But I can only print one role on the screen. If the list has multiple roles, 
> then my loop will show all of them. I want to be able to exit the loop after 
> I find the role that I'm looking for. 
>    
>    
>    
>   Philihp Busby <[EMAIL PROTECTED]> wrote:
>   Jerome is referring to tags in the JSTL Core tag library.
> 
> 
> 
> 
> 
> 
> 
> 
> mmm code-bloat.
> 
> On 5/14/06, J Gotsch wrote:
> > Which package does this belong to? I can't find it anywhere.
> >
> > Jerome Gagner 
> wrote:
> > use
> >
> > On 5/13/06, J Gotsch wrote:
> > > Hello All,
> > >
> > > How do I perform an If/else with ?
> > >
> > > In the below logic:iterate tag, If my collection contains both ROLE1 AND 
> > > ROLE2, Then both statements will be displayed. And that's now what I want.
> > >
> > > I want to implement something like this:
> > >
> > > if(securityRoleName.equals("ROLE1"))
> > > // print You have ROLE1 !
> > > else if (securityRoleName.equals("ROLE1"))
> > > //print You have ROLE2 !
> > > else
> > > //print you have NO ROLE!
> > >
> > > This is what I have now:
> > >
> > > > property="xyz" scope="session">
> > >
> > > > property="securityRoleName" value="ROLE1">
> > > You have ROLE1 !
> > >
> > > > property="securityRoleName" value="ROLE2">
> > > You have ROLE1 !
> > >
> > > > property="securityRoleName">
> > > You have no ROLE!
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > > Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! 
> > > Messenger with Voice.
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > ---------------------------------
> > Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 
> > 2¢/min with Yahoo! Messenger with Voice.
> >
> 
> 
>               
> ---------------------------------
> Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2¢/min 
> with Yahoo! Messenger with Voice.

-- 
;-)
____________________________________
Jorge Martin Cuervo
Analista Programador

Outsourcing Emarketplace
deFacto Powered by Standards

email <[EMAIL PROTECTED]>
voz +34 985 129 820
voz +34 660 026 384
____________________________________

Reply via email to