Code: Select all
....................
<p:layout fullPage="true">
<p:layoutUnit position="north" size="100" header="Top"
collapsible="true" resizable="false" closable="false">
<h:outputText value="Top unit content." />
</p:layoutUnit>
<p:layoutUnit position="west" size="200" header="Left"
collapsible="true">
<h:form>
<ui:include src="components/west/tree.xhtml" />
</h:form>
</p:layoutUnit>
<p:layoutUnit position="east" size="250" header="Token example"
collapsible="true" effect="drop">
<div id="infoApplet">
<h:outputText value="Right unit content." />
</div>
<applet code="com.cargosoft.security.applet.HOTPApplet.class"
archive="lib/HOTPApplet.jar, lib/beansbinding-1.2.1.jar, lib/commons-codec-1.4.jar"
width="240" height="120" />
</p:layoutUnit>
<p:layoutUnit position="center">
<h:panelGroup id="centerContent" layout="block">
<p:growl id="error" globalOnly="true" showDetail="true"
sticky="true" />
<p:ajaxStatus id="statusCenter"
style="width: 15px; height: 20px; float:left;">
<f:facet name="start">
<h:graphicImage value="images/ajaxloading.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
<div id="centerPanel">
<ui:include src="#{treeMenu.selectedPage}" />
</div>
</h:panelGroup>
</p:layoutUnit>
</p:layout>
........................
Code: Select all
<h:body>
.............
<p:tree id="tree" value="#{treeMenu.root}" var="node"
selection="#{treeMenu.selectedNode}" selectionMode="single"
styleClass="navTree" cache="false">
<p:ajax event="select" update="centerContent" listener="#{treeMenu.onTreeNodeClicked}" />
<p:treeNode>
<h:outputText value="#{node}" />
</p:treeNode>
</p:tree>
</h:body>
.............
first.xhtml is very simple:
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:body>
<h2>#{msg.resynkHead}</h2>
<div class="text">
#{msg.genPassInfoFirst}<br />#{msg.genPassInfoSecond}
</div>
</h:body>
</html>
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:body>
<h:form>
<p:dataTable var="token" value="#{tokenTable.list}" id="tokenTable"
paginator="true" rows="30" rowsPerPageTemplate="30,50,100"
paginatorTemplate="{FirstPageLink} {PreviousPageLink}
{PageLinks} {NextPageLink}
{LastPageLink} {RowsPerPageDropdown}"
dynamic="true" styleClass="panel"
emptyMessage="#{msg.emptyTableMessage}"
selection="#{tokenTable.selectedToken}" selectionMode="single"
rowKey="#{token.serial}">
<p:ajax event="rowSelect" update="unbindUser, bindUser" />
<f:facet name="header">
#{msg.tableTitle}
</f:facet>
<p:column sortBy="#{token.serial}" filterBy="#{token.serial}">
<f:facet name="header">
#{msg.serialHeader}
</f:facet>
<h:outputText value="#{token.serial}" />
</p:column>
<p:column filterBy="#{token.user.name}" sortBy="#{token}"
sortFunction="#{tokenTable.sortByUser}">
<f:facet name="header">
#{msg.userHeader}
</f:facet>
<h:outputText value="#{token.user.name}" />
</p:column>
<f:facet name="footer">
<p:commandButton value="#{msg.bindButton}"
image="ui-icon ui-icon-circle-check"
oncomplete="bindDialog.show();" id="bindUser"
disabled="#{tokenTable.selectedToken eq null}" />
<p:commandButton value="#{msg.unBindButton}"
image="ui-icon ui-icon-trash" oncomplete="cDialog.show();"
id="unbindUser" disabled="#{tokenTable.selectedToken.user eq null}" />
</f:facet>
</p:dataTable>
</h:form>
</h:body>
</html>
When I start from first.xhtml (I mean It rendered in centre content) and then click on menu Item in tree, I see the content of second.xhtml in centre content. But when I click on table raw two my buttons remain disabled. And in fire bug I see response from server:
Code: Select all
<partial-response>
<error>
<error-name>class java.lang.ClassCastException</error-name>
<error-message>javax.faces.component.StateHolderSaver cannot be cast to [Ljava.lang.Object;</error-message>
</error>
</partial-response>
If after that I press F5 to update my page, and then click on a raw of table all work fine, buttons become enable and no error. But when I navigate to first page and back to second all break again!