PDA

View Full Version : Iterate through for loop in template with condition



pragati.rithekar
19 Sep 2013, 4:00 AM
Hello,

I have a List<String> through which I need to iterate using a template in Gxt.
If the List has "Error" option in it... I want to display it in red color.

I have tried the code below but it doesnt work

<tpl for='myList'>
<tpl if='{.} == &quot;Error&quot;'>
</tpl>
</tpl>

Please let me know a solution on this.

Waiting for a response..

Thanks,
Pragati

pragati.rithekar
3 Oct 2013, 11:29 PM
See below thread for answer

http://www.sencha.com/forum/showthread.php?272209-Iterate-through-for-loop-in-template-with-condition