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>
Code: Select all
<h:inputText id="texto" value="#{fiestas.selected.nombre}"/>
If you need more details, just tell me...