Revision history [back]

click to hide/show revision 1
initial version

answered 2011-05-10 01:53:42 +0800

mikelara gravatar image mikelara

www.mextisa.com.mx

Hi Luis.

You could refresh the model programatically, here just a way to do it...

in your form.zul for example...

...
<listbox id="listaexperiencias" model="@{experiencias, load-after='btnrefresh.onClick'}" rows="5" width="268px" height="99px">
   <listhead sizable="true">
      <listheader label="Puesto" />
      <listheader label="Empresa"/>
   </listhead>
   <listitem self="@{each=experiencia}" value="@{experiencia}">
      <listcell label="experienciaselected" value="@{experiencia.experienciaPK.idexperiencia}" visible="false"/>
      <listcell label="@{experiencia.puesto}"/>
      <listcell label="@{experiencia.empresa}"/>
   </listitem>
</listbox>
...
<!-- btnrefresh just to catch  a refresh event (onClick really) form modal child window -->
<button id="btnrefresh" label="refrescar" visible="false"/>
...

note the load-after='btnrefresh.onClick' when declaring the model for the listbox. Then at your new.zul composer (in your case at the onClose action)...

...
public void onClick$btnterminar(){  //or in your case the onClose() action
   //at parent window reload listaexperiencias box sending onclick event to the btnrefresh button, then detach the child window...
   Events.sendEvent(new Event("onClick", (Button)((Window)ligarWin.getParent()).getFellow("btnrefresh") ));
   ligarWin.detach();
}
...

that should do the trick.

Mike Lara

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More