title: update a form from a component of another page jsf
body: <p>i have a xhtml page which sets the values of my datatable which is in another page and i want to update the datatable when i set a new object which occurs when i click in a commandbutton.</p>
  
  <p>heres my page that sets value: fichas_horas.xhtml</p>
  
  <pre><code>&lt;h:body&gt;
  
          &lt;f:view&gt;
          &lt;h:form id = "formulario"&gt;
  
              &lt;h1&gt;Medicos&lt;/h1&gt;
  
              &lt;p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" /&gt;
  
  
  
             &lt;p:dataTable id= "tabla" value="#{fichaBean.horas}" var="Grupo_horario" border="1" &gt;
  
                  &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                  Hora
                  &lt;/f:facet&gt;
                  #{fichaBean.Nombrehora(Grupo_horario)}
                  &lt;/p:column&gt;
  
                  &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                  Disponibles
                  &lt;/f:facet&gt;
                  #{fichaBean.disponibles(Grupo_horario.codigo)}
                  &lt;/p:column&gt;
  
  
                   &lt;p:column&gt;
                      &lt;f:facet name="header"&gt;Seleccionar&lt;/f:facet&gt;
  
                       &lt;p:commandButton id="bespecialidad" action="tipo_ficha" disabled="#{(fichaBean.bloquear(fichaBean.disponibles(Grupo_horario.codigo)))}" value ="seleccionar" &gt;
                              &lt;f:actionListener binding="#{fichaBean.guardar_ficha(Grupo_horario.codigo)}" /&gt; 
                              &lt;f:actionListener binding="#{fichaBean.cargarcolacaja()}" update=":formcolacajas" /&gt;
                         &lt;/p:commandButton&gt;
                   &lt;/p:column&gt;
  
              &lt;/p:dataTable&gt;
  
  
  
  
  
          &lt;/h:form&gt;
      &lt;/f:view&gt;
  
  
      &lt;/h:body&gt;
  </code></pre>
  
  <p>and this one is the datatable that i want to update: lista_espera_caja.xhtml</p>
  
  <pre><code> &lt;h:body&gt;
  
          &lt;f:view&gt;
          &lt;h:form id = "formcolacajas"&gt;
  
              &lt;h1&gt;Lista de espera a caja&lt;/h1&gt;
  
              &lt;p:messages id="messages" showDetail="true" autoUpdate="true" closable="true"  /&gt;
              #{fichaBean.cargarcolacaja()}
  
  
             &lt;p:dataTable id= "tabla" value="#{fichaBean.colacaja}" var="Ficha" border="1"&gt;
  
                  &lt;p:column&gt;
                  &lt;f:facet name="header"&gt;
                  Turno
                  &lt;/f:facet&gt;
                  #{fichaBean.nombreturno(Ficha)}
                  &lt;/p:column&gt;
  
  
  
              &lt;/p:dataTable&gt;
  
  
  
  
  
          &lt;/h:form&gt;
      &lt;/f:view&gt;
  
  
      &lt;/h:body&gt;
  </code></pre>
  
  <p>i tried to put an update=":formcolacajas" in my button but it does nothing.</p>