Thursday, 24 May 2012

Text Box on change and on Changing Event

ZK Demo site shows the example using ZUL File how to handle onChanging event. Let us see how we can handle in java using MVC  GenericForwardComposer composer

Zul File

<?page title="On Change Event" contentType="text/html;charset=UTF-8"?>
    <window title="On Change Event" border="normal" apply="mypack.OnchangeTxt">
        <grid width="100%">
                    onChanging textbox:
                    <textbox id="t1" />
                    Instant copy:
                    <textbox id="copy" readonly="true" />


package mypack;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.InputEvent;
import org.zkoss.zul.Textbox;
public class OnchangeTxt extends GenericForwardComposer {
    private Textbox copy;
    public void onChanging$t1(InputEvent event) {


  1. Thanks a lot, as Jhonatan says very simple and clear! in other forums there are very rustic methods to do this function!


Passing Parameter between two files using MVVM

This examples shows how to pass parameter between two zul screens. In this example, we are passing some parameters from the parent vm to...