Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

how to apply continue statement in struts logic:iterate tag

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends

Does anybody has any idea to apply continue statement in struts <logic:iterate> tag.
I need it in my application.

Thank You In Advance.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming that the "continue" is used in conjunction with a comparison

<logic:iterate>
<logic:equal>
This part will only be executed if the condition is true
</logic:equal>
else it will continue.
</logic:iterate>

You may use a logic tag ( equal, notequal, present ..) for the comparison.
Will this serve the purpose??
[ October 25, 2007: Message edited by: Ranjit Gopinathan ]
 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks For Reply Sir

But i think i need to explain my problem a little bit more.
Actually i am using nested <logic:iterate>.
Now what i want is that when the inner loop prints some value it should break it and continue with the next outer loop.
Here loops means logic iterate.
So what i should do now.
I need it very urgently.
Please help me.
 
Ranjit Gopinathan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the code. That way it will be easy for us to find the solution.

And call me Ranjit

Cheers
 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay Ranjit
Here is my code


I need to shift to outer loop when one of the conditions between logic equal or logic not equal occurs.
 
Ranjit Gopinathan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i understand the logic correctly , the second array list ( inner one ) need to be iterated only once, whatever be its size.Because equal or not equal the flow must exit that inner list.

In that case, instead of the array list, a simple bean can be used right?

Or else write a method in action form which will return the first object of the array List. get that bean and process it.
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should do all of that logic in your action class. It is a lot easier to do there and it is a lot easier to maintain.
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic