You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Borut Bolčina <bo...@najdi.si> on 2007/03/19 14:51:27 UTC
Unable to parse OGNL expression
I am trying to use Tacos 4.1 Tree component. I generated a skeleton
project with Tapestry 4 Maven archetype and copied SimpleTree files from
Tacos 4.0.1 sources. Any quick hints on the following error:
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"
Here are the dependencies
http://flickr.com/photo_zoom.gne?id=426708374&size=o
And some code:
### SimpleTree.html ###
<div jwcid="tree" id="tree" style="overflow: auto; width: auto; height:
auto;">
<span jwcid="@Insert" value="ognl:item.name"/>
</div>
### SimpleTree.page ###
<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>
### SimpleTreeContentProvider.java ###
### Folder.java ###
### Item.java ###
All three copied from Tacos-demo 4.0.1 sources.
Thanks,
Borut
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Unable to parse OGNL expression
Posted by Borut Bolčina <bo...@najdi.si>.
Filed under http://jira.opensymphony.com/browse/OGNL-16
On 20.3.2007 5:45, Jesse Kuhnert wrote:
> If you file an issue in http://jira.opensymphony.com/browse/OGNL I
> should be able to fix it tomorrow.
>
> On 3/19/07, Borut Bolčina <bo...@najdi.si> wrote:
>> I am trying to use Tacos 4.1 Tree component. I generated a skeleton
>> project with Tapestry 4 Maven archetype and copied SimpleTree files from
>> Tacos 4.0.1 sources. Any quick hints on the following error:
>>
>> 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"
>>
>> Here are the dependencies
>> http://flickr.com/photo_zoom.gne?id=426708374&size=o
>>
>> And some code:
>> ### SimpleTree.html ###
>> <div jwcid="tree" id="tree" style="overflow: auto; width: auto; height:
>> auto;">
>> <span jwcid="@Insert" value="ognl:item.name"/>
>> </div>
>>
>> ### SimpleTree.page ###
>> <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>
>>
>> ### SimpleTreeContentProvider.java ###
>> ### Folder.java ###
>> ### Item.java ###
>> All three copied from Tacos-demo 4.0.1 sources.
>>
>>
>> Thanks,
>> Borut
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
--
bbLOG <http://borutb.tuditi.delo.si/>
Re: Unable to parse OGNL expression
Posted by Jesse Kuhnert <jk...@gmail.com>.
If you file an issue in http://jira.opensymphony.com/browse/OGNL I
should be able to fix it tomorrow.
On 3/19/07, Borut Bolčina <bo...@najdi.si> wrote:
> I am trying to use Tacos 4.1 Tree component. I generated a skeleton
> project with Tapestry 4 Maven archetype and copied SimpleTree files from
> Tacos 4.0.1 sources. Any quick hints on the following error:
>
> 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"
>
> Here are the dependencies
> http://flickr.com/photo_zoom.gne?id=426708374&size=o
>
> And some code:
> ### SimpleTree.html ###
> <div jwcid="tree" id="tree" style="overflow: auto; width: auto; height:
> auto;">
> <span jwcid="@Insert" value="ognl:item.name"/>
> </div>
>
> ### SimpleTree.page ###
> <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>
>
> ### SimpleTreeContentProvider.java ###
> ### Folder.java ###
> ### Item.java ###
> All three copied from Tacos-demo 4.0.1 sources.
>
>
> Thanks,
> Borut
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tapestry/Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: Unable to parse OGNL expression (Tacos 4.1.0 & Tapestry 4.1.2)
Posted by Borut Bolčina <bo...@najdi.si>.
Well, I don't think I can make it much shorter:
### 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>
I started with
http://andyhot.di.uoa.gr/blojsom/blog/default/java/2006/08/17/Tapestry-Building-Trees-with-Tacos-and-Annotations.html?page=trackback
and had the same OGNL problem, therefore I tried with barebones project
(also Tacos 4.1.0-SNAPSHOT on Tapestry 4.1.2-SNAPSHOT).
-Borut
On 19.3.2007 15:55, Andrea Chiumenti wrote:
> Hi,
> beleave me, too much code into html template. Move it to your java,
> you'll
> be happy!
>
> kiuma
>
> On 3/19/07, Borut Bolčina <bo...@najdi.si> wrote:
>>
>> I am trying to use Tacos 4.1 Tree component. I generated a skeleton
>> project with Tapestry 4 Maven archetype and copied SimpleTree files from
>> Tacos 4.0.1 sources. Any quick hints on the following error:
>>
>> 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"
>>
>> Here are the dependencies
>> http://flickr.com/photo_zoom.gne?id=426708374&size=o
>>
>> And some code:
>> ### SimpleTree.html ###
>> <div jwcid="tree" id="tree" style="overflow: auto; width: auto; height:
>> auto;">
>> <span jwcid="@Insert" value="ognl:item.name"/>
>> </div>
>>
>> ### SimpleTree.page ###
>> <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>
>>
>> ### SimpleTreeContentProvider.java ###
>> ### Folder.java ###
>> ### Item.java ###
>> All three copied from Tacos-demo 4.0.1 sources.
>>
>>
>> Thanks,
>> Borut
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Unable to parse OGNL expression
Posted by Andrea Chiumenti <ki...@gmail.com>.
Hi,
beleave me, too much code into html template. Move it to your java, you'll
be happy!
kiuma
On 3/19/07, Borut Bolčina <bo...@najdi.si> wrote:
>
> I am trying to use Tacos 4.1 Tree component. I generated a skeleton
> project with Tapestry 4 Maven archetype and copied SimpleTree files from
> Tacos 4.0.1 sources. Any quick hints on the following error:
>
> 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"
>
> Here are the dependencies
> http://flickr.com/photo_zoom.gne?id=426708374&size=o
>
> And some code:
> ### SimpleTree.html ###
> <div jwcid="tree" id="tree" style="overflow: auto; width: auto; height:
> auto;">
> <span jwcid="@Insert" value="ognl:item.name"/>
> </div>
>
> ### SimpleTree.page ###
> <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>
>
> ### SimpleTreeContentProvider.java ###
> ### Folder.java ###
> ### Item.java ###
> All three copied from Tacos-demo 4.0.1 sources.
>
>
> Thanks,
> Borut
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>