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 <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]