3 Replies Latest reply on Mar 29, 2007 3:10 PM by Sergey Smirnov

    Tree need help

    Konstantin Kauz Novice

      I got follow exception:

      16:57:45,515 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      org.ajax4jsf.framework.resource.ResourceNotFoundException: Resource not registered : org.richfaces.renderkit.html.images.TreeLineNodeImage
      

      view:

      <h:form>
      
       <rich:tree switchType="client" width="300" height="150" value="#{tmanager.data}" var="item" nodeFace="test">
       <rich:treeNode type="test">
       <h:outputText value="#{item.name}" />
       </rich:treeNode>
       </rich:tree>
      
       </h:form>
      
      


      what i do wrong?

        • 1. Re: Tree need help
          Konstantin Kauz Novice

          Session Bean:

          @Stateful
          @Name("tmanager")
          public class Treemanager implements TreemanagerInterface{
           private Treeroot root;
          
           @Remove
           @Destroy
           public void destroy() {
          
           }
          
           public Object getData() {
           if (root == null)
           init();
          
           return root;
           }
          
          
          
           private void init() {
          
           this.root = new Treeroot();
           this.root.setType("root");
           this.root.setName("root");
           this.root.setParent(null);
          
           for (int i = 0; i < 4; i++) {
           Treeroot item = new Treeroot();
           item.setType("root");
           item.setParent(this.root);
           item.setId(i);
           this.root.addChild(i,item);
           item.setType("item");
           item.setName("item");
          
          
          
           }
          
          
           }
          
          
          }



          Node:

          public class Treeroot implements TreeNode {
          
           private static final long serialVersionUID = 1L;
          
           private int id;
          
           private Map<Object, TreeNode> childs;
          
           private TreeNode parent;
          
           private String name;
          
           private String type;
          
           public Treeroot() {
           childs = new HashMap<Object, TreeNode>();
          
           }
          
           public Treeroot(String name) {
           this();
           this.name = name;
          
           }
          
           public Treeroot(String name, TreeNode parent) {
           this(name);
           setParent(parent);
          
           }
          
           public void addChild(Object id, TreeNode child) {
           getChilds().put(id, child);
          
           }
          
           public int getChildsSize() {
           return getChilds().size();
           }
          
           private Map<Object, TreeNode> getChilds() {
           return this.childs;
           }
          
           public TreeNode getChild(Object id) {
           return (TreeNode) getChilds().get(id);
           }
          
           public Iterator getChildren() {
           return getChilds().entrySet().iterator();
           }
          
           public Object getData() {
          
           return this;
           }
          
           public TreeNode getParent() {
           return this.parent;
           }
          
           public boolean isLeaf() {
           return getChilds().isEmpty();
           }
          
           public void removeChild(Object id) {
           TreeNode tmp = getChild(id);
           tmp.setParent(null);
           getChilds().remove(id);
          
           }
          
           public void setData(Object arg0) {
           // not used
          
           }
          
           public void setParent(TreeNode parent) {
          
          
           this.parent = parent;
          
           }
          
           public String getName() {
           return name;
           }
          
           public void setName(String name) {
           this.name = name;
           }
          
           public String toString() {
           return name;
           }
           public String getType(){
           return name;
           }
          
           public void setType(String type) {
           this.type = type;
           }
          
           public int getId() {
           return id;
           }
          
           public void setId(int id) {
           this.id = id;
           }
          
          
          
          }
          


          Exception:
          19:00:07,093 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
          org.ajax4jsf.framework.resource.ResourceNotFoundException: Resource not registered : org.richfaces.renderkit.html.images.TreeLineNodeImage
           at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResource(ResourceBuilderImpl.java:376)
           at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResourceForKey(ResourceBuilderImpl.java:333)
           at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:128)
           at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:118)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:207)
           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:96)
           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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           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:869)
           at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
           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)
          19:00:07,099 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
          org.ajax4jsf.framework.resource.ResourceNotFoundException: Resource not registered : org.richfaces.renderkit.html.images.TreeLineCollapsedImage
           at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResource(ResourceBuilderImpl.java:376)
           at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResourceForKey(ResourceBuilderImpl.java:333)
           at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:128)
           at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:118)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:207)
           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:96)
           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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           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:869)
           at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
           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)
          19:00:07,105 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
          org.ajax4jsf.framework.resource.ResourceNotFoundException: Resource not registered : org.richfaces.renderkit.html.images.TreeLineLastImage
           at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResource(ResourceBuilderImpl.java:376)
           at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResourceForKey(ResourceBuilderImpl.java:333)
           at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:128)
           at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:118)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:207)
           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:96)
           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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           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:869)
           at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
           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)
          


          • 2. Re: Tree need help
            Konstantin Kauz Novice

            After replacing the lib's with nightly build lib's, it's just works!

            • 3. Re: Tree need help
              Sergey Smirnov Master

              Most likely, it started to work after you refreshed the page.
              This is a problem with dynamic images included in the dynamically generated CSS. When browser caches the css, the images become un-registered