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

Key: OGNL-17
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jesse Kuhnert
Reporter: Jesse Kuhnert
Votes: 2
Watchers: 1
Operations

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

OR expression compile error

Created: 20/Mar/07 05:45 PM   Updated: 22/Mar/07 11:00 PM
Component/s: ExpressionCompiler
Affects Version/s: 2.7
Fix Version/s: 2.7

File Attachments: 1. HTML File app.html (72 kb)

Environment: tapestry


 Description  « Hide
Sorry for the wording,

Under artificial property I ment a property that is not appearing in
the component/page class as normal or abstract getter/setter.
Artificial property - property declared in the .jwc or .page files.
For example you might have a component called Basket
You will have a Basket.java -

public abstract class BasketComponent extends BaseComponent {

 public abstract boolean isProperty();

}

Then you will have a component descriptor

Basket.jwc

<component .... ... ... class="... ... BasketComponent">

<property name="property"/>

<property name="artificialProperty" initial-value="false"/>

</component>

As you can see component has two properties "property" and
"artificial". One of them appears in the java class as abstract
getter, another one do not appear anywhere except component
specification, however component specification may contain a OGNL
expression with all it's properties:
In this case "property || artificialProperty" which brings the error.

Links to the source code:

Java class: http://bookie.googlecode.com/svn/trunk/bookie-web/src/main/java/org/bookie/web/components/TabPanel.java
JWC descriptor:
http://bookie.googlecode.com/svn/trunk/bookie-web/src/main/webapp/WEB-INF/TabPanel.jwc

Error appearing in:

 <component id="link" type="DirectLink">
   <binding name="listener" value="listener:doClick"/>
   <binding name="parameters" value="blockId"/>
   <binding name="disabled" value="ognl: tabSelected || readonly"/>
   <binding name="async" value="ognl: !(tabSelected || readonly)"/>
 </component>

When evaluating

"ognl: tabSelected || readonly"

 All   Comments   Change History      Sort Order:

Igor Drobiazko - [21/Mar/07 07:28 AM ]
Attached html file containing exception description.

Jesse Kuhnert - [22/Mar/07 11:00 PM ]
I'm not even going to try to explaining how it's fixed...It's fixed.