Re: Problem with loading Tree2 resource (20050725 build)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Problem with loading Tree2 resource (20050725 build)

schof-2
OK I saw that message yesterday when working on a tree2 enhancement.
I changed the bitmask code yesterday to address MYFACES-350 (see JIRA
for details.)

If you have time to help me debug this, take a look at the source for
HtmlTreeRenderer.  The bit mask is derived in the encodeNavigation
method.  Here's the diff of the change I made:

--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java
(original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java
Mon Jul 25 13:20:02 2005
@@ -384,7 +384,7 @@
        UIComponent nodeImgFacet = null;

        int bitMask = NOTHING;
-        bitMask += (node.getChildCount()>0) ? CHILDREN : NOTHING;
+        bitMask += (node.isLeaf()) ? NOTHING : CHILDREN;
        bitMask += (tree.isNodeExpanded()) ? EXPANDED : NOTHING;
        bitMask += (tree.isLastChild(tree.getNodeId())) ? LAST : NOTHING;
        bitMask += (showLines) ? LINES : NOTHING;

Are you using a custom implementation of TreeNode or are you using
TreeNodeBase?  If you are using your own implementation, perhaps the
isLeaf() method is not working ...

sean

btw, your email address is bouncing, everytime I respond to you and
the list I get undeliverable

On 7/26/05, Emmanuel Jay <[hidden email]> wrote:

> yep they do work and I am really puzzled as to why my app doesn't work...
>  I have realized that after expanding the tree and selecting a command link
> node I get the following:
>  
>  javax.faces.FacesException: Invalid bit mask of 14
>          at
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
>          at
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:226)
>          at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:299)
>          at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
>          at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>          at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>          at
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
>          at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>          at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>          at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
>          at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>          at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>          at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>          at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>          at
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
>          at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
>          at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
>          at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>          at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>          at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>          at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>          at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>          at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>          at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>          at
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
>          at java.lang.Thread.run(Thread.java:595)
>  Caused by: org.apache.jasper.JasperException: Invalid bit
> mask of 14
>          at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
>          at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>          at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>          at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>          at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>          at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>          at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
>          at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
>          at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
>          at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>          at
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
>          ... 25 more
>
>  
>
> On 7/26/05, Sean Schofield <[hidden email]> wrote:
> > Have you tried the tree2 examples in the simple webap?  I'm assuming
> > they are working but maybe you should double check those to make sure
> > they still work.
> >
> > sean
> >
> > On 7/26/05, Emmanuel Jay < [hidden email]> wrote:
> > > Hi,
> > >
> > >  I have just updated to yesterdays (20050725) nightly build (from 1.0.9)
> and
> > > I get the following error on tree2. My extension filter settings haven't
> > > changed so I don't really understand why I get that all the sudden... It
> is
> > > a little weird as some of the resource images used by the script are
> loaded
> > > (all the line images seems ok) and some aren't (all the nav are not
> > > there)... I get that error when clicking on the link for the expand
> image
> > > (the image is not there through). My facets contains a panelgroup with
> 2
> > > commandlink children.
> > >
> > >  Any suggestions?
> > >
> > >  Emmanuel
> > >
> > >  java.io.IOException: Unable to find resource images/null for component
> > > tree2.HtmlTreeRenderer. Check that this file is available in the
> classpath
> > > in sub-directory /resource of the component-directory.
> > >          at
> > >
> org.apache.myfaces.component.html.util.AddResource.serveResource(AddResource.java:248)
> > >          at
> > >
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java
> :98)
> > >          at
> > >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > >          at
> > >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
> :173)
> > >          at
> > >
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
> > >          at
> > >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
> :202)
> > >          at
> > >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > >          at
> > >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
> :213)
> > >          at
> > >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> > >          at
> > >
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java
> :39)
> > >          at
> > >
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
> > >          at
> > >
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java
> :59)
> > >          at
> > >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> > >          at
> > >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> > >          at
> > >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> > >          at
> > >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> > >          at
> > >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> > >          at
> > >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> > >          at
> > >
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > >          at
> > >
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
> > >          at java.lang.Thread.run(Thread.java:595)
> > >
> > >
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with loading Tree2 resource (20050725 build)

Emmanuel Jay
I have changed my return-to email now so it should be ok...

I'll have a look at the code you changed.
However I do use my own implementation (it is very very simple atm) that
subclass TreeNodeBase but do not override isLeaf, so it should be fine...

Emmanuel

>>>
OK I saw that message yesterday when working on a tree2 enhancement.
I changed the bitmask code yesterday to address MYFACES-350 (see JIRA
for details.)

If you have time to help me debug this, take a look at the source for
HtmlTreeRenderer. The bit mask is derived in the encodeNavigation
method. Here's the diff of the change I made:

---
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java
(original)
+++
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/tree2/HtmlTreeRenderer.java
Mon Jul 25 13:20:02 2005
@@ -384,7 +384,7 @@
UIComponent nodeImgFacet = null;

