Primefaces datalist ajax-pagination dialog not updated - dialog

I'm trying to use primefaces dialog update method by primefaces here and i've replaced the bean and its methods with my bean.
This is what i did
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../Styles/homepage-style.css" />
<link rel="stylesheet" type="text/css" href="../Styles/profile.css" />
<title>Shadi Bandhan | We find the best match for you</title>
</h:head>
<h:body>
<h:form id="form">
<p:dataList value="#{messagesManagedBean.userInboxMsgs}" var="msg" id="cars"
paginator="true" rows="5"
paginatorTemplate="{PreviousPageLink} {CurrentPageReport} {NextPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15" type="none">
<f:facet name="header">
Cars
</f:facet>
<p:commandButton icon="ui-icon-search" update=":form:carDetail" oncomplete="carDialog.show()" title="View Detail">
<f:setPropertyActionListener value="#{msg}" target="#{messagesManagedBean.selectedMessage}" />
</p:commandButton>
<h:outputText value="#{msg.message}, #{msg.userFullname}" style="margin-left:10px" />
<br />
</p:dataList>
<p:dialog header="Car Detail" widgetVar="carDialog" modal="true" showEffect="fade">
<p:outputPanel id="carDetail" style="text-align:center;" layout="block">
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="modelNo" value="Message: " />
<h:outputText id="modelNo" value="#{messagesManagedBean.selectedMessage.message}" />
<h:outputLabel for="year" value="Full name: " />
<h:outputText id="year" value="#{messagesManagedBean.selectedMessage.userFullname}" />
<h:outputLabel for="color" value="User Id: " />
<h:outputText id="color" value="#{messagesManagedBean.selectedMessage.userId}" style="color:#{tableBean.selectedCar.color}"/>
</h:panelGrid>
</p:outputPanel>
</p:dialog>
</h:form>
</h:body>
</html>
It opens the dialog but does not show the values. (Dialog is not getting updated)
*Note*Before, when i used ui:repeat instead of datalist, it was fine with the f:param method.
Thanks

<h:form id="form">
<p:dataList value="#{tableBean.cars}" var="car" id="cars"
paginator="true" rows="10"
paginatorTemplate="{PreviousPageLink} {CurrentPageReport} {NextPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="10,15" type="none">
<p:column>
<f:facet name="header">
Notificaciones
</f:facet>
<p:commandButton icon="ui-icon-search" update=":form:carDetail" oncomplete="carDialog.show()" title="View Detail">
<f:setPropertyActionListener value="#{car}" target="#{tableBean.selectedCar}" />
</p:commandButton>
<h:outputText value="#{car.manufacturer}, #{car.year}" style="margin-left:10px" />
<br />
</p:column>
</p:dataList>

And the answer is
Putting the commandlink or commandbutton in the <p:column></p:column> solved my problem.

Related

How to filter on primefaces?

I'm using a modal window to select a value. After i make a selection and open the modal window again. I want the modal list be filtered on the selectedValue.
It goes back to the front page.
and if open modal again and select 'ABC', it should look like this:
this is look up and which list should be put in modal xhtml:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<p:panel id="dialog-content">
<h:form id="accountLookUpModal" style="width: 777px">
 
