数据表的问题

时间:2013-10-07 17:27:03

标签: datatable

我想从一个要更新的数据表中传递一个值,并将其放在1 p:对话框中,1 p:inputText,如示例所示

                                         

这里是数据表,基于来自backbean的查询更新数据表并基于3输入文本,第一个输入文本是显示传递给inputtext的数据是固定和更新谁是commnandbutton < / p>

                    <table width="100%" border="0" bgcolor="azure">
                        <tr>
                            <td><h:outputText value="Codigo :" class="texto"/></td>
                            <td width="0">
                                <p:inputText style="width: 100%" value="#{personaBean.codigo}" id ="idpersona" label="idpersona" maxlength="30"/></td>

                            <td width="25%">
                                <h:outputText value="Apellido Paterno :" class="texto"/></td>
                            <td>
                                <p:inputText style="width: 100%;" value="#{personaBean.pat}" id="paterno" maxlength="20" /></td>
                            <td>
                                <p:watermark value="Ingrese Apellido Paterno" for="paterno"/></td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td rowspan="2">
                                <p:commandButton value="  B U S C A R  "  id="btnbuscar"  update=":tabla"  actionListener="#{personaBean.nombre}"/>
                            </td>

                            <td><h:outputText value="Apellido Materno :" class="texto"/></td>
                            <td><p:inputText style="width: 100%" value="#{personaBean.mat}" id="materno" maxlength="20"/> </td>
                            <td><p:watermark value="Ingrese Apellido Materno" for="materno"/> </td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td><h:outputText value="Nombres :" class="texto"/></td>
                            <td>
                                <p:inputText style="width: 100%" value="#{personaBean.nomb}" id="nombres"/>
                            </td>
                            <td><p:watermark value="Ingrese Nombres " for="nombres"/> </td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                    </table>
                </h:form>
                <hr size="10" style="color: #D20005; background-color: #c2dfef; border-radius: 5px; width: 100%;"/>
                <h:form id="tabla">
                <p:dataTable var="Alumnos" value="#{personaBean.lsalumn}" id="dt_Alumnos" 
                             sortMode="simple" emptyMessage="No hay Registros que Mostrar"  rows="50" scrollable="true" scrollHeight="400" liveScroll="true">

                    <p:column headerText="Id" id="id"  > 
                        <f:facet name="header">  
                            <h:outputText value=" CODIGO " class="text"/>  
                        </f:facet>   
                        <h:outputText value="#{Alumnos.persona}"/> 
                    </p:column>  

                    <p:column  >
                        <f:facet name="header" >
                            <h:outputText value=" APELLIDOS Y NOMBRES" class="text" />
                        </f:facet>
                        <h:outputText value="#{Alumnos.nombres}"/>  
                    </p:column>
                      <p:column style="width: 4%" exportable="false">

                          <p:commandButton actionListener="#{personaBean.vercodificacion}" >
                              <f:setPropertyActionListener value=""
                          </p:commandButton>
                    </p:column>
                </p:dataTable> 
                </h:form>


                <!--  <f:facet name="footer">

                          <p:commandButton id="btnbuscCancelar"  oncomplete="DialogFrmUbigeo.hide()"  icon="nuevo.png" update=":fotos" title="Cancelar" value="Cancelar"/>    
                      </f:facet> -->

            </p:dialog>

0 个答案:

没有答案