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

Key: OGNL-16
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jesse Kuhnert
Reporter: Borut Bolčina
Votes: 0
Watchers: 1
Operations

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

Unable to parse OGNL expressio

Created: 20/Mar/07 02:29 AM   Updated: 27/Mar/07 06:57 AM
Component/s: ExpressionCompiler
Affects Version/s: 2.7
Fix Version/s: 2.7

File Attachments: None
Image Attachments:

1. ognl-16.jpg
(3.21 Mb)
Environment:
Tapestry 4.1.2-SNAPSHOT, Tacos 4.1.0-SNAPSHOT
dependencies: http://flickr.com/photo_zoom.gne?id=426708374&size=o


 Description  « Hide
Exception page:

Unable to parse OGNL expression 'offsetAttribute + ': ' +
(((contentProvider.hasChildren(value) ? 0 : 1) + treeIterator.depth) *
offset) + 'px;'': Error compiling expression on object
$Tree_8@6ce7781[SimpleTree/tree] with expression node offsetAttribute +
": " + (((contentProvider.hasChildren(value) ? 0 : 1) +
treeIterator.depth) * offset) + "px;" getter body: { return ($w)
((($Tree_8)$2).getOffsetAttribute() + ": " +
ognl.OgnlOps.booleanValue(((net.sf.tacos.model.ITreeContentProvider)(($Tree_8)$2).getContentProvider()).hasChildren((($Tree_8)$2).getValue()))
? 0 : 1 + .getTreeIterator().getDepth() * (($Tree_8)$2).getOffset() +
"px;");} setter body: null


syntax error near "0 : 1 + .getTreeIter"



### SimpleTree.html ###
<html>
<body>
<h1>Simple Tree</h1>
  <div jwcid="tree" id="tree" style="overflow: auto; width: auto; height: auto;">
   <span jwcid="@Insert" value="ognl:item.name"/>
</div>

</body>
</html>

### SimpleTree.page ###
<page-specification class="org.apache.tapestry.html.BasePage">
   <property name="item" />
   <component id="tree" type="tacos:Tree">
       <binding name="contentProvider" value="new com.acme.simpletree.SimpleTreeContentProvider()"/>
       <binding name="value" value="item"/>
       <binding name="nodeLinkAjax" value="ognl:false" />
   </component>
</page-specification>

### SimpleTreeContentProvider.java ###
### Folder.java ###
### Item.java ###
All three copied from Tacos-demo 4.0.1 sources.

 All   Comments   Change History      Sort Order:
Borut Bolčina - [20/Mar/07 02:37 AM ]
I just tried with T 4.1.1 and OGNL 2.6.9 and the above error doesn't occur - my Tree simple example works. So it must be 2.7 as you already know.

Thanks for quick response. Looking forward to a resolution of this bug.

Best,
Borut

Jesse Kuhnert - [23/Mar/07 12:33 PM ]
I believe this should be fixed in the release coming out today.

Borut Bolčina - [27/Mar/07 06:53 AM ]
I tried again. This time it fails with

 Unable to parse OGNL expression 'offsetAttribute + ': ' + (((contentProvider.hasChildren(value) ? 0 : 1) + treeIterator.depth) * offset) + 'px;'': Error compiling expression on object $Tree_61@6ce7781[Home/$Border.tree] with expression node offsetAttribute + ": " + (((contentProvider.hasChildren(value) ? 0 : 1) + treeIterator.depth) * offset) + "px;" getter body: { return ($w) (((($Tree_61)$2).getOffsetAttribute()) + (": ") + ((ognl.OgnlOps.booleanValue(((net.sf.tacos.model.ITreeContentProvider)(($Tree_61)$2).getContentProvider()).hasChildren((($Tree_61)$2).getValue())) ? 0 : 1) + (.getTreeIterator().getDepth()) * (($Tree_61)$2).getOffset()) + ("px;"));} setter body: null

syntax error near ": 1) + (.getTreeIter"

See attachment for full exception page.

Borut Bolčina - [27/Mar/07 06:57 AM ]
Screenshot of the error.