[ https://issues.apache.org/jira/browse/MYFACES-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jiri Slovak reopened MYFACES-4074: ---------------------------------- Hi Leonardo, I don't agree the problem is on primefaces. Originally I thougth the problem is in primefaces as well. Yes, the exception is thrown in this stack, but it seems the root cause is in myfaces. The aforementioned example does work with mojarra, but not with myfaces. Please, try to comment out myfaces libs and uncomment mojarra in my example. The example works then. >From my point of view, problem is in ComponentTagHandlerDelegate - myfaces >calls markInitialState during apply method, Mojarra does not. Thanks for doing deeper investigation about this problem. Jiri > MyFaces + Primefaces: Dynamic ui:include + UIData (with rowStatePreserved) > rendering problem > -------------------------------------------------------------------------------------------- > > Key: MYFACES-4074 > URL: https://issues.apache.org/jira/browse/MYFACES-4074 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-314 > Affects Versions: 2.2.11 > Reporter: Jiri Slovak > Assignee: Leonardo Uribe > > There is a situation where UIData with rowStatePreserved is not rendered. > NullPointer exception is thrown in this case. > The example of such situation is: > we have index.xhtml with ui:include with src attribute as expression > <h:form> > <h:panelGrid columns="1" bodyrows="3"> > <p:commandLink > action="#{mainFrameBean.setMenu('iframe1.xhtml')}" process="@this" > update=":mainframe">Frame 1</p:commandLink> > <p:commandLink > action="#{mainFrameBean.setMenu('iframe2.xhtml')}" process="@this" > update=":mainframe">Frame 2</p:commandLink> > <p:commandLink > action="#{mainFrameBean.setMenu('iframe3.xhtml')}" process="@this" > update=":mainframe">Frame 3</p:commandLink> > </h:panelGrid> > </h:form> > <p:outputPanel id="mainframe"> > <ui:include src="/frames/#{mainFrameBean.menuValue}" /> > </p:outputPanel> > we have datagrid coded in iframe2.xhtml > <p:dataGrid var="car" value="#{dataGridView.cars}" columns="3" layout="grid" > rows="12" paginator="true" id="cars" rowStatePreserved="true" > paginatorTemplate="{CurrentPageReport} {FirstPageLink} > {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} > {RowsPerPageDropdown}" > rowsPerPageTemplate="6,12,16"> > <f:facet name="header"> > Cars for Sale > </f:facet> > <p:panel header="#{car.id}" style="text-align:center"> > <h:outputText value="#{car.year}" /> > </p:panel> > </p:dataGrid> > Then if you click "Frame 2" commandlink you get nullpointer returned in the > partial response XML. > The problem is UIData incorrectly handles initial descendant state during the > render response phase. > I`ve prepared testapp code in github as an exapmle: > https://github.com/slovi/myfaces_primefaces_uidata_issue > (link 4 does not work correctly with myfaces, but works well with Mojarra). > It seems the problem is that MyFaces sets initial state during the render > response phase (in case of partial request), whilst Mojarra sets > markInitialState during the build phase. > Jiri -- This message was sent by Atlassian JIRA (v6.3.4#6332)