int bitMask = NOTHING;
- bitMask += (node.getChildCount()>0) ? CHILDREN : NOTHING;
+ bitMask += (node.isLeaf()) ? NOTHING : CHILDREN;
bitMask += (tree.isNodeExpanded()) ? EXPANDED : NOTHING;
bitMask += ( tree.isLastChild(tree.getNodeId())) ? LAST : NOTHING;
bitMask += (showLines) ? LINES : NOTHING;

Are you using a custom implementation of TreeNode or are you using
TreeNodeBase? If you are using your own implementation, perhaps the
isLeaf() method is not working ...

sean

btw, your email address is bouncing, everytime I respond to you and
the list I get undeliverable

On 7/26/05, Emmanuel Jay <[EMAIL PROTECTED]> wrote:

> yep they do work and I am really puzzled as to why my app doesn't work...
> I have realized that after expanding the tree and selecting a command link
> node I get the following:
>
> javax.faces.FacesException : Invalid bit mask of 14
> at
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
> at
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView (JspViewHandlerImpl.java:226)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:299)
> at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173)
> at
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java :202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java :81)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java :178)
> at
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
> at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java :153)
> at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at

> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection (Http11Protocol.java:744)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java :112)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.jasper.JasperException: Invalid bit
> mask of 14
> at
> org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:370)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
> at

> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
> at
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java :415)
> ... 25 more
>
>
>
> On 7/26/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
> > Have you tried the tree2 examples in the simple webap? I'm assuming
> > they are working but maybe you should double check those to make sure
> > they still work.
> >
> > sean
> >
> > On 7/26/05, Emmanuel Jay < [EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I have just updated to yesterdays (20050725) nightly build (from 1.0.9)
> and
> > > I get the following error on tree2. My extension filter settings haven't
> > > changed so I don't really understand why I get that all the sudden... It
> is
> > > a little weird as some of the resource images used by the script are
> loaded
> > > (all the line images seems ok) and some aren't (all the nav are not
> > > there)... I get that error when clicking on the link for the expand
> image
> > > (the image is not there through). My facets contains a panelgroup with
> 2
> > > commandlink children.
> > >
> > > Any suggestions?
> > >
> > > Emmanuel
> > >
> > > java.io.IOException: Unable to find resource images/null for component
> > > tree2.HtmlTreeRenderer. Check that this file is available in the
> classpath
> > > in sub-directory /resource of the component-directory.
> > > at
> > >
> org.apache.myfaces.component.html.util.AddResource.serveResource(AddResource.java:248)
> > > at
> > >
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java
> :98)
> > > at
> > >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > at
> > >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java
> :173)
> > > at
> > >
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java :81)
> > > at
> > >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
> :202)
> > > at
> > >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > at
> > >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
> :213)
> > > at
> > >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> > > at
> > >
> org.jboss.web.tomcat.security.CustomPrincipalValve.invoke (CustomPrincipalValve.java
> :39)
> > > at
> > >
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
> > > at
> > >
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java
> :59)
> > > at
> > >
> org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126)
> > > at
> > >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> > > at
> > >
> org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:107)
> > > at
> > >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> > > at
> > >
> org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:856)
> > > at
> > >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> > > at
> > >

> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > > at
> > >
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java :112)
> > > at java.lang.Thread.run(Thread.java:595)
> > >
> > >
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with loading Tree2 resource (20050725 build)

schof-2
In reply to this post by schof-2
You're right.  Now that you mention it, this used to be the case until
a recent "fix."  I've added a new JIRA issue for this.

http://issues.apache.org/jira/browse/MYFACES-382

sean

On 7/29/05, Emmanuel Jay <[hidden email]> wrote:

> I don't think that having the "+" showed when a node has no children is
> particularly intuitive. I would show a connecting line (a right angled one)
> instead of the "+".
>  
> Emmanuel
>
>  
> On 7/29/05, Sean Schofield <[hidden email]> wrote:
> > Correct its always there.  What would you show instead?  Nothing?
> > Might look a bit weird, especially if you have connecting lines ...
> >
> > sean
> >
> > On 7/29/05, Emmanuel Jay < [hidden email]> wrote:
> > > By the way do you know if it is possible to hide the "+" image when a
> node
> > > doesn't have any children. At the moement it seems that it is always
> > > there...
> > >
> > >
> > > On 7/29/05, Emmanuel Jay <[hidden email]> wrote:
> > > > Thanks for that! It works for me too now...
> > > >
> > > >
> > > > On 7/29/05, Christian Froelich < [hidden email]> wrote:
> > > >
> > > > > 20050727 works for me
> > > > >
> > > > >
> > > > > --
> > > > > GMX DSL = Maximale Leistung zum minimalen Preis!
> > > > > 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat:
> > > http://www.gmx.net/de/go/dsl
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
>