<p:panelGrid id="Info" columns="2" columnClasses="labelColumn,fieldColumn">
<!-- TYPE -->
<h:outputLabel id="AccountType" for="accountType" value="#{message['field.type']}" />
<p:selectOneMenu id="accountType" rendered="#{not empty account.criteria}" value="#{account.criteria.accountType}" converter="#{enumerationConverter}" disabled="#{account.disableLookUp}">
<p:ajax event="change" listener="#{account.filterOnType(true)}" update="#form, :dataTableForm"/>
<f:selectItems itemLabelEscaped="true" value="#{enumerationBean.getaccountTypeList()}" var="c" itemLabel="#{message[c.bundleKey]}" itemValue="#{c}"/>
</p:selectOneMenu>
</p:panelGrid>
</h:form>
<h:form id="dataTableForm" prependId="false" style="width:777px;">
<!-- INCLUDE Account Table -->
<ui:include src="/includes/accountLookUp.xhtml">
<ui:param name="PANEL_ID" value="accountActionPanel" />
<ui:param name="DT_ID" value="accountTable" />
<ui:param name="DT_DATA" value="#{account.accountTableLookUp}" />
<ui:param name="CR_BEAN" value="#{accountBean}" />
</ui:include>
</h:form>
</p:panel>
</ui:composition>
This is the xhtml used to select the update the list:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui">
<p:dataTable id="#{DT_ID}" var="acc" emptyMessage="" value="#{DT_DATA.values}" rowIndexVar="index"
paginator="true" selection="#{DT_DATA.selectedValues}" rows="8" paginatorPosition="top"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
editable="false" lazy="true" sortBy="#{acc.name}" sortOrder="ascending"
liveResize="true" filterDelay="100">
<p:ajax event="filter" listener="#{DT_DATA.onFilter}" />
<p:ajax event="rowToggle" listener="#{account.expandLookUp(acc)}" immediate="true"/>
<p:column styleClass="ui-column-rowtoggler" exportable="false">
<p:rowToggler id="cdtlu#{DT_ID}RT"/>
</p:column>
<!-- filterBy="#{acc.name}" -->
<p:column id="accountName" sortBy="#{acc.name}" filterBy="#{acc.name}" >
<f:facet name="header">
<h:outputText id="cu#{DT_ID}accountName" value="#{message['field.name']}" />
</f:facet>
<h:outputText id="cu#{DT_ID}accountName" value="#{acc.name}"/>
</p:column>
<!-- filterBy="#{acc.city}" -->
<p:column id="accountCity" sortBy="#{acc.city}" filterBy="#{acc.city}" >
<f:facet name="header">
<h:outputText id="cu#{DT_ID}accountCity" value="#{message['field.city']}" />
</f:facet>
<h:outputText id="cu#{DT_ID}accountCity" value="#{acc.city}" />
</p:column>
<!-- filterBy="#{acc.countryCode}" -->
<p:column id="accountCountry" sortBy="#{acc.countryCode}" filterOptions="#{enumerationBean.accountList}" filterBy="countryCode" >
<f:facet name="header">
<h:outputText id="cu#{DT_ID}CountryCode" value="#{message['field.countryCode']}" />
</f:facet>
<h:outputText id="cu#{DT_ID}TCountryCode" value="#{message[acc.countryCode.bundleKey]}" />
</p:column>
<p:column id="sel" styleClass="ui-column-rowtoggler">
<f:facet name="header">
<h:outputText id="cu#{DT_ID}Sel" value="#{message['common.sel']}" />
</f:facet>
<p:commandButton action="save-dialog" id="cu#{DT_ID}BtnSel"
actionListener="#{companySearchBean.updateCompanyOwner(acc)}"
icon="ui-icon ui-icon-e-w" >
</p:commandButton>
</p:column>
</p:dataTable>
</ui:composition>
Now i would like to filter with 'name' so that it looks it last picture. I used filterValue but then filterBy doesn't work properly and it produces null. In the nutshell if I select 'ABC' and then open the modal again. it should only contain list contain name like 'ABC'.
I'm new to prime faces so any help would be appreciated. Also i apologize for terrible diagrams.

primefaces dynamic navigation not working properly

