-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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