Problems showing a dialog !!!...

UI Components for JSF
Post Reply
agustincba
Posts: 36
Joined: 18 Oct 2010, 09:00

03 Dec 2010, 14:37

Hi Guys !. How's all ?. My name is Agustin... Hope I can get an answer...
Considering this code...

Code: Select all

      <p:panel closable="false" header="Invitados de La Fiesta" style="width: 400px;height: 400px;">
        <h:form prependId="false">
                <h:panelGrid columns="2" cellspacing="3">
                    <h:outputLabel value="Nombre :" for="nombre"/>
                    <h:inputText id="nombre" value="#{fiestas.invitado.nombre}"/>

                    <h:outputLabel value="Apellido :" for="apellido"/>
                    <h:inputText id="apellido" value="#{fiestas.invitado.apellido}"/>
                </h:panelGrid>
                    <p:commandButton value="Agregar" action="#{fiestas.agregarInvitado}" update="nombre,apellido,lista"/>

                    <p:dataTable paginator="true" rows="2" id="lista" var="inv" value="#{fiestas.lista}">
                        <p:column style="text-align: center;" >
                             <f:facet name="header">Nombre</f:facet>
                             <h:outputText value="#{inv.nombre}" />
                        </p:column>
                        <p:column style="text-align: center;">
                             <f:facet name="header">Apellido</f:facet>
                             <h:outputText value="#{inv.apellido}" />
                        </p:column>
                        <p:column style="text-align: center;">
                             <f:facet name="header">Editar</f:facet>
                             
                             <p:commandButton action="#{fiestas.mostrarSiHaySeleccionado}" update="datos"  value="Editar" oncomplete="dlgForm.show()" >
                                 <f:setPropertyActionListener value="#{inv}" target="#{fiestas.selected}"/>
                             </p:commandButton>
                        </p:column>
                    </p:dataTable>

                    <p:dialog modal="true" draggable="false" header="Edicion" widgetVar="dlgForm">
                        <p:outputPanel id="datos">
                            <h:outputText value="Nombre: "/>
                            <h:inputText id="texto" value="#{fiestas.selected.nombre}"/>
                        </p:outputPanel>
                    </p:dialog>
                </h:form>
            </p:panel>
I can't add records to the datatable but the I remove this line:

Code: Select all

                            <h:inputText id="texto" value="#{fiestas.selected.nombre}"/>
I can add records to the datatable and the dialog is shown !. The idea would be to have a dialog for editing the details !... Why is happenning this ?.
If you need more details, just tell me...

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 38 guests