Ouch. I can now see why your patch seems the only sensible solution.
Al.
----- Original Message -----
From: "Jeromy Evans" <[EMAIL PROTECTED]>
To: "Struts Developers List" <dev@struts.apache.org>
Sent: Thursday, January 31, 2008 10:03 AM
Subject: Re: [S2.1] Dojo plugin tree problem
Hi Al,
Yes, I agree. For instance, the patch only applies to AbstractRemoteBean
whereas the issue encroaches on Tree.java and probably others.
The issue is slightly bigger than just forgetting the head tag. It is
specifically that:
- the dojo tags now depends on a head tag writing to the page context; but
- in certain cases the head tag cannot be included within the context
available to the current tag
eg. If the tag is in a JSP loaded via XHR, the JSP fragment can't
contain -another- head tag so an NPE will occur when that fragment is
rendered
Al Sutton wrote:
Jeromy,
I like your solution, but I think a call needs to be made by the
developers who have been here longer (and therefore have a better view of
the big picture).
Either your patch should be applied, or a more friendly way of
automatically saying "You've forgotten the <:head> tag" needs to be
developed, because I believe the current situation creates an error which
is too obscure for the average developer to easily discover what the
problem is.
Anyone have any other thoughts?
Al.
----- Original Message ----- From: "Jeromy Evans"
<[EMAIL PROTECTED]>
To: "Struts Developers List" <dev@struts.apache.org>
Sent: Thursday, January 31, 2008 12:08 AM
Subject: Re: [S2.1] Dojo plugin tree problem
Al,
There is indeed a related bug, but the issue is only realized when the
head tag CANNOT be processed within the current page context.
(eg. within a fragment loaded via XHR)
https://issues.apache.org/struts/browse/WW-2398
regards,
Jeromy Evans
Musachy Barroso wrote:
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. I
also
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
which is;
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
of the
boolean causes the NPE.
Is there suppose to be a default set or have I missed a step which
would set
this up?
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]