what is your schema look like? also, i noticed that you <tr> should be outside of inner #if #end block. this may cause problem in you displayed
result as well. do a view source in you browser to see if the syntax is correct.
>>> #foreach ($entry in $entries)
>>> <tr>
>>> #if($entry.A == 3)
>>> #entryCell ($entry.Id)
>>> #entryCell ($entry.A)
>>> #entryCell ($entry.B)
>>> #entryCell ($entry.C)
>>> </tr>
>>> #end
>>> #end
>>>
Eigen Technology Pty Ltd wrote:
Thanks, I tried your method, but I got the same result, i.e B is working, A and C do not work. I tried to swap A and B in the database, again, only the new B worked, A still does not work. Help would appreciated.best wishes michaelall of your A, B, and C are in fact Integer, the java Object, so try #if ($entry.A.intValue() == 3) .... #end Eigen Technology Pty Ltd wrote:Dear all, I have the following expression in one of my Velocity file: #foreach ($entry in $entries) <tr> #if($entry.A == 3) #entryCell ($entry.Id) #entryCell ($entry.A) #entryCell ($entry.B) #entryCell ($entry.C) </tr> #end #end the comparison expression only works for $entry.B, neither $entry.A nor $entry.C work, i.e. A and C return no result. All A, B and C are int. I have tried to compare as number (3) and text ("3"), only getting the same result. What is limiting the expression? Would appreciate some hints. best wishes michael -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- Wei He, Ph.D. Email: [EMAIL PROTECTED] Voice: (845)359-5621 Fax: (845)359-1631 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
