Hi Thomas, On May 18, 2009, at 5:53 PM, Thomas Eveilleau wrote:
Hello guys,
I'm developing my first application in syntax 2 for a customer. I started on a 1.8.2 XE and just moved on a 1.8 Snapshot (the latest build - 05/16).
Here is my problem : I have a little #if in a #foreach that works on my 1.8.2 but not on my 1.8 Snapshot and I totally don't know why.
#set($tradliste = $doc.getObjects("RimayCode.Traduction")) #foreach($traduc in $tradliste) #if($!traduc.langue == "Francais") $!traduc.langue : $!traduc.traduction <br /> #end #end
On my 1.8.2 the "foreach" returns all the objects with the good values, and the "if" is a filter to display the items with a "Francais" value in the "langue" field. On my 1.8 Snapshot the "foreach" returns all the objects with the good values, but the "if" doesn't work : not any result.
There is probably a pb, something new to do to create a test like this but I can't see what...
"langue" is a static list with 4 options (1=Francais|2=Tibetain|3=...)
Any idea ?
This is strange. We haven't changed the velocity version or our velocity code. Are you sure you didn't change anything else? Like "Francais" to "Français" for ex, or a white space added before the F or after the "s"? Can you print the value of $traduc.langue before the if to see what gets printed? Thanks -Vincent