You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Sean Schofield <se...@gmail.com> on 2005/07/26 23:33:34 UTC

Re: Problem with loading Tree2 resource (20050725 build)

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 <em...@gmail.com> 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 <se...@gmail.com> 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 < emmanuelj@gmail.com> 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)
> > >
> > >
> > 
> 
>