Search code examples
jsf-2primefaces

p: inputText freezes when I update the form


I am using JSF 2 with primefaces 3.5 and i have the following problem: p: inputText freezes when I update the form, I have the following code in my xhtml:

 <p:panel visible="#{clientesMB.renderPanelEditPerFirmas}" id="panelEditEmpresa" header="Adicionar Personas"> 
                    <h:panelGrid columns="2">  
                        <h:outputText value="Nombre: *" style="font-size: 12px"/>  
                        <p:inputText value="#{clientesMB.personaFirma}"  
                                     style="width: 400px;"
                                     label="text"/>                       
                    </h:panelGrid> 
                    <p:dataTable id="cuentasTabla" var="car" value="#{clientesMB.selectedEmpCliente.personasFirmas}"  widgetVar="carsTable">  
                        <f:facet name="header">  
                            Listado de Personas
                        </f:facet>  
                        <p:column headerText="Nombre" style="width:25%">  
                            <h:outputText value="#{car.nombre}"/>
                        </p:column>   
                        <p:column style="width:4%" exportable="false">  
                            <p:commandButton id="selectButton"  onclick="confirmation.show()" icon="ui-icon-trash" title="Eliminar">  
                                <f:setPropertyActionListener value="#{car}" target="#{clientesMB.personaFirmasSelect}"/>  
                            </p:commandButton>  
                        </p:column>
                    </p:dataTable>  
                </p:panel> 

when I call the Confirmation and I click yes, the outputText freezes. If I refresh all page then outputText work ok. This is the confirmation:

                <p:confirmDialog id="confirmDialog" message="Realmente desea eliminar el elemento?"  
                             header="Mensaje de Confirmación" severity="alert" widgetVar="confirmation">  
                <p:commandButton id="confirm" value="Si" oncomplete="confirmation.hide()"  
                                 actionListener="#{clientesMB.deleteSelectPersonaFirma}" update=":form2"/> 
                <p:commandButton id="decline" value="No" onclick="confirmation.hide()" type="button" />   
            </p:confirmDialog>

form2 contain the panel "panelEditEmpresa", and confirmDialog is in other form.


Solution

  • I used your code and i don't have your issue, did you use ajax for inputtext ? (BalusC: How to use <h:form> in JSF page? Single form? Multiple forms? Nested forms?)