7 Replies Latest reply on Mar 1, 2007 2:51 AM by Juraj Holtak

    Problem with tree2

    Mirko Adari Novice

      It`s not really related to seam, but you have discussed other components, so I`ll give it a try. I got tree2 working niceley, but now I wan`t to add feature 'expand/collapse All'. Tomahawk has it allready abled, through HtmlTree component. But I do not seem to get tree2 binding to it. It throws nullpointerexception when hitting expandAll action.
      Have tried everything, hope that you can help me.

      package ee.digizone.ejb;
      
      import java.io.Serializable;
      
      import java.util.Collections;
      import java.util.Comparator;
      
      import java.util.List;
      
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.faces.application.FacesMessage;
      import javax.faces.component.UIComponent;
      import javax.faces.context.FacesContext;
      import javax.faces.event.ActionEvent;
      import javax.faces.validator.ValidatorException;
      import javax.persistence.EntityManager;
      import org.jboss.logging.Logger;
      
      import org.apache.myfaces.custom.tree2.HtmlTree;
      import org.apache.myfaces.custom.tree2.TreeModel;
      import org.apache.myfaces.custom.tree2.TreeModelBase;
      import org.apache.myfaces.custom.tree2.TreeNode;
      import org.apache.myfaces.custom.tree2.TreeNodeBase;
      
      import org.jboss.seam.annotations.*;
      import org.jboss.seam.ScopeType;
      
      import ee.digizone.entity.Category;
      import ee.digizone.entity.Product;
      
      
      @Stateful
      @Name("productList")
      @Scope(ScopeType.EVENT)
      public class ProductListBean implements ProductList, Serializable
      {
      
       private static final long serialVersionUID = 1L;
       Logger logger = Logger.getLogger(ProductListBean.class);
       private HtmlTree _tree = new HtmlTree();
       private TreeNode treeData;
      
       @In(create=true,value="digizoneDatabase")
       private EntityManager em;
      
       @Create
       public void loadData() {
       TreeNodeBase tempData = new TreeNodeBase("group", "Root","0", false);
       List<Category> categories = em.createQuery("from Category c where c.head != c.id and c.head = 1 order by c.name").getResultList();
       recursive(categories,tempData);
       treeData = tempData;
      
       }
       private void recursive(List<Category> categories, TreeNode node) {
       sort(categories);
       for (Category c: categories) {
       TreeNodeBase newNode = new TreeNodeBase("group",c.getName(),String.valueOf(c.getId()), c.getGroups().isEmpty() && c.getProducts().isEmpty());
       node.getChildren().add( newNode );
       List<Product> products = c.getProducts();
       sortp(products);
       for (Product p: products)
       newNode.getChildren().add(new TreeNodeBase("product",p.getName(),String.valueOf(p.getId()), true));
       if (!c.getGroups().isEmpty())
       recursive(c.getGroups(),newNode);
       }
       }
       public void sort(List data)
       {
       Collections.sort(data, new Comparator<Category>() {
       public int compare(Category x, Category y)
       {
       return x.getName().toLowerCase().compareTo(y.getName().toLowerCase());
       }
       });
       }
       public void sortp(List data)
       {
       Collections.sort(data, new Comparator<Product>() {
       public int compare(Product x, Product y)
       {
       return x.getName().toLowerCase().compareTo(y.getName().toLowerCase());
       }
       });
       }
      
       public TreeNode getTreeData()
       {
       return treeData;
       }
      
       public TreeModel getExpandedTreeData()
       {
       return new TreeModelBase(getTreeData());
       }
      
       public void setTree(HtmlTree tree)
       {
       _tree = tree;
       }
      
       public HtmlTree getTree()
       {
       return _tree;
       }
      
       public String expandAll()
       {/*
       if (_tree != null)
       _tree.expandAll();
       else
       logger.info("NULL RAIBE");
       */
       return null;
      
       }
      
       private String _nodePath;
      
       public void setNodePath(String nodePath)
       {
       _nodePath = nodePath;
       }
      
       public String getNodePath()
       {
       return _nodePath;
       }
      
       public void checkPath(FacesContext context, UIComponent component, java.lang.Object value)
       {
       FacesMessage message = null;
      
       String[] path = _tree.getPathInformation(value.toString());
      
       for (int i = 0; i < path.length; i++)
       {
       String nodeId = path;
       try
       {
       _tree.setNodeId(nodeId);
       }
       catch (Exception e)
       {
       throw new ValidatorException(message, e);
       }
      
       if (_tree.getNode().isLeaf())
       {
       message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Invalid node path (cannot expand a leaf): "
       + nodeId, "Invalid node path (cannot expand a leaf): " + nodeId);
       throw new ValidatorException(message);
       }
       }
       }
      
       public void expandPath(ActionEvent event)
       {
       _tree.expandPath(_tree.getPathInformation(_nodePath));
       }
      
       @Destroy @Remove
       public void destroy()
       {
       }
       }
      
       <div class="form2">
       <h:form id="foo">
      
       <h:commandLink action="#{productList.expandAll}"><h:outputText value="Tootepuu"/></h:commandLink>
       <div class="separator"></div>
       <t:tree2 id="categoryTree" binding="#{productList.tree}" value="#{productList.treeData}" var="node" varNodeToggler="t" clientSideToggle="false" showRootNode="false" showNav="false" showLines="false">
       <f:facet name="group">
       <h:panelGroup>
       <span class="tree_bg">
       <h:commandLink immediate="true" action="#{t.toggleExpanded}" rendered="#{!empty node.children}">
       <t:graphicImage value="images/arrow_r.gif" rendered="#{!t.nodeExpanded}" />
       <t:graphicImage value="images/arrow_d.gif" rendered="#{t.nodeExpanded}" />
       </h:commandLink>
       <h:outputText value="#{node.description}" rendered="#{!empty node.children}"/>
       <h:outputText value="&#160;&#160;&#160;&#160;&#160;&#160;"/>
       <h:outputText value="#{node.description}" rendered="#{empty node.children}"/>
       </span>
       <span class="tree_btn">
       <s:link view="/haldus/cproduct.xhtml" action="#{productEditor.selectCreate}">
       <f:param name="catid" value="#{node.identifier}"/>
       <t:graphicImage value="images/tree_add.gif"/>
       </s:link>
       </span>
       </h:panelGroup>
       </f:facet>
       <f:facet name="product">
       <h:panelGroup>
       <span class="tree_bg">
       <h:outputText value="&#160;&#160;&#160;&#160;&#160;&#160;"/>
       <s:link view="/haldus/mproduct.xhtml" action="#{productEditor.selectModify}">
       <h:outputText value="#{node.description}"/>
       <f:param name="productid" value="#{node.identifier}"/>
       </s:link>
       </span>
       <span class="tree_btn">
       <s:link propagation="begin" action="#{productEditor.delete}">
       <f:param name="productid" value="#{node.identifier}"/>
       <t:graphicImage value="images/tree_del.gif"/>
       </s:link>
       </span>
       </h:panelGroup>
       </f:facet>
       </t:tree2>
       </h:form>
       </div>


        • 1. Re: Problem with tree2
          Mirko Adari Novice

          Stack trace:

          19:38:23,386 ERROR [STDERR] 31.05.2006 19:38:23 com.sun.facelets.impl.DefaultFacelet refresh
          INFO: Facelet[/haldus/templates/menu.xhtml] was modified @ 19:38:23, flushing component applied @ 19:35:06
          19:38:23,386 ERROR [STDERR] 31.05.2006 19:38:23 com.sun.facelets.impl.DefaultFacelet refresh
          INFO: Facelet[/haldus/templates/menu.xhtml] was modified @ 19:38:23, flushing component applied @ 19:35:06
          19:38:26,370 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value org.apache.myfaces.renderkit.html.util.DefaultAddResource
          19:38:26,370 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true
          19:38:28,213 ERROR [STDERR] javax.ejb.EJBTransactionRolledbackException: java.lang.NullPointerException
          19:38:28,223 ERROR [STDERR] at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
          19:38:28,223 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
          19:38:28,223 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
          19:38:28,223 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,223 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
          19:38:28,223 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,223 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
          19:38:28,223 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,223 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
          19:38:28,223 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,223 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
          19:38:28,223 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,223 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
          19:38:28,223 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,223 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:199)
          19:38:28,223 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
          19:38:28,223 ERROR [STDERR] at $Proxy593.loadData(Unknown Source)
          19:38:28,223 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          19:38:28,223 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          19:38:28,223 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          19:38:28,223 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.Component.callComponentMethod(Component.java:1240)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.Component.callCreateMethod(Component.java:1228)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.Component.newInstance(Component.java:1217)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1169)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1152)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
          19:38:28,223 ERROR [STDERR] at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
          19:38:28,223 ERROR [STDERR] at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
          19:38:28,223 ERROR [STDERR] at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
          19:38:28,223 ERROR [STDERR] at com.sun.el.parser.AstValue.getTarget(AstValue.java:41)
          19:38:28,223 ERROR [STDERR] at com.sun.el.parser.AstValue.isReadOnly(AstValue.java:104)
          19:38:28,223 ERROR [STDERR] at com.sun.el.ValueExpressionImpl.isReadOnly(ValueExpressionImpl.java:221)
          19:38:28,223 ERROR [STDERR] at com.sun.facelets.el.TagValueExpression.isReadOnly(TagValueExpression.java:82)
          19:38:28,223 ERROR [STDERR] at com.sun.facelets.el.LegacyValueBinding.isReadOnly(LegacyValueBinding.java:82)
          19:38:28,223 ERROR [STDERR] at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:68)
          19:38:28,223 ERROR [STDERR] at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41)
          19:38:28,223 ERROR [STDERR] at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:78)
          19:38:28,223 ERROR [STDERR] at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41)
          19:38:28,223 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:179)
          19:38:28,223 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
          19:38:28,223 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
          19:38:28,223 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          19:38:28,223 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          19:38:28,223 ERROR [STDERR] at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
          19:38:28,223 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          19:38:28,223 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          19:38:28,223 ERROR [STDERR] at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
          19:38:28,223 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          19:38:28,223 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          19:38:28,233 ERROR [STDERR] at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          19:38:28,233 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
          19:38:28,233 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
          19:38:28,233 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
          19:38:28,233 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
          19:38:28,233 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
          19:38:28,233 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
          19:38:28,233 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
          19:38:28,233 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
          19:38:28,233 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
          19:38:28,233 ERROR [STDERR] Caused by: java.lang.NullPointerException
          19:38:28,233 ERROR [STDERR] at ee.digizone.ejb.ProductListBean.loadData(Unknown Source)
          19:38:28,233 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          19:38:28,233 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          19:38:28,233 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          19:38:28,233 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
          19:38:28,343 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
          19:38:28,343 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
          19:38:28,343 ERROR [STDERR] at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:81)
          19:38:28,343 ERROR [STDERR] at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
          19:38:28,343 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          19:38:28,343 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          19:38:28,343 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          19:38:28,343 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
          19:38:28,343 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
          19:38:28,353 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
          19:38:28,353 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,353 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
          19:38:28,353 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,353 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
          19:38:28,353 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,353 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
          19:38:28,353 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
          19:38:28,353 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
          19:38:28,353 ERROR [STDERR] ... 70 more
          19:38:28,353 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
          javax.servlet.ServletException: java.lang.NullPointerException
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
           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:524)
           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.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:38:28,353 INFO [SeamExceptionFilter] killing transaction
          19:38:28,353 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
          javax.ejb.EJBTransactionRolledbackException: java.lang.NullPointerException
           at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
           at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:199)
           at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
           at $Proxy593.loadData(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
           at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
           at org.jboss.seam.Component.callComponentMethod(Component.java:1240)
           at org.jboss.seam.Component.callCreateMethod(Component.java:1228)
           at org.jboss.seam.Component.newInstance(Component.java:1217)
           at org.jboss.seam.Component.getInstance(Component.java:1169)
           at org.jboss.seam.Component.getInstance(Component.java:1152)
           at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
           at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
           at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
           at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
           at com.sun.el.parser.AstValue.getTarget(AstValue.java:41)
           at com.sun.el.parser.AstValue.isReadOnly(AstValue.java:104)
           at com.sun.el.ValueExpressionImpl.isReadOnly(ValueExpressionImpl.java:221)
           at com.sun.facelets.el.TagValueExpression.isReadOnly(TagValueExpression.java:82)
           at com.sun.facelets.el.LegacyValueBinding.isReadOnly(LegacyValueBinding.java:82)
           at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:68)
           at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41)
           at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:78)
           at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:41)
           at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:179)
           at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
           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:524)
           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.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)
          Caused by: java.lang.NullPointerException
           at ee.digizone.ejb.ProductListBean.loadData(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
           at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
           at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:81)
           at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
           at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
           ... 70 more


          • 2. Re: Problem with tree2
            Mirko Adari Novice

            no ideas how to manipulate it?:( opening all first two level nodes howto would be welcome too.... please help me out guys. Then we could add one more component howto to the seam wiki.

            • 3. Re: Problem with tree2
              d1g Newbie

              Hi. Did you manage to get this working?

              • 4. Re: Problem with tree2
                Test Tester Newbie

                I Have the same Problem, did you get it working???

                • 5. Re: Problem with tree2
                  tomas kral Newbie

                  I still have the same problem. Is there any solution to add fetaure expand all tree?

                  Thanks

                  • 6. Re: Problem with tree2
                    tomas kral Newbie

                    Any solutions to this problem please?

                    • 7. Re: Problem with tree2
                      Juraj Holtak Newbie

                      I collapse the tree with giving the TreeModel a new instance of TreeState. instead the old one stored in a SFSB.

                      I have no function for expanding all nodes of the tree at once because this would be the ultimate performance killer when you are lazy loading nodes from the database like me.

                      I somekind adapted the LazyLoading with approch from the tomahawk wiki and my tree works fine. As soon as <s:link> get an actionListener property, it shall rule ;-)