Hello Muhammad, I hope that you are using custom tags for this.
I would create a new custom tag to determine if the rule is present in the collection... <rule:RulePresent rule="ruleKey"> display table x </rule:RulePresent> This tag would then look in the collection for the specific rule, not by iterating through the collection but by trying to retrieve the rule by its key. I would suggest using a key/value mapping collection, do the look up on the key collection.containsKey(ruleKey) if true then display the tag body, if false then skip the tag body. Hope this helps. John --- Muhammad Momin Rashid <[EMAIL PROTECTED]> wrote: > Hello All, > > I have a scenario in which I need to display (or not > display) differnt parts > of a jsp page depending on rules defined in a > collection in scope. > > I was wondering what is the best way to accomplish > this? All the rules > defined in a collection, and the decision is made on > the basis of if a rule > is present in the collection or not. The following > approach seems messy to > me, so i was wondering if anyone can enlighten me > with a better way to > accomplish this > > iterate through collection > if rule x is present > display x table > end if > end iterate > > iterate through collection > if rule y is present > display y table > end if > end iterate > > A sample code snippit would be highly apprecated, > Thanks for your time. > > Regards, > Muhammad Momin Rashid. > > > > > --------------------------------------------------------------------- > 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]