OK, it would appear that if any node in the tree has a null for the value of
the child property the following error is reported by FreeMarker;
Expression stack.findValue(parameters.childCollectionProperty.toString()) is
undefined on line 24, column 8 in template/ajax/treenode-include.ftl.
The problematic instruction:
----------
==> list stack.findValue(parameters.childCollectionProperty.toString()) as
child [on line 24, column 1 in template/ajax/treenode-include.ftl]
in include "/${parameters.templateDir}/ajax/treenode-include.ftl" [on line
26, column 5 in template/ajax/treenode-include.ftl]
in include "/${parameters.templateDir}/ajax/treenode-include.ftl" [on line
26, column 5 in template/ajax/treenode-include.ftl]
in include "/${parameters.templateDir}/ajax/treenode-include.ftl" [on line
124, column 5 in template/ajax/tree.ftl]
----------
which in turn was causing the problem with Sitemesh I was seeing.
Now here's the question; Are we going to allow users to represent leaf nodes
in the tree by having a null for the child property, or are we going to say
that all nodes must return a valid instance of a java.util.Collection when
the child property is fetched?
Al.
----- Original Message -----
From: "Al Sutton" <[EMAIL PROTECTED]>
To: "Struts Developers List" <dev@struts.apache.org>
Sent: Wednesday, January 30, 2008 7:07 PM
Subject: Re: [S2.1] Dojo plugin tree problem
Bingo :).
Now I've got to work out why I'm getting the following error in sitemesh;
java.lang.ArrayIndexOutOfBoundsException: -1
com.opensymphony.module.sitemesh.html.HTMLProcessor$1.currentBuffer(HTMLProcessor.java:74)
com.opensymphony.module.sitemesh.html.State.handleText(State.java:64)
com.opensymphony.module.sitemesh.html.HTMLProcessor$2.text(HTMLProcessor.java:103)
com.opensymphony.module.sitemesh.html.tokenizer.Parser.parsedText(Parser.java:295)
com.opensymphony.module.sitemesh.html.tokenizer.Parser.parseTag(Parser.java:160)
com.opensymphony.module.sitemesh.html.tokenizer.Parser.start(Parser.java:112)
com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer.start(TagTokenizer.java:33)
com.opensymphony.module.sitemesh.html.HTMLProcessor.process(HTMLProcessor.java:90)
com.opensymphony.module.sitemesh.parser.HTMLPageParser.parse(HTMLPageParser.java:52)
com.opensymphony.module.sitemesh.filter.Buffer.parse(Buffer.java:49)
com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getPage(PageResponseWrapper.java:165)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:12
4)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:96)-----
Original Message -----From: "Musachy Barroso" <[EMAIL PROTECTED]>To:
"Struts Developers List" <dev@struts.apache.org>Sent: Wednesday, January
30, 2008 6:48 PMSubject: Re: [S2.1] Dojo plugin tree problem> you are
missing sd:head on the page.>> musachy>> On Jan 30, 2008 12:50 PM, Al
Sutton <[EMAIL PROTECTED]> wrote:>> I think I've found a problem in
the dojo plugin but I'd like someone to>> double check I'm not doing
anything whacky before raising a JIRA ticket.>>>> I've got a webapp with
the latest snapshots of core and dojo plugin. Ialso>> have a jsp with;>>>>
<[EMAIL PROTECTED] prefix="sd" uri="/struts-dojo-tags"%>>> ....>>>> <sd:tree
id="objectTree">> rootNode="%{#session.objectTree}">>
nodeIdProperty="id">> nodeTitleProperty="name">>
childCollectionProperty="children"/>>>>> When I try to load the page I get
an NPE on line 257 of Tree.java whichis;>>>> boolean generateId
=>> !(Boolean)stack.getContext().get(Head.PARSE_CONTENT);>>>>>> from what
I can tell stack.getContext().get(Head.PARSE_CONTENT) returns a>> null
instead of a default value, and thus the !..... with autoboxing ofthe>>
boolean causes the NPE.>>>> Is there suppose to be a default set or have I
missed a step which wouldset>> this
up?>>>>>> --------------------------------------------------------------------->>
To unsubscribe, e-mail: [EMAIL PROTECTED]>> For additional
commands, e-mail: [EMAIL PROTECTED]>>>>>>>> --> "Hey you! Would
you help me to carry the stone?" Pink
Floyd>> --------------------------------------------------------------------->
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]