Erro with update p:dialog

UI Components for JSF
Post Reply
Damascoa
Posts: 1
Joined: 05 Apr 2013, 02:05

05 Apr 2013, 02:19

Hello,
I have p:dialog into p:layout but when i click button show dialog but not update form update.
Sorry for my bad english. :lol:

Code: Select all


<?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:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./../WEB-INF/TemplateRoot.xhtml">

            <ui:define name="centro" id="centro">
                <h:form id="tabelaPapeis">
                    <p:dataTable value="#{papelMB.listarPapeis()}" var="pap">
                        <p:column headerText="Codigo">
                            <h:outputText value="#{pap.IDPapel}"/>
                        </p:column>
                        <p:column headerText="Descrição">
                            <h:outputText value="#{pap.descricao}"/>
                        </p:column>

                        <p:column headerText="Comandos">
                            <p:commandButton value="Editar"  action="#{papelMB.selecionarPapelPorID(pap.IDPapel)}" oncomplete="dlgEdita.show()"   update=":edit" />
                     
                            <p:commandButton value="Remover" actionListener="#{papelMB.excluir(pap)}" ajax="false"/>
                        </p:column>
                    </p:dataTable>
                </h:form>

                <h:form id="info">
                    <p:dialog header="Informações de #{pap.descricao}"  widgetVar="dlgInfo">
                        <h:panelGrid columns="2">
                            <h:outputText value="Codigo"/>
                            <h:outputText  value="#{papelMB.papelSelecionado.IDPapel}" />
                            <h:outputText value="Descrição"/>
                            <h:outputText  value="#{papelMB.papelSelecionado.descricao}" />
                            <h:outputText value="Papel"/>
                            <h:outputText  value="#{papelMB.papelSelecionado.papel}" />
                        </h:panelGrid>
                    </p:dialog>
                </h:form>
                <h:form id="edit" >
                    <p:dialog id="dlgEdit" widgetVar="dlgEdita" appendToBody="false">
                        <h:panelGrid columns="2" >
                            <h:outputText value="Codigo"/>
                            <h:outputText value="#{papelMB.papelSelecionado.IDPapel}"/>
                            <h:outputText value="Descrição"/>
                            <p:inputText  value="#{papelMB.papelSelecionado.descricao}" />
                            <h:outputText value="Papel"/>
                            <p:inputText  value="#{papelMB.papelSelecionado.papel}" />
                        </h:panelGrid>
                        <p:commandButton value="Salvar" action="#{papelMB.Salvar()}" ajax="false" update=":tabelaPapeis"/>

                    </p:dialog>
                </h:form>
            </ui:define>

        </ui:composition>
  </body>
</html>

In page show error
Cannot find component with identifier ":edit" referenced from "j_idt8:tabelaPapeis:j_idt55:0:j_idt61".

If someone can help with erro
i stay very happy :)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests