My zkoss code is not binding the value from java method.
<window border="normal" id="home"
apply="com.test.HomeController">
<caption label="@{home.name}"></caption>
<button label="text"></button>
</window>
public class HomeController extends GenericForwardComposer{
public String getName() {
return "MY ZKOSS";
}
}
The window caption is not showing MY ZKOSS . can any one tell me what is the issue?
value binding through getter for a controller extending from GenericForwardComposer will work with EL expression like
label="${$composer.name}"The kind of data binding you are trying to use will work if controller is extending from component base class for eg
HomeControllerextends fromWindowinstead ofGenericForwardComposer. For this to work changeapplytouselike shown below