History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OGNL-35
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Jesse Kuhnert
Reporter: Marco Valverde
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OGNL

CLONE -expression concatenated via "and" / "&&" is not evaluated correctly

Created: 02/Apr/07 07:04 AM   Updated: 07/Apr/07 05:13 PM
Component/s: ExpressionCompiler
Affects Version/s: 2.7
Fix Version/s: 2.7

Environment: tapestry


 Description  « Hide
having a condition like:

condition="ognl:condition1 && condition2"

condition2 gets evaluatated, even if condition1 returns false
in version 2.6.9 it worked correctly

the manual says explicitly:
e1 && e2, e1 and e2
getValue is called on e1 and the result is interpreted as a boolean. If false, that result is returned; if true, getValue is called on e2 and its value is returned.

 All   Comments   Change History      Sort Order:
Marco Valverde - [02/Apr/07 07:06 AM ]
sorry, did not find a way to reopen the original issue, but this isn't solved!

Ben Dotte - [02/Apr/07 10:41 AM ]
I hit this one as well. It is a particular problem when you need the expression to short-circuit to avoid getting a stack trace from the 2nd expression getting evaluated. For example:

<showCrumbs jwcid="@If" condition="ognl:categoryId != null && ancestors.size > 1">

getAncestors() depends on the fact that getCategoryId() is not null. This one worked in OGNL 2.6, it throws an exception in 2.7.