Suggested case list:

Disabled list item row passed to VM-1981

296fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:44 PMlink

Disabled list item row passed to VM-1981

295fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:16 PMlink

Disabled list item row passed to VM-1981

294fatih123160.83.36.13225nk0uiFeb 13, 2018 3:30:44 PMlink

grid sample with ListModel/RowRenderer

816guest80.82.2.1312vah9ajFeb 21, 2017 11:42:21 AMlink

grid sample with ListModel/RowRenderer

809guest175.98.113.1622vah9ajJan 26, 2017 9:19:33 AMlink

grid sample with ListModel/RowRenderer

196guest79.185.142.402vah9ajApr 26, 2014 10:53:57 PMlink

grid sample with ListModel/RowRenderer

195guest79.185.142.402vah9ajApr 26, 2014 10:53:54 PMlink

grid sample with ListModel/RowRenderer

194guest79.185.142.402vah9ajApr 26, 2014 10:53:51 PMlink

grid sample with ListModel/RowRenderer

193guest79.185.142.402vah9ajApr 26, 2014 10:53:48 PMlink

grid sample with ListModel/RowRenderer

192guest79.185.142.402vah9ajApr 26, 2014 10:53:44 PMlink

grid sample with ListModel/RowRenderer

191guest79.185.142.402vah9ajApr 26, 2014 10:53:40 PMlink

Hierarchy table without using ZK PE/EE

1aaknai151.28.135.2131s871daJul 29, 2013 11:02:46 PMlink

grid sample with ListModel/RowRenderer

128aaknai151.28.135.2132vah9ajJul 29, 2013 7:20:00 PMlink

user model to move item to another listbox

1TonyQ114.25.109.94d0n3krApr 21, 2012 10:43:27 AMlink

Using timer to refresh a grid

1TonyQ220.133.44.3725nk0uiFeb 17, 2012 3:17:34 AMlink

Fire a event from child iframe

1TonyQ220.133.44.372eupjotFeb 3, 2012 5:04:52 AMlink

Textbox input restriction sample

1TonyQ72.21.245.2431b3nlr0Dec 20, 2011 10:09:10 AMlink

Test web core taglib in ZUL

1TonyQ198.203.175.175ofqkemDec 17, 2011 3:36:08 AMlink

identify firefox or not in server side

1TonyQ198.203.175.1751nv2qreDec 10, 2011 4:25:04 AMlink

ZK addThis integration

1TonyQ198.203.175.1751apl96jNov 5, 2011 4:12:50 AMlink

Latest 10 Fiddles :

compare popup from client or server

24guest58.177.123.2253l3ko2oNov 14, 2018 2:53:19 AMlink

compare popup from client or server

23guest58.177.123.2253l3ko2oNov 14, 2018 2:53:00 AMlink

compare popup from client or server

22guest58.177.123.2253l3ko2oNov 14, 2018 2:52:00 AMlink

compare popup from client or server

21guest58.177.123.2253l3ko2oNov 14, 2018 2:45:49 AMlink

compare popup from client or server

20guest58.177.123.2253l3ko2oNov 14, 2018 2:44:55 AMlink

Messagebox YES/NO example

109guest201.183.227.14025og06lNov 13, 2018 10:16:14 PMlink

Messagebox YES/NO example

108guest201.183.227.14025og06lNov 13, 2018 10:15:58 PMlink

Messagebox YES/NO example

107guest201.183.227.14025og06lNov 13, 2018 3:55:18 PMlink

Messagebox YES/NO example

106guest201.183.227.14025og06lNov 13, 2018 3:54:28 PMlink

custom disabled textbox styles

1cor3000220.134.32.2423bfr5iaNov 13, 2018 12:51:37 PMlink

update/add/delete data grid

12guest94.126.240.21bi6pjpOct 11, 2018 6:12:47 AMlink

resources

