I have the next issue with a p:dialog in a xhtml. In this p:dialog I have 3 buttons in the bottom of the dialog. The code is:
<p:dialog header="window" minimizable="true" maximizable="true" width="800" height="500" modal="true">
<p:outputPanel>
<p:panelGrid columns="1">
<p:dataGrid columns="1" var="var" layout="grid">
<p:panel style="text-align: justify;">
<f:facet name="header">
<h:outputText value="##{fila + 1}"/>
<p:outputPanel style="float:right;">
<h:outputText value="reter"/>
<h:outputText value="fdsfds" >
<f:convertDateTime pattern="dd/MM/yyyy HH:mm:ss" />
</h:outputText>
</p:outputPanel>
</f:facet>
<p:panelGrid columns="1" >
<h:outputText value="gefdgdf" />
</p:panelGrid>
</p:panel>
</p:dataGrid>
<p:row>
<br/>
<p:column>
<h:outputText value="gdfgdf" />
</p:column>
</p:row>
</p:panelGrid>
</p:outputPanel>
<f:facet name="footer">
<p:outputPanel style="float:right;">
<p:commandLink >
<i class="fa fa-comment-o fa-2x"/>
</p:commandLink>
<p:commandLink >
<i class="fa fa-floppy-o fa-2x"/>
</p:commandLink>
<p:commandLink >
<i class="fa fa-pencil fa-2x"/>
</p:commandLink>
</p:outputPanel>
</f:facet>
</p:dialog>
When I maximize the dialog, the buttons (f:facet name="footer") don't show it. Why?
Related
I have primefaces datatable. The paginator is fixed to the bottom of the window. To achieve this I have manipulated the original css selector which you can see below. I would like to achieve that only the table rows are scrolling. The table header and the paginator should stay as they are.
Datatable View
<p:dataTable
id="dtaInternationalization"
binding="#{internationalizationController.dtaHdrLang}"
value="#{internationalizationController.itemsHdrLang}"
var="item"
widgetVar="widInternationalization"
style="margin-bottom:20px"
selectionMode="multiple"
liveScroll="true"
scrollable="true"
scrollHeight="665"
selection="#{internationalizationController.selectedItemsHdrLang}"
filteredValue="#{internationalizationController.filteredItemsHdrLang}"
sortMode="multiple"
paginator="true"
paginatorPosition="bottom"
paginatorAlwaysVisible="true"
rows="25"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
currentPageReportTemplate="{totalRecords} record(s)"
rowsPerPageTemplate="25,50,75"
rowKey="#{item.pk}"
resizableColumns="true"
liveResize="true"
draggableColumns="true">
<!-- DATATABLE HEADER SECTION -->
<f:facet name="header">
<p:toolbar styleClass="fw-panel-title-header">
<p:toolbarGroup styleClass="fw-toolbar-group-left">
<p:outputLabel id="lblPageTitle"
value="Edit Datatable Settings" styleClass="fw-title-bar" />
</p:toolbarGroup>
<p:toolbarGroup styleClass="fw-toolbar-group-right">
<p:outputLabel value="Global Search: "
styleClass="fw-global-search" />
<p:inputText id="globalFilter"
onkeyup="PF('widTableView').filter()" style="width:250px"
placeholder="Enter Keyword" />
</p:toolbarGroup>
<p:toolbarGroup styleClass="fw-toolbar-group-right">
<p:commandButton id="cbProperties" icon="fa fa-gear" title="View Settings" />
<p:commandButton id="refreshButton" value="Refresh"
icon="fa fa-refresh"
actionListener="#{internationalizationController.refresh}"
update="dtaInternationalization" />
<p:commandButton id="addButton" value="Add" icon="fa fa-plus"
actionListener="#{internationalizationController.addLanguage}"
oncomplete="PF('widAddLanguage').show()" />
<p:commandButton id="deleteButton" value="Delete"
icon="fa fa-remove"
disabled="#{empty internationalizationController.selectedItemsHdrLang}" />
</p:toolbarGroup>
<p:toolbarGroup styleClass="fw-toolbar-group-right">
<p:ajaxStatus
style="width:20px;height:20px;position:relative;margin-right:15px;">
<f:facet name="start">
<i class="fa fa-circle-o-notch fa-spin ajax-loader"
aria-hidden="true"></i>
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
</p:toolbarGroup>
<p:toolbarGroup styleClass="fw-toolbar-group-right"
style="margin-right:15px">
<p:messages id="msgs" showDetail="true" closable="false" styleClass="fw-messages-title-bar" showSummary="false" showIcon="false" />
</p:toolbarGroup>
</p:toolbar>
</f:facet>
<!-- DATATABLE COLUMN SECTION -->
<p:column headerText="Image" styleClass="center" width="50">
<o:graphicImage value="#{item.flagImageSmall}" dataURI="true"
rendered="#{!empty item.flagImageSmall}" />
</p:column>
<p:column headerText="Default" styleClass="center"
filterBy="#{item.languageDefault}" filterMatchMode="equals"
sortBy="#{item.languageDefault}" width="110">
<f:facet name="filter">
<p:selectOneButton
onchange="PF('widInternationalization').filter()"
styleClass="custom-filter">
<f:converter converterId="javax.faces.Boolean" />
<f:selectItem itemLabel="All" itemValue="" />
<f:selectItem itemLabel="True" itemValue="true" />
<f:selectItem itemLabel="False" itemValue="false" />
</p:selectOneButton>
</f:facet>
<p:outputLabel rendered="#{item.languageDefault}">
<i class="fa fa-check" />
</p:outputLabel>
</p:column>
<p:column headerText="Active" styleClass="center"
filterBy="#{item.activeFlag}" filterMatchMode="equals"
sortBy="#{item.activeFlag}" width="110">
<f:facet name="filter">
<p:selectOneButton
onchange="PF('widInternationalization').filter()"
styleClass="custom-filter">
<f:converter converterId="javax.faces.Boolean" />
<f:selectItem itemLabel="All" itemValue="" />
<f:selectItem itemLabel="True" itemValue="true" />
<f:selectItem itemLabel="False" itemValue="false" />
</p:selectOneButton>
</f:facet>
<p:outputLabel rendered="#{item.activeFlag}">
<i class="fa fa-check" />
</p:outputLabel>
</p:column>
<p:column headerText="Code" styleClass="center" width="90"
filterBy="#{item.languageCode}" filterMatchMode="contains"
sortBy="#{item.languageCode}">
<h:outputText value="#{item.languageCode}" />
</p:column>
<p:column headerText="Language" filterBy="#{item.languageName}"
filterMatchMode="contains" sortBy="#{item.languageName}">
<h:outputText value="#{item.languageName}" />
</p:column>
<p:column headerText="Created" filterBy="#{item.createDate}"
filterMatchMode="contains" sortBy="#{item.createDate}" width="6%">
<h:outputText value="#{item.createDate}">
<f:convertDateTime
locale="#{parameterSessionController.localeCode}" type="localDateTime"
dateStyle="medium" timeStyle="medium" />
</h:outputText>
</p:column>
<p:column headerText="Created by" filterBy="#{item.createUser}"
filterMatchMode="contains" sortBy="#{item.createUser}" width="6%">
<h:outputText value="#{item.createUser}" />
</p:column>
<p:column headerText="Modified" filterBy="#{item.modifyDate}"
filterMatchMode="contains" sortBy="#{item.modifyDate}" width="6%">
<h:outputText value="#{item.modifyDate}">
<f:convertDateTime
locale="#{parameterSessionController.localeCode}" type="localDateTime"
dateStyle="medium" timeStyle="medium" />
</h:outputText>
</p:column>
<p:column headerText="Modfied by" filterBy="#{item.modifyUser}"
filterMatchMode="contains" sortBy="#{item.modifyUser}" width="6%">
<h:outputText value="#{item.modifyUser}" />
</p:column>
<p:ajax event="rowDblselect"
listener="#{internationalizationController.editLanguage}"
oncomplete="PF('widLanguage').show()" />
<p:ajax event="rowSelect" update="deleteButton" />
<p:ajax event="rowUnselect" update="deleteButton" />
</p:dataTable>
The paginator css selectorI have manipulated as follow:
body .ui-datatable .ui-paginator {
padding: 6px 12px;
border-style: none;
border-top: solid 2px #9fd037;
position: fixed;
bottom: 0px;
width: -webkit-fill-available;
z-index: 1;
}
Many Thanks in Advance
i have two p:commandLink:
<p:commandLink update=":form:livreDetail" oncomplete="PF('livreDialog').show()" title="View Detail">
<h:outputText styleClass="ui-icon ui-icon-search" style="margin:0 auto;" />
<f:setPropertyActionListener value="#{livre}" target="#{livreDataGridView.selectedLivre}" />
</p:commandLink>
<p:commandLink update=":form:ajoutPanel" oncomplete="if(#{ empty loginBean.c }){PF('connectDialog').show()}else {PF('ajoutLivrePanier').show()} " title="ajouter au panier">
<h:outputText styleClass="ui-icon ui-icon-cart" style="margin:0 auto;" />
<f:setPropertyActionListener value="#{livre}" target="#{livreDataGridView.selectedLivre}" />
</p:commandLink>
The first p:commandLink one is showing and updating the content of livreDialog p:dialog.
The second p:commandLink should show connectDialog p:dialog when loginBean.c property is null, and ajoutLivrePanier p:dialog when is not.
my code works correctly when the loginBean property is null. But when is not it gives strange results:
When i click the first p:commandLink it only shows the livreDialog p:dialog without updating it's content. Also the validation message of the connectDialog p:dialog is shown up. it is weird !!
When i click the second p:commandLink only the validation message of connectDialog p:dialog is shown up, Weird too !!
Here is the hole code:
<p:messages globalOnly="true" autoUpdate="true" showDetail="false"/>
<h:form id="form">
<p:dataGrid var="livre" value="#{livreListBean.livresList}" columns="3"
rows="12" paginator="true" id="livres"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="6,12,16">
<f:facet name="header">
Livres
</f:facet>
<p:panel header="#{livre.titre}" style="text-align:center">
<h:panelGrid columns="1" style="width:100%">
<h:outputText value="#{livre.auteur}" />
<h:outputText value="#{livre.datePublication}" />
<p:commandLink update=":form:livreDetail" oncomplete="PF('livreDialog').show()" title="View Detail">
<h:outputText styleClass="ui-icon ui-icon-search" style="margin:0 auto;" />
<f:setPropertyActionListener value="#{livre}" target="#{livreDataGridView.selectedLivre}" />
</p:commandLink>
<p:commandLink update=":form:ajoutPanel" oncomplete="if(#{ empty loginBean.c }){PF('connectDialog').show()}else {PF('ajoutLivrePanier').show()} " title="ajouter au panier">
<h:outputText styleClass="ui-icon ui-icon-cart" style="margin:0 auto;" />
<f:setPropertyActionListener value="#{livre}" target="#{livreDataGridView.selectedLivre}" />
</p:commandLink>
</h:panelGrid>
</p:panel>
</p:dataGrid>
<p:dialog header="Info Livre" widgetVar="livreDialog" modal="true" showEffect="fade" hideEffect="fade" resizable="false">
<p:outputPanel id="livreDetail" style="text-align:center;">
<p:panelGrid columns="2" rendered="#{not empty livreDataGridView.selectedLivre}" columnClasses="label,value">
<h:outputText value="Titre:" />
<h:outputText value="#{livreDataGridView.selectedLivre.titre}" />
<h:outputText value="Auteur" />
<h:outputText value="#{livreDataGridView.selectedLivre.auteur}" />
<h:outputText value="Date de publication:" />
<h:outputText value="#{livreDataGridView.selectedLivre.datePublication}" />
<h:outputText value="Prix" />
<h:outputText value="$#{livreDataGridView.selectedLivre.prix}" />
</p:panelGrid>
</p:outputPanel>
</p:dialog>
<h:panelGroup id="livrePanier">
<p:dialog header="Se connecter" widgetVar="connectDialog" modal="true" showEffect="fade" hideEffect="fade" resizable="false">
<p:outputPanel id="connecterPanel" style="text-align:center;">
<h:panelGrid columns="3" >
<p:outputLabel for="mail" value="E-mail:" />
<p:inputText id="mail" value="#{loginBean.email}" required="true" requiredMessage="Vous devez entrer votre e-mail"/>
<p:message for="mail"/>
<p:outputLabel for="password" value="Password:" />
<p:password id="password" value="#{loginBean.password}" required="true" requiredMessage="Vous devez entrer votre password"/>
<p:message for="password"/>
<p:commandButton value="Se connecter" action="#{loginBean.LoginProcess()}" process="connecterPanel" update="connecterPanel"/>
</h:panelGrid>
</p:outputPanel>
</p:dialog>
<p:dialog header="Ajouter au panier" widgetVar="ajoutLivrePanier" modal="true" showEffect="fade" hideEffect="fade" resizable="false">
<p:outputPanel id="ajoutPanel" style="text-align:center;" rendered="#{not empty livreDataGridView.selectedLivre}">
<p:outputLabel value="Voulez vous ajouter ce produit au panier ?"/>
<h:panelGrid columns="2" >
<p:outputLabel value="#{livreDataGridView.selectedLivre.titre}" />
<p:outputLabel value="#{livreDataGridView.selectedLivre.prix}" />
<p:commandButton value="Oui" action="#{livreDataGridView.ajouterLivreAuPanier()}" process="connecterPanel" update="connecterPanel" oncomplete="PF('ajoutLivrePanier').hide()"/>
<p:commandButton value="Annuler" onclick="PF('ajoutLivrePanier').hide()"/>
</h:panelGrid>
</p:outputPanel>
</p:dialog>
</h:panelGroup>
</h:form>
i'll appreciate your help to fix the problem
You need process="#this" on your commandLinks. Without it JSF processes the whole form, that's why you see those validation failures, which in turn cause the Invoke Application phase to be skipped.
See also: Understanding PrimeFaces process/update and JSF f:ajax execute/render attributes.
I want to show the details of a person with a dialog as shown on Facebook when the mouse is placed on a person's name.
I am using dialog framework in primefaces.
The dialog should display data that must be loaded when the mouse is placed on the person.
The problem is the dialog position:
<p:dataTable filterDelay="700" reflow="true" emptyMessage="No se encontraron elementos" widgetVar="tblist"
id="dataTableList" var="item" paginator="true" paginatorPosition="bottom"
rows="10" rowKey="#{item.idPersona}" value="#{listadoPersonasMB.listPersonas}" filteredValue="#{listadoPersonasMB.filterlistPersonas}">
<f:facet name="header">
Resultado de la búsqueda #{listadoPersonasMB.cantPerFilter}
</f:facet>
<p:ajax event="filter" oncomplete="handleLoadStart();"/>
<p:column style="width: 50px">
<p:graphicImage style="border-radius: 50%" alt="image" id="fotoPer" value="#{listadoPersonasMB.fotoPersonaTabla}" cache="false" width="100%">
<f:param name="personId" value="#{item.idPersona}" />
</p:graphicImage>
</p:column>
<p:column width="100%" headerText="Nombre y apellidos" sortBy="#{item.nombre}" style="text-align: left" filterBy="#{item.nombre} #{item.nombre2} #{item.apellidos} #{item.apellidos2}" filterMatchMode="contains">
<p:commandLink ajax="false" id="pict" action="#{mBDetallesPersona.detallesPersona(item.idPersona)}" onmouseover="showPersonDetail();">
<h:outputText value="#{item.nombre} #{item.nombre2} #{item.apellidos} #{item.apellidos2}"/>
</p:commandLink>
</p:column>
</p:dataTable>
<p:remoteCommand id="rcomperson" name="showPersonDetail" process="#this"
actionListener="#{listadoPersonasMB.showPersonDetail}"
update=":form2:perDeta" oncomplete="PF('carOP').show('#{component.clientId}')"
/>
<p:overlayPanel widgetVar="carOP" showEffect="fade" hideEffect="fade">
<p:outputPanel id="perDeta">
<ui:include src="perDialog.xhtml" />
</p:outputPanel>
</p:overlayPanel>
I finally found the solution with overlayPanel, remoteCommand and some javascript code
xhtml
<p:dataTable filterDelay="700" reflow="true" emptyMessage="No se encontraron elementos" widgetVar="tblist"
id="dataTableList" var="item" paginator="true" paginatorPosition="bottom"
rows="10" rowKey="#{item.idPersona}" value="#{listadoPersonasMB.listPersonas}" filteredValue="#{listadoPersonasMB.filterlistPersonas}">
<f:facet name="header">
Resultado de la búsqueda #{listadoPersonasMB.cantPerFilter}
</f:facet>
<p:column style="width: 50px">
<p:graphicImage style="border-radius: 50%" alt="image" id="fotoPer" value="#{listadoPersonasMB.fotoPersonaTabla}" cache="false" width="100%">
<f:param name="personId" value="#{item.idPersona}" />
</p:graphicImage>
</p:column>
<p:column width="100%" headerText="Nombre y apellidos" sortBy="#{item.nombre}" style="text-align: left" filterBy="#{item.nombre} #{item.nombre2} #{item.apellidos} #{item.apellidos2}" filterMatchMode="contains">
<p:commandLink ajax="false" action="#{mBDetallesPersona.detallesPersona(item.idPersona)}" onmouseover="loadPersonDetalles('#{component.clientId}', #{item.idPersona});">
<h:outputText value="#{item.nombre} #{item.nombre2} #{item.apellidos} #{item.apellidos2}"/>
</p:commandLink>
</p:column>
<p:column headerText="Edad" sortBy="#{item.calculaEdad()}" style="text-align: right; width: 60px" sortFunction="#{utilMB.ordenarEnteros}">
<h:outputText value="#{item.calculaEdad()}"/>
</p:column>
<p:column filterBy="#{item.miembro eq true ? 'Sí' : 'No'}" headerText="Membresía" filterMatchMode="contains" style="width: 220px">
<h:outputText value="#{item.miembro eq true ? 'Sí' : 'No'}" />
<span> <p:commandButton rendered="#{mBLogin.siTieneFuncion('AdminPersonas')}" icon="fa fa-refresh Fs16 white" title="Cambiar"
actionListener="#{listadoPersonasMB.selectToSetMember(item)}" oncomplete="PF('newDialog').show()"/> </span>
</p:column>
<p:column style="text-align: center; width: 40px" rendered="#{mBLogin.siTieneFuncion('AdminPersonas')}">
<p:commandButton icon="fa fa-pencil Fs16 white" title="Modificar"
action="#{listadoPersonasMB.cargaPersonaModi(item.idPersona)}"/>
</p:column>
<p:column style="text-align: center; width: 40px" rendered="#{mBLogin.siTieneFuncion('AdminPersonas')}">
<p:commandButton icon="fa fa-trash Fs16 white" title="Dar Baja"
action="#{mBDeletePersona.detallesPersona(item.idPersona)}"/>
</p:column>
</p:dataTable>
<p:remoteCommand name="showPersonDetail" process="#this"
actionListener="#{listadoPersonasMB.showPersonDetail}"
update=":form2:perDeta" oncomplete="loadPanel();"/>
<p:overlayPanel widgetVar="carOP" my="right bottom" showEffect="fade" hideEffect="fade"
dismissable="true" hideEvent="onmouseout"
dynamic="true"
>
<p:outputPanel id="perDeta">
<ui:include src="perDialog.xhtml" />
</p:outputPanel>
</p:overlayPanel>
javascript code, send param to remoteCommand
<h:outputScript id="waypointScript" target="body">
var idcom = 0;
function loadPersonDetalles(idC, idPer) {
showPersonDetail([{name:'x', value:idPer}, {name:'y', value:20}]);
idcom = idC;
}
function loadPanel() {
PF('carOP').show(idcom);
}
</h:outputScript>
backingbean
public void showPersonDetail() {
try {
Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
this.idPerSeledtToDialog = Integer.valueOf(params.get("x"));
} catch (Exception e) {
JsfUtil.addErrorMessage(e, "Error: filterListener() " + e.getMessage());
}
}
<ui:composition template="/template.xhtml">
<ui:define name="title">
<h:outputText value="#{bundle.ListDriverTitle}"></h:outputText>
</ui:define>
<ui:define name="body">
<h:form id="driverForm">
<h:panelGrid id="messagePanel" >
<h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
</h:panelGrid>
<h:panelGrid >
<p:dataTable value="#{driverController.items}" lazy="true" selectionMode="single" paginator="true" rows="10" paginatorPosition="bottom" var="item" id="itemTable" rowKey="#{item.id}" styleClass="ui-datatable-hor-scroll">
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_id}"/>
</f:facet>
<h:outputText value="#{item.id}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_surname}"/>
</f:facet>
<h:outputText value="#{item.surname}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_names}"/>
</f:facet>
<h:outputText value="#{item.names}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_idNumber}"/>
</f:facet>
<h:outputText value="#{item.idNumber}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_driverCode}"/>
</f:facet>
<h:outputText value="#{item.driverCode}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_active}"/>
</f:facet>
<h:outputText value="#{item.active}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_type}"/>
</f:facet>
<h:outputText value="#{item.type}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_cellNumber}"/>
</f:facet>
<h:outputText value="#{item.cellNumber}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_createdDate}"/>
</f:facet>
<h:outputText value="#{item.createdDate}">
<f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
</h:outputText>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDriverTitle_whs}"/>
</f:facet>
<h:outputText value="#{item.whs.name}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value=" "/>
</f:facet>
<p:commandButton action="#{driverController.prepareView}" value="#{bundle.ListDriverViewLink}" ajax="false" immediate="false">
<f:setPropertyActionListener target="#{driverController.selectedDriver}" value="#{item}"/>
</p:commandButton>
<h:outputText value=" "/>
<p:commandButton action="#{driverController.prepareEdit}" value="#{bundle.ListDriverEditLink}" ajax="false" immediate="false">
<f:setPropertyActionListener target="#{driverController.selectedDriver}" value="#{item}" />
</p:commandButton>
<h:outputText value=" "/>
<p:commandButton action="#{driverController.destroy}" value="Delete" ajax="false" immediate="false">
<f:setPropertyActionListener target="#{driverController.selectedDriver}" value="#{item}"/>
</p:commandButton>
</p:column>
</p:dataTable>
</h:panelGrid>
<br />
<p:commandButton action="#{driverController.prepareCreate}" value="#{bundle.ListDriverCreateLink}" ajax="false"/>
<p:menuButton value="Download Documents">
<p:menuitem immediate="true" process="#none" ajax="false">
<h:commandLink target="_blank">
<img src="#{resource['images/excel-icon.png']}" style="border: none; width: 15px; height: 15px;"/>
<p:dataExporter type="xls" target="itemTable" fileName="DriversList" pageOnly="true"/>
<span>Current page</span>
</h:commandLink>
</p:menuitem>
<p:menuitem immediate="true" process="#none" ajax="false">
<h:commandLink target="_blank">
<img src="#{resource['images/excel-icon.png']}" style="border: none; width: 15px; height: 15px;"/>
<p:dataExporter type="xls" target="itemTable"fileName="DriversList" p/>
<span>All pages</span>
</h:commandLink>
</p:menuitem>
</p:menuButton>
</h:form>
</ui:define>
</ui:composition>
When I download an excel file, the buttons from the table are also downloaded. What can I do to exclude them.
If you need more explanation please feel free to ask me. I need the best solution. Thank you
You can exclude columns, which should not be exported by using:
<p:column exportable="false">
I need create a list of Phones in na and submit before.
In my firt try the object came empty and the list shows a list of null objets
<h:panelGrid id="gridPhone" columns="5">
<h:outputText value="Numero:" />
<h:inputText value="#{profileMB.phone.number}" size="10"/>
<h:outputText value="Tipo" />
<p:selectOneMenu id="selPhoneType" value="#{profileMB.phone.type}" >
<f:selectItems var="phoneType" value="#{profileMB.listPhoneTypes}" itemLabel="#{phoneType.description}" itemValue="#{phoneType}" />
</p:selectOneMenu>
<p:commandButton action="#{profileMB.addPhoneOnList()}" immediate="true" value="adicionar" update=":messageGrowl listPhones"/>
<f:facet name="footer">
<h:panelGroup style="display:block; text-align:center;width: 300px;">
<p:selectOneListbox id="listPhones" >
<f:selectItems var="phones" value="#{profileMB.phones}" itemLabel="#{phones.number}" />
</p:selectOneListbox>
</h:panelGroup>
</f:facet>
<p:ajaxStatus style="display:block;margin-bottom:2em;height:24px;">
<f:facet name="default">
<h:outputText value="" />
</f:facet>
<f:facet name="start">
<p:graphicImage name="/images/spiffygif_30x30.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
</h:panelGrid>
in my second try the object was filled but the Litt does update
<h:panelGrid id="gridPhone" columns="5">
<h:outputText value="Numero:" />
<h:inputText value="#{profileMB.phone.number}" size="10"/>
<h:outputText value="Tipo" />
<p:selectOneMenu id="selPhoneType" value="#{profileMB.phone.type}" >
<f:selectItems var="phoneType" value="#{profileMB.listPhoneTypes}" itemLabel="#{phoneType.description}" itemValue="#{phoneType}" />
</p:selectOneMenu>
<p:commandButton action="#{profileMB.addPhoneOnList()}" partialSubmit="true" process="gridPhone, listPhones" value="adicionar" update=":messageGrowl"/>
<f:facet name="footer">
<h:panelGroup style="display:block; text-align:center;width: 300px;">
<p:selectOneListbox id="listPhones" >
<f:selectItems var="phones" value="#{profileMB.phones}" itemLabel="#{phones.number}" />
</p:selectOneListbox>
</h:panelGroup>
</f:facet>
<p:ajaxStatus style="display:block;margin-bottom:2em;height:24px;">
<f:facet name="default">
<h:outputText value="" />
</f:facet>
<f:facet name="start">
<p:graphicImage name="/images/spiffygif_30x30.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
</h:panelGrid>
I have try sereval forms but dont work
:(