when i use the add <p:commandButton> sometimes the remove works again for a specific amout of table elements.
seems to be a problem with multiple confirm dialog instances. another problem is that i can't set it to modal else the whole window is locked (only for bad rendered confirm dialogs).
Code: Select all
<ui:composition 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.prime.com.tr/ui" template="template.xhtml">
<ui:define name="content">
<p:messages />
<p:panel id="panel" header="sharelist">
<p:dataTable id="table" scrollable="false" value="#{shares.shares}"
var="share">
<p:column width="600" sortBy="#{share}">
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{share}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="" />
</f:facet>
<h:form id="removeform">
<p:commandButton value="del" action="#{shares.removeShare}" ajax="false" async="false">
<p:collector value="#{share}" removeFrom="#{shares.shares}" />
<p:confirmDialog yesLabel="yepp" noLabel="Noooo" width="350px" fixedCenter="true" height="100px"
message="really?"
header="delete" severity="warn" />
</p:commandButton>
</h:form>
</p:column>
</p:dataTable>
</p:panel>
<h:form>
<p:panel id="p2" header="create share">
<h:panelGrid columns="2">
<h:outputLabel value="Name : *"></h:outputLabel>
<h:inputText id="txt_sharename" value="#{shares.shareName}"
required="true" />
<h:outputLabel value="User : *"></h:outputLabel>
<h:inputText id="txt_usrname" value="#{shares.shareUser}"
required="true" />
<h:panelGroup>
<p:commandButton value="add" action="#{shares.addShare}" update="panel">
<p:collector value="#{shares.shares}" addTo="#{shares.shares}" />
<p:confirmDialog yesLabel="yepp" noLabel="Noooo" width="350px" fixedCenter="true" height="100px"
message="really?"
header="add" severity="warn" />
</p:commandButton>
</h:panelGroup>
</h:panelGrid>
</p:panel>
</h:form>
</ui:define>
</ui:composition>