hello I have this page which work correctly and where I change pages dynamically
from bean with include tag:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head></h:head>
<h:body>
<p:layout fullPage="true">
<p:layoutUnit position="north" size="50" id="top">
<ui:include src="/WEB-INF/template/header.xhtml" />
</p:layoutUnit>
<p:layoutUnit position="south" size="20">
<ui:include src="/WEB-INF/template/footer.xhtml" />
</p:layoutUnit>
<p:layoutUnit position="west" size="400">
<h:form>
<f:ajax render=":centerContentPanel" execute="#this">
<h:commandLink value="page1" action="#{navigationBean.doNav}" update=":centerContentPanel">
<f:param name="test" value="/WEB-INF/pages/profil" />
</h:commandLink>
<h:commandLink value="page2" action="#{navigationBean.doNav}" process="#this">
<f:param name="test" value="/WEB-INF/pages/users" />
</h:commandLink>
</f:ajax>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center" size="400">
<h:panelGroup id="centerContentPanel">
<ui:include src="#{navigationBean.pageName}.xhtml" />
</h:panelGroup>
</p:layoutUnit>
</p:layout>
</h:body>
</html>
In the included pages I have a dialog which contain and included page also.
When I open the dialog the screen stuck and I can't change anything or press anything it become like a disabled page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition 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.org/ui"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:form id="form">
<p:growl id="message" showDetail="true" globalOnly="true" />
<p:dataTable var="user" value="#{usersBean.users}" paginator="true"
reflow="true" widgetVar="multipleDT" resizableColumns="true"
id="multipleDT"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15" selectionMode="single"
selection="#{usersBean.selectedUser}" rowKey="#{user.util}">
<p:ajax event="rowSelect" listener="#{usersBean.onRowSelect}"
update="b4 b3 :form:pickList :form:Submit" />
<p:ajax event="rowUnselect" listener="#{usersBean.onRowUnselect}"
update="b4 b3 :form:pickList :form:Submit" />
<p:column headerText="util" filterMatchMode="contains"
filterBy="#{user.util}" sortBy="#{user.util}" reflow="true">
<h:outputText value="#{user.util}" />
</p:column>
<p:column headerText="nom" filterMatchMode="contains"
filterBy="#{user.nom}" sortBy="#{user.nom}" reflow="true">
<h:outputText value="#{user.nom}" />
</p:column>
<p:column headerText="prenom" filterMatchMode="contains"
filterBy="#{user.prenom}" sortBy="#{user.prenom}" reflow="true">
<h:outputText value="#{user.prenom}" />
</p:column>
<p:column headerText="mail" filterMatchMode="contains"
filterBy="#{user.mail}" sortBy="#{user.mail}" reflow="true">
<h:outputText value="#{user.mail}" />
</p:column>
<f:facet name="footer">
<p:commandButton id="b3" value="ajouter"
oncomplete="PF('dlg3').show();" process="#this" ajax="true"
update="#widgetVar(dlg3) multipleDT">
</p:commandButton>
<p:commandButton id="b4" value="modifier"
disabled="#{usersBean.dis}" oncomplete="PF('dlg2').show();"
ajax="true" process="#this" update="#widgetVar(dlg2) multipleDT">
</p:commandButton>
</f:facet>
</p:dataTable>
<p:pickList id="pickList" value="#{usersBean.profilNonAffecte}"
var="Profil" itemLabel="#{Profil.libProfil}" itemValue="#{Profil}"
effect="bounce" responsive="true" showSourceFilter="true"
showTargetFilter="true" filterMatchMode="contains"
disabled="#{usersBean.dis}" style="width:50%;margin-top:20px;"
converter="primeFacesPickListConverter">
<f:facet name="sourceCaption">Available</f:facet>
<f:facet name="targetCaption">Starting</f:facet>
</p:pickList>
<p:commandButton id="Submit" value="Submit" style="margin-top:5px"
action="#{usersBean.commit}" update="pickList form:message"
disabled="#{usersBean.dis}" />
</h:form>
<h:form>
<p:dialog style="font-size:12px;" widgetVar="dlg3" resizable="false"
width="800" showEffect="explode" hideEffect="explode" modal="true"
id="dlg3" dynamic="true">
<ui:include src="/WEB-INF/pages/ajoutUser.xhtml" />
</p:dialog>
</h:form>
<h:form>
<p:dialog style="font-size:12px;" widgetVar="dlg2" resizable="false"
width="800" showEffect="explode" hideEffect="explode" modal="true"
id="dlg2" dynamic="true">
<ui:include src="/WEB-INF/pages/modifUser.xhtml" />
</p:dialog>
</h:form>
</ui:composition>
dialog code
<ui:composition 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.org/ui"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:panelGrid columns="2" id="grid">
<p:outputLabel for="ta4" value="date début :" />
<p:calendar id="ta4" value="#{usersBean.selectedUser.dateDeb}"
showOn="button" label="date début" required="true"
binding="#{startDateComponent}" pattern="dd/MM/yyyy" navigator="true">
<p:message for="ta4" />
<p:ajax event="dateSelect" listener="#{usersBean.onDateSelect}"
update="ta4" />
</p:calendar>
<p:outputLabel for="ta5" value="date fin :" />
<p:calendar id="ta5" value="#{usersBean.selectedUser.dateFin}"
showOn="button" label="date fin" required="true" pattern="dd/MM/yyyy"
mode="popup">
<f:validator validatorId="dateRangeValidator" />
<f:attribute name="startDateComponent" value="#{startDateComponent}" />
<p:message for="ta5" />
</p:calendar>
<p:outputLabel for="ta6" value="nom :" label="nom" />
<p:inputText rows="6" cols="33" id="ta6"
value="#{usersBean.selectedUser.nom}" required="true">
<p:message for="ta6" />
</p:inputText>
<p:outputLabel for="ta7" value="prénom :" />
<p:inputText rows="6" cols="33" id="ta7"
value="#{usersBean.selectedUser.prenom}" required="true"
label="prenom">
<p:message for="ta7" />
</p:inputText>
<p:outputLabel for="ta8" value="mail :" />
<p:inputText rows="6" cols="33" id="ta8"
value="#{usersBean.selectedUser.mail}" required="true" label="mail"
validatorMessage="email format error ">
<f:validateRegex
pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*#[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />
<p:message for="ta8" />
</p:inputText>
<p:outputLabel for="chk" value="Valid :" />
<p:selectBooleanCheckbox value="#{usersBean.selectedUser.valid}"
id="chk" />
<p:commandButton value="confirmer" id="ajax"
actionListener="#{usersBean.modifier}"
styleClass="ui-priority-primary" update="grid form:message form:multipleDT" >
</p:commandButton>
</h:panelGrid>
</ui:composition>
i find it the problem was modal="true" in the dialog

