[richfaces-issues] [JBoss JIRA] (RF-12291) Tab panel issue when using paginated table in one tab

Brian Leathem (JIRA) jira-events at lists.jboss.org
Fri Oct 12 17:13:03 EDT 2012


    [ https://issues.jboss.org/browse/RF-12291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721520#comment-12721520 ] 

Brian Leathem edited comment on RF-12291 at 10/12/12 5:13 PM:
--------------------------------------------------------------

The main difference between our example and Juraj’s code is that he used two separate session variables (nonPaginatedDataTableBean and paginatedDataTableBean). Here are snippets from his code: 

First Tab: 

{code}
<rich:dataTable id="richDataTable2"
         value="#{nonPaginatedDataTable.capitals}"
         var="record">
{code} 
 
Second Tab: 

{code}
<rich:dataTable id="richDataTable1"
         value="#{paginatedDataTableBean.capitals}" var="record"
         rows="#{paginatedDataTableBean.rowsPerPage}">
{code} 
 
In our example, we only use one session variable “myBean” for referring to both the nonPaginatedDataTableBean and paginatedDataTableBean. When we switch tab, we have testTabPanelItemChangeListener to activate the selected tab and set the “myBean” session variable with the appropriate bean instance for that tab (nonPaginatedDataTable or paginatedDataTable). Here are snippets from our code: 

First Tab (variable “myBean” refers to the nonPaginatedDataTable): 

{code}
<rich:dataTable value="#{sessionScope.myBean.tableData}" var="value">
{code}

Second Tab (variable “myBean” refers to the paginatedDataTable):

{code}
<rich:dataTable id="paginatedDtaTblId" 
         value="#{secondTabAction.paginatedTableDataModel}" 
         var="value" 
         rows="#{sessionScope.myBean.rowsPerPage}">
{code}

I hope this helps.

Cheers, 

Cristian
                
      was (Author: ccerb):
    The main difference between our example and Juraj’s code is that he used two separate session variables (nonPaginatedDataTableBean and paginatedDataTableBean). Here are snippets from his code: 

First Tab: 

<rich:dataTable id="richDataTable2"
         value="#{nonPaginatedDataTable.capitals}"
         var="record">
 
 
Second Tab: 

<rich:dataTable id="richDataTable1"
         value="#{paginatedDataTableBean.capitals}" var="record"
         rows="#{paginatedDataTableBean.rowsPerPage}">
 
 
In our example, we only use one session variable “myBean” for referring to both the nonPaginatedDataTableBean and paginatedDataTableBean. When we switch tab, we have testTabPanelItemChangeListener to activate the selected tab and set the “myBean” session variable with the appropriate bean instance for that tab (nonPaginatedDataTable or paginatedDataTable). Here are snippets from our code: 

First Tab (variable “myBean” refers to the nonPaginatedDataTable): 

<rich:dataTable value="#{sessionScope.myBean.tableData}" var="value">

Second Tab (variable “myBean” refers to the paginatedDataTable):

<rich:dataTable id="paginatedDtaTblId" 
value="#{secondTabAction.paginatedTableDataModel}" 
var="value" 
rows="#{sessionScope.myBean.rowsPerPage}">


I hope this helps.

Cheers, 

Cristian

                  
> Tab panel issue when using paginated table in one tab
> -----------------------------------------------------
>
>                 Key: RF-12291
>                 URL: https://issues.jboss.org/browse/RF-12291
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-panels-layout-themes
>    Affects Versions: 4.2.0.Final
>            Reporter: Cristian Cerb
>         Attachments: rf4bug-nospring.zip, rf4bug.zip
>
>
> When using a rich tab panel which contains in one tab a non-paginated data table and in another tab a paginated data table, when switching tabs from tab containing paginated table to the tab with non-paginated table, an exception is thrown, such as:
> {code}
> javax.el.PropertyNotFoundException: /WEB-INF/classes/rf4bug/module/core/ui/jsf/secondInclude.xhtml @13,45 rows="#{sessionScope.myBean.rowsPerPage}": Property 'rowsPerPage' not found on type rf4bug.module.core.ui.jsf.RegularTableBean
> 	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
> 	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
> 	at org.richfaces.component.UISequence.getRows(UISequence.java:169)
> 	at org.richfaces.component.UISequence.getActualRows(UISequence.java:81)
> 	at org.richfaces.component.UISequence.updateState(UISequence.java:66)
> 	at org.richfaces.component.UISequence.updateState(UISequence.java:72)
> 	at org.richfaces.component.UISequence.preEncodeBegin(UISequence.java:291)
> 	at org.richfaces.component.UIDataAdaptor.processEvent(UIDataAdaptor.java:1453)
> 	at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
> 	at com.sun.faces.application.ApplicationImpl.processListenersAccountingForAdds(ApplicationImpl.java:2217)
> 	at com.sun.faces.application.ApplicationImpl.invokeViewListenersFor(ApplicationImpl.java:2038)
> 	at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:291)
> 	at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:246)
> 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
> 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
> 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
> 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:619)
> 2012-05-25 11:37:12,033 INFO  [http-bio-1080-exe
> {code}
> It seems the tab which used to be active, is re-renderd for some reason, but I think it shouldn't.
> You can  create an Eclipse project based on attached zip file, turn it to a Maven project and publish it to any AS/WebContainer. We used Tomcat 7.023. Then hit the url: http://localhost:<port>/rf4bug and click on the link on the page. Then switch from First tab to Second tab and back and take a look at log files. You will see the exception as described here. You can see this in the console or you can configure log4j.properties to produce a log file. I hope it's clear enough.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list