index.zulzul<zk xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.zkoss.org/2005/zul/zul.xsd"> <separator></separator> <window vflex="true" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('pkg$.TestVM')"> <vlayout> <label value="VALORACIONES FILMS" style="text-align: center;font-weight: bold;"/> <separator></separator> <separator></separator> <hbox> <grid width="700px" model="@load(vm.listaPeliculas)"> <columns> <column width="20%" label="Titulo"/> <column width="20%" label="Fecha"/> <column width="10%" label="Nota"/> <column width="30%" label="Observaciones"/> <column width="10%" /> <column width="10%" /> </columns> <template name="model"> <row> <label value="@load(each.titulo)" /> <label value="@load(each.fecha)" /> <label value="@load(each.nota)" /> <textbox value="@load(each.observaciones)" disabled="true"/> <button label="E" onClick="@command('editar', pelicula=each)"/> <button label="B" onClick="@command('borrar', pelicula=each)" /> </row> </template> </grid> <button label="+" onClick="@command('add')"/> </hbox> </vlayout> </window> </zk> TestVM.javajavaimport org.zkoss.zk.ui.*; import org.zkoss.zk.ui.event.*; import org.zkoss.zk.ui.util.*; import org.zkoss.zk.ui.ext.*; import org.zkoss.zk.au.*; import org.zkoss.zk.au.out.*; import org.zkoss.zul.*; import java.util.*; import org.zkoss.bind.annotation.*; public class TestVM extends GenericForwardComposer{ private List<Pelicula> listaPeliculas = new ArrayList<Pelicula>(); @Init public void init(){ listaPeliculas = new ArrayList(); listaPeliculas.add(new Pelicula(1, "Vengadores", "07-10-2018", 5.0, "observaciones 1")); listaPeliculas.add(new Pelicula(2, "El Rey Leon", "07-10-2018", 10.0, "observaciones 2")); listaPeliculas.add(new Pelicula(3, "Mision Imposible 1", "07-10-2018", 8.5, "observaciones 3")); } @Command @NotifyChange("listaPeliculas") public void borrar(@BindingParam("pelicula") Pelicula p) { listaPeliculas.remove(p); } @Command public void editar(@BindingParam("pelicula") Pelicula p){ Map<String, Object> args = new HashMap<String, Object>(); args.put("pelicula", p); Executions.createComponents("ventanaEdit.zul", null, args); } @Command @NotifyChange("listaPeliculas") public void add(){ Map<String, Object> args = new HashMap<String, Object>(); args.put("pelicula", new Pelicula(null, "", "", 0.0,"")); Executions.createComponents("ventanaAdd.zul", null, args); } @GlobalCommand @NotifyChange("listaPeliculas") public void agregarPelicula(@BindingParam("pelicula")Pelicula pelicula){ pelicula.setId(maxId() + 1); listaPeliculas.add(pelicula); } @GlobalCommand @NotifyChange("listaPeliculas") public void actualizarPelicula(@BindingParam("pelicula")Pelicula pelicula){ for(Pelicula p:listaPeliculas) { if(p.getId().equals(p.getId())) { p.setTitulo(p.getTitulo()); p.setNota(p.getNota()); p.setObservaciones(p.getObservaciones()); p.setFecha(p.getFecha()); break; } } } public List<Pelicula> getListaPeliculas(){ return listaPeliculas; } public void setListaPeliculas(List<Pelicula> lista){ this.listaPeliculas=lista; } private int maxId() { int val = 1; if(listaPeliculas != null && !listaPeliculas.isEmpty()) { for(Pelicula pelicula:listaPeliculas) { if(pelicula.getId().compareTo(val) > 0) { val = pelicula.getId(); } } } return val; } } Pelicula.javajavaimport org.zkoss.zk.ui.*; import org.zkoss.zk.ui.event.*; import org.zkoss.zk.ui.util.*; import org.zkoss.zk.ui.ext.*; import org.zkoss.zk.au.*; import org.zkoss.zk.au.out.*; import org.zkoss.zul.*; public class Pelicula extends GenericForwardComposer{ private Integer id; private String titulo; private String fecha; private Double nota; private String observaciones; public Pelicula(Integer id, String titulo, String fecha, Double nota, String observaciones){ this.id=id; this.titulo=titulo; this.fecha=fecha; this.nota=nota; this.observaciones=observaciones; } public Integer getId(){ return id; } public void setId(Integer id){ this.id=id; } public String getTitulo() { return titulo; } public void setTitulo(String titulo) { this.titulo = titulo; } public String getFecha() { return fecha; } public void setFecha(String fecha) { this.fecha = fecha; } public Double getNota() { return nota; } public void setNota(Double nota) { this.nota = nota; } public String getObservaciones() { return observaciones; } public void setObservaciones(String observaciones) { this.observaciones = observaciones; } } ventanaAdd.zulzul<zk> <window id="modalDialog" vflex="true" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('pkg$.ventanaAddVM')" closable="true" action="show: slideDown;hide: slideUp" mode="modal" > <vlayout> <grid width="700px"> <rows> <row> <label value="Titulo"/> <hlayout> <textbox value="@bind(vm.selected.titulo)"/> </hlayout> </row> <row> <label value="Fecha"/> <hlayout> <textbox value="@bind(vm.selected.fecha)"/> </hlayout> </row> <row> <label value="Nota"/> <hlayout> <textbox value="@bind(vm.selected.nota)"/> </hlayout> </row> <row> <label value="Observaciones"/> <hlayout> <textbox value="@bind(vm.selected.observaciones)"/> </hlayout> </row> </rows> </grid> <div style="float: right;"> <button hflex="1" label="Cerrar" onClick="modalDialog.detach();"/> <button hflex="1" label="Aceptar" onClick="@command('aceptar', pelicula=vm.selected)"/> </div> </vlayout> </window> </zk> ventanaAddVM.javajavaimport org.zkoss.zk.ui.*; import org.zkoss.zk.ui.event.*; import org.zkoss.zk.ui.util.*; import org.zkoss.zk.ui.ext.*; import org.zkoss.zk.au.*; import org.zkoss.zk.au.out.*; import org.zkoss.zul.*; import java.util.*; import org.zkoss.bind.annotation.AfterCompose; import org.zkoss.bind.annotation.*; import org.zkoss.zk.ui.select.annotation.Listen; import org.zkoss.zk.ui.select.annotation.Wire; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.select.SelectorComposer; import org.zkoss.zul.Window; import org.zkoss.bind.BindUtils; public class ventanaAddVM extends GenericForwardComposer{ public Pelicula selected; @AfterCompose public void init(@ExecutionArgParam("pelicula") Pelicula pelicula) { selected = new Pelicula(pelicula.getId(), pelicula.getTitulo(), pelicula.getFecha(), pelicula.getNota(), pelicula.getObservaciones()); } public Pelicula getSelected(){ return selected; } public void setSelected(Pelicula pelicula){ this.selected=pelicula; } @Command public void aceptar(@ContextParam(ContextType.VIEW) Window comp, @BindingParam("pelicula") Pelicula p){ comp.detach(); Map<String,Object> arg = new HashMap<String,Object>(); arg.put("pelicula", p); BindUtils.postGlobalCommand(null, null, "agregarPelicula", arg); } @Command public void modificar(@ContextParam(ContextType.VIEW) Window comp, @BindingParam("pelicula") Pelicula p){ comp.detach(); Map<String,Object> arg = new HashMap<String,Object>(); arg.put("pelicula", p); BindUtils.postGlobalCommand(null, null, "actualizarPelicula", arg); } } ventanaEdit.zulzul<zk> <window id="modalDialog" vflex="true" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('pkg$.ventanaAddVM')" closable="true" action="show: slideDown;hide: slideUp" mode="modal" > <vlayout> <grid width="700px"> <rows> <row> <label value="Titulo"/> <hlayout> <textbox value="@bind(vm.selected.titulo)"/> </hlayout> </row> <row> <label value="Fecha"/> <hlayout> <textbox value="@bind(vm.selected.fecha)"/> </hlayout> </row> <row> <label value="Nota"/> <hlayout> <textbox value="@bind(vm.selected.nota)"/> </hlayout> </row> <row> <label value="Observaciones"/> <hlayout> <textbox value="@bind(vm.selected.observaciones)"/> </hlayout> </row> </rows> </grid> <div style="float: right;"> <button hflex="1" label="Cerrar" onClick="modalDialog.detach();"/> <button hflex="1" label="Modificar" onClick="@command('modificar', pelicula=vm.selected)"/> </div> </vlayout> </window> </zk>