p:selectBooleanButton primefaces-mobile doesn't change

My p:selectBooleanButton doesn't respond on any click and has this check box at the corner that does respond when I click on it but the label on the button doesn't change at all! maybe someone had this problem and can help me. I'm using primefaces 3.5 and primefaces-mobile 0.9.5 with glassfish 3.1.2.2 server.
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile"
contentType="text/html"
renderKitId="PRIMEFACES_MOBILE">
<pm:page id="page" title="reservation">
<f:facet name="postinit">
<link rel="stylesheet"
href="#{request.contextPath}/javax.faces.resource/calendar/calendar.css.jsf?ln=primefaces-mobile" />
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/jquery.mobile-1.4.0.css" />
<h:outputScript library="js" name="jquery.mobile-1.4.0.js" target="head" />
<h:outputScript library="primefaces-mobile" name="calendar/calendar.js" />
</f:facet>
<pm:view id="menu" swatch="a" >
<pm:header title="reservation">
<f:facet name="left"><p:button value="Back" icon="back" onclick="PrimeFaces.back()"/>
</f:facet>
</pm:header>
<pm:content >
<h:form >
<p:growl id="messageOverlay" />
<h4>reservation date</h4>
<p:calendar value="#{reservationBean.reservDate}" mode="popup" pattern="dd/MM/yyyy HH:mm" stepMinute="30" mindate="01/01/2014"/>
<h4>party size</h4>
<pm:inputRange id="range" minValue="0" maxValue="20" value="#{reservationBean.reservPartySize}" />
<h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
<h:selectOneMenu value="#{reservationBean.reservZone}" >
<f:selectItem itemLabel="Outside" itemValue="outside" />
<f:selectItem itemLabel="Inside" itemValue="inside" />
<f:selectItem itemLabel="Vip" itemValue="vip" />
</h:selectOneMenu>
<p:selectBooleanButton onLabel="yes" offLabel="no" value="#{reservationBean.smokingFlag}" label="aa" />
</h:panelGrid>
<p:commandLink style="width:20%" actionListener="#{reservationBean.reservate}" update=":basicDialog" oncomplete="dlg.show();">
<p:graphicImage style="width: 20%;border: 0; " value="/resources/images/reservation.png" />
</p:commandLink>
</h:form>
<p:growl id="basicDialog" showDetail="true" life="5000" />
</pm:content>
</pm:view>
</pm:page>
`

datatable <p:ajax> exception

Trying to do some simple primefaces datatable ajax work and get the following exception:
javax.servlet.ServletException: /default.xhtml #17,76 Parent not an instance of ClientBehaviorHolder: org.primefaces.component.datatable.DataTable#5fdb7adc
I'm using primefaces 3.3.1. My .xhtml code is here (I copied some of it from the primefaces site to see if I could get this working), anybody got any ideas?
<html xmlns="http://www.w3c.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui" >
<h:head>
</h:head>
<h:body>
<center>
<h:form id="form">
<p:dataTable id="personTable" var="client" value="#{tableBean.persons}"
selection="#{tableBean.person}" selectionMode="single">
<p:ajax event="rowSelect" listener="#{tableBean.onUserSelect}"
update=":form:displayf" oncomplete="carDialog.show()" />
<p:ajax event="rowUnselect"
listener="#{tableBean.onUserUnselect}"
update=":form:displayf" />
<f:facet name="header">
Click "View" button after selecting a row to see details
</f:facet>
<p:column headerText="Name">
#{client.name}
</p:column>
<p:column headerText="Address">
#{client.address}
</p:column>
<p:column headerText="Phone" >
#{client.phone}
</p:column>
</p:dataTable>
<p:dialog id="dialog" header="Car Detail" widgetVar="carDialog" resizable="false"
showEffect="explode" hideEffect="explode">
<h:panelGrid id="displayf" columns="2" cellpadding="4">
<h:outputText value="Name:" />
<h:outputText value="#{tableBean.person.name}" />
<h:outputText value="Address:" />
<h:outputText value="#{tableBean.person.address}" />
<h:outputText value="Phone:" />
<h:outputText value="#{tableBean.person.phone}" />
</h:panelGrid>
</p:dialog>
</h:form>
</center>
</h:body>
</html>

Load diff-diff data tables in center layout with tree event

I am using JSF 2.1 and PrimeFaces 3.0.M4. I want to change center layout dynamically without reloading the main page on click of tree nodes.
The code of the main page MainExplorer.xhtml is:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>XX</title>
</h:head>
<h:body>
<p:layout fullPage="true">
<p:layoutUnit position="north" size="100" header="Top" resizable="true" closable="false" collapsible="true">
<h:outputText value="Top unit content." />
</p:layoutUnit>
<p:layoutUnit position="south" size="100" header="Bottom" resizable="true" closable="false" collapsible="true">
<h:outputText value="South unit content." />
</p:layoutUnit>
<p:layoutUnit position="west" size="150" header="Left" resizable="true" closable="false" collapsible="true">
<h:form id="form" style="width: 150;" >
<p:growl id="messages" showDetail="true" />
<p:tree value="#{treeBean.root}" var="node" dynamic="true" cache="false" selectionMode="single" selection="#{treeBean.selectedNode}">
<p:ajax event="expand" update=":form:messages" listener="#{treeBean.onNodeExpand}" />
<p:ajax event="collapse" update=":form:messages" listener="#{treeBean.onNodeCollapse}" />
<p:ajax event="select" update=":form:messages" listener="#{treeBean.onNodeSelect}" />
<p:ajax event="unselect" update=":form:messages" listener="#{treeBean.onNodeUnselect}" />
<p:treeNode><h:outputText value="#{node}" /></p:treeNode>
</p:tree>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center" header="Welcome : user name" resizable="true" closable="true" collapsible="true">
</p:layoutUnit>
</p:layout>
</h:body>
</html>
I want to open a new page or (of?) diff-diff data tables on click of tree event.
E.g. CallListPage.xhtml. I want to open this page in center layout. There may be a number of pages open in center layout.
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>XX</title>
</h:head>
<h:body>
<h:form id="usr1" title="Call List">
<p:growl id="growl" showDetail="true"/>
<p:dataTable var="callRow"
value="#{callList.callDataModel}"
rowKey="#{callRow.contspecs}"
selection="#{callList.advCallMstrSelected}" selectionMode="single"
paginator="true" rows="5"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
>
<p:ajax event="rowSelect" listener="#{callList.onRowSelect}" update=":usr1:display :usr1:growl" oncomplete="callDialog.show()" />
<p:ajax event="rowUnselect" listener="#{callList.onRowUnselect}" update=":usr1:growl"/>
<p:column><f:facet name="header">Specification</f:facet><h:outputText value="#{callRow.contspecs}"/></p:column>
<p:column><f:facet name="header">Exchange</f:facet><h:outputText value="#{callRow.exchange}"/></p:column>
<p:column><f:facet name="header">Symbol</f:facet><h:outputText value="#{callRow.symbol}"/></p:column>
<p:column><f:facet name="header">Call</f:facet><h:outputText value="#{callRow.call_type}"/></p:column>
<p:column><f:facet name="header">Trigger</f:facet><h:outputText value="#{callRow.trigger_price}"/></p:column>
<p:column><f:facet name="header">CMP</f:facet><h:outputText value="#{callRow.ltp}"/></p:column>
<p:column><f:facet name="header">SL</f:facet><h:outputText value="#{callRow.sl_price}"/></p:column>
<p:column><f:facet name="header">1st Tgt.</f:facet><h:outputText value="#{callRow.tg_1}"/></p:column>
<p:column><f:facet name="header">2nd Tgt.</f:facet><h:outputText value="#{callRow.tg_2}"/></p:column>
<p:column><f:facet name="header">3rd Tgt.</f:facet><h:outputText value="#{callRow.tg_3}"/></p:column>
<p:column><f:facet name="header">4th Tgt.</f:facet><h:outputText value="#{callRow.tg_4}"/></p:column>
<p:column><f:facet name="header">Status</f:facet><h:outputText value="#{callRow.call_status}"/></p:column>
<p:column><f:facet name="header">Call By</f:facet><h:outputText value="#{callRow.makerid}"/></p:column>
<f:facet name="footer">
<p:commandButton value="View" update="usr1:display" oncomplete="carDialog.show()"/>
</f:facet>
</p:dataTable>
<p:dialog header="Call Detail" widgetVar="callDialog" resizable="false" modal="true"
showEffect="explode" hideEffect="explode">
<h:panelGrid id="display" columns="2" cellpadding="4">
<h:outputText value="exchange" />
<h:outputText value="#{callList.advCallMstrSelected.exchange}" />
<h:outputText value="Valid Upto:" />
<h:outputText value="#{callList.advCallMstrSelected.valid_upto}" />
<h:outputText value="Offer at:" />
<h:outputText value="#{callList.advCallMstrSelected.call_price1}" />
<h:outputText value="Call Entry Time:" />
<h:outputText value="#{callList.advCallMstrSelected.call_entrytime}" />
<h:outputText value="Message Time:" />
<h:outputText value="#{callList.advCallMstrSelected.msg_genration_time}" />
<h:outputText value="1st Target Hit Time :" />
<h:outputText value="#{callList.advCallMstrSelected.tg_1_hit_time}" />
<h:outputText value="2nd Target Hit Time :" />
<h:outputText value="#{callList.advCallMstrSelected.tg_2_hit_time}" />
<h:outputText value="3rd Target Hit Time :" />
<h:outputText value="#{callList.advCallMstrSelected.tg_3_hit_time}" />
<h:outputText value="4th Target Hit Time :" />
<h:outputText value="#{callList.advCallMstrSelected.tg_4_hit_time}" />
<h:outputText value="Stop Loss Hit Time :" />
<h:outputText value="#{callList.advCallMstrSelected.sl_hit_time}" />
<h:outputText value="Call finish Time:" />
<h:outputText value="#{callList.advCallMstrSelected.call_close_time}" />
<h:outputText value="SMS to:" />
<h:outputText value="#{callList.advCallMstrSelected.sms_to_group}" />
<h:outputText value="Message Group:" />
<h:outputText value="#{callList.advCallMstrSelected.messagegroup}" />
<h:outputText value="SubScriber's Group:" />
<h:outputText value="#{callList.advCallMstrSelected.subscribersgroup}" />
<h:outputText value="Message Remarks:" />
<h:outputText value="#{callList.advCallMstrSelected.msg_remarks}" />
</h:panelGrid>
</p:dialog>
</h:form>
</h:body>
</html>
How can I open this?
Done by changing the line!!
old code
<p:ajax event="select" update=":form:messages" listener="#{treeBean.onNodeSelect}" />
<p:ajax event="unselect" update=":form:messages" listener="#{treeBean.onNodeUnselect}" />
new code
<p:ajax event="select" update=":formCenter:panelGroupCenter" listener="#{treeBean.onNodeSelect}" />
<p:ajax event="unselect" update=":formCenter:panelGroupCenter" listener="#{treeBean.onNodeUnselect}" />
for center layout use this :
<p:layoutUnit id="cent" position="center" header="Welcome : user name"
resizable="true" closable="true" collapsible="true">
<h:form id="formCenter" style="text-align: center" >
<h:panelGroup id="panelGroupCenter">
<ui:include src="#{treeBean.openPage}.xhtml" />
</h:panelGroup>
</h:form>
</p:layoutUnit>

Resources