The forward Attribute

forward="orginalEvent=targetId1/targetId2,targetEvent"

forward="originalEvent=${el-expr},targetEvent"

forward="targetEvent"

It is used to forward an event, that is targeting a specific component, to another component in another event name. It is called the forward condition.

For example, you can forward the onClick event targeting a button to the window as follows:

<window id="w" use="MyWindow">
    ...    
    <button lable="Submit" forward="onClick=w.onOK"/>    
</window>

Then, you can handle the submission in the MyWindow class as follows:

public class MyWindow extends Window {
    public void onOK() {    
        //handle the submission        
    }    
}

The original event is optional. If it is omitted, onClick is assumed. Similarly, the target ID is also optional. If omitted, the space owner is assumed. Thus, the above codes can be simplified to the following:

<window id="w" use="MyWindow">
    ...    
    <button lable="Submit" forward="onOK"/>    
</window>

If you want to forward several events, you can specify these conditions in the forward attribute by separating them with the comma (,):

<textbox forward="onChanging=onUpdating, onChange=some.onUpdate"/>