This is the error:

6:31:52 PM:  <jon> Tue Apr 24 18:30:47 PDT 2001  [error] Error in evaluation
of == expression. Both
6:31:52 PM:  <jon>  arguments must be of the same Class. Currently left =
class java.lang.Integer,
6:31:52 PM:  <jon> right = class org.apache.turbine.om.NumberKey.
screens/admin/AttributeShow.vm [l
6:31:52 PM:  <jon> ine 42, column 24] (ASTEQNode)

This is the VTL:

6:32:25 PM:  <jon> #set ($selectedId = -1)
6:32:25 PM:  <jon> #if ($selectedId == $attribute.AttributeId)

My comments:

It would be cool if Velocity would try to cast the RHS to the LHS or the
other way around and we could just document which side it tries to cast to
first...in other words, try to do this:

Notice that the LHS is an Integer...so:

    new Integer(NumberKey.toString())

And then do the comparison...

:-)

-jon

Reply via email to