MasterDetail IllegalStateException

Community Driven Extensions Project
Post Reply
ClaudioC
Posts: 114
Joined: 26 Sep 2013, 10:40

08 Apr 2016, 21:00

Dear friends, i have a probelm with a 3levels masterDetail. In the first level i choose a user in a datatable, in the second level I have another datatable related to the previous choice. When I choose one row I made some functions on that row item and then I have the level 3 content. The first time all goes well and level3 is correctly displayed; when I return to level 2 and made another choice I have this error log :

Code: Select all

 java.lang.IllegalStateException
	at javax.faces.component.UIComponentBase.queueEvent(UIComponentBase.java:1052)
	at javax.faces.component.UIComponentBase.queueEvent(UIComponentBase.java:1054)
	at javax.faces.component.UIData.queueEvent(UIData.java:1060)
	at org.primefaces.component.datatable.DataTable.queueEvent(DataTable.java:891)
	at javax.faces.component.UIComponentBase.queueEvent(UIComponentBase.java:1054)
	at javax.faces.component.UIComponentBase.queueEvent(UIComponentBase.java:1054)
	at javax.faces.component.UICommand.queueEvent(UICommand.java:344)
	at org.primefaces.component.commandlink.CommandLink.queueEvent(CommandLink.java:254)
	at org.primefaces.component.commandlink.CommandLinkRenderer.decode(CommandLinkRenderer.java:53)
	at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:831)
	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1225)
	at org.primefaces.component.api.UIData.process(UIData.java:379)
	at org.primefaces.component.api.UIData.processChildren(UIData.java:366)
	at org.primefaces.component.api.UIData.processPhase(UIData.java:328)
	at org.primefaces.component.api.UIData.processDecodes(UIData.java:286)
	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
	at org.primefaces.component.api.UITabPanel.processDecodes(UITabPanel.java:1028)
	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
	at org.primefaces.extensions.component.masterdetail.MasterDetail.processDecodes(MasterDetail.java:210)
	at javax.faces.component.UIForm.processDecodes(UIForm.java:225)
	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1220)
	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:929)
	at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
	at java.lang.Thread.run(Thread.java:745)
And theese are my masterDetail level :

Code: Select all

<pe:masterDetail id="masterDetail" selectLevelListener="#{userStatView.handleNavigation}">               
                            <pe:masterDetailLevel level="1">                                                              
                                    <p:dataTable id="datalist" value="#{userController.items}" var="item"
                                                 selectionMode="single" selection="#{userStatView.utente}"                                  
                                                 rowKey="#{item.idUser}"
                                                 rows="10"
                                                >
                                        <p:column>
                                            <f:facet name="header">
                                                <h:outputText value="#{bundle.ListUserTitle_cognome}"/>
                                            </f:facet>
                                            <p:commandLink value="#{item.cognome}" action="#{userStatView.singleUserStat()}" ajax="true">
                                                <f:setPropertyActionListener target="#{userController.selected}" value="#{item}"/>
                                                <pe:selectDetailLevel contextValue="#{item}" step="1" />  
                                            </p:commandLink>  
                                        </p:column>                                                             
                                    </p:dataTable>
                            </pe:masterDetailLevel>
                            <pe:masterDetailLevel level="2" contextVar="user" levelLabel="User Detail">                                                      
                                    <p:tabView id="TabContab" dynamic="true" binding="#{userStatView.tabview}">                                        
                                        <p:ajax event="tabChange" listener="#{userStatView.onTabChange}" update=":growl"/>
                                        
                                        <p:tab id="tab1" title="Stat">
                                            <p:dataTable id="datalistInc" value="#{incarichiController.itemsForUser}" var="item" widgetVar="incarichi"
                                                              selectionMode="single" 
                                                             selection="#{userStatView.selectInc}"             
                                                             rowKey="#{item.idIncarichi}"
                                                              rows="10" >   
                                                   <p:column>
                                                     <p:commandLink value="Dettaglio" action="#{userStatView.viewDetailFromUser(item)}">                
                                                           <pe:selectDetailLevel step="1"/>  
                                                        </p:commandLink>  
                                                  </p:column>
                                             </p:dataTable>
                                        </p:tab>
                                        <p:tab id="tab2" title="Sell" >
                                            <ui:include src="Sell.xhtml"/>
                                        </p:tab>                                   
                                    </p:tabView>
                                    <p:panel>
                                        <p:commandButton icon="fa fa-arrow-left" process="masterDetail">                                   
                                            <pe:selectDetailLevel level="1"/>
                                        </p:commandButton>
                                    </p:panel>
                            </pe:masterDetailLevel>  
                            <pe:masterDetailLevel level="3" contextVar="incarico">
                                    <ui:include src="/pages/incarichi/ViewIncUser.xhtml"/>
                                    <p:panel>                                    
                                        <p:commandButton icon="fa fa-arrow-left" process="masterDetail">                                   
                                            <pe:selectDetailLevel level="2" />
                                        </p:commandButton>
                                    </p:panel>
                            </pe:masterDetailLevel>
                        </pe:masterDetail>
My handleNavigation is this :

Code: Select all

public int handleNavigation(SelectLevelEvent selectLevelEvent) {
        if (errorOccured) {
            return 1;
        } else {
            return selectLevelEvent.getNewLevel();
        }
    }
Where is my fault ?
I hope in your tips. Thanks.
Netbeans 8.1, PrimeFaces 5.3.10 + PrimeFaces Extensions 4.0, Glassfish ver4.1, Chrome with NetbeansPlugin

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests