-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
I try to pass a binding annotation as a parameter to a macro:
<?component name="macro" inline="true" macroURI="macro.zul"?> <zk>
<window title="Macro Test"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('de.klauswr.zk.MacroViewModel')">
<label value="@load(vm.field)" />
<macro value="@bind(vm.field)" />
</window> </zk>
where macro.zul:
<hlayout>
<textbox value="${arg.value}" />
</hlayout>
But I always get an empty result for the macro, while the label properly renders "Test" as initial value for "field". I fiddled around with thousands of permutations but never got a proper result.
This macro is just a short test for a bit complexer macro i need to use over and over in order to get a unique layout for certain data entry screens so please do not just post an answer for this simple example but help me solve the @()-binding issue.
2 | No.2 Revision |
I try to pass a binding annotation as a parameter to a macro:
<?component name="macro" inline="true" macroURI="macro.zul"?> macroURI="macro.zul"?>
<zk>
<window title="Macro Test" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('de.klauswr.zk.MacroViewModel')">
viewmodel="@id('vm') @init('de.klauswr.zk.MacroViewModel')">
<label value="@load(vm.field)" />
<macro value="@bind(vm.field)" />
</window> </zk>
</window>
</zk>
where macro.zul:
<hlayout>
<textbox value="${arg.value}" />
</hlayout>
But I always get an empty result for the macro, while the label properly renders "Test" as initial value for "field". I fiddled around with thousands of permutations but never got a proper result.
This macro is just a short test for a bit complexer macro i need to use over and over in order to get a unique layout for certain data entry screens so please do not just post an answer for this simple example but help me solve the @()-binding issue.
3 | No.3 Revision |
I try to pass a binding annotation as a parameter to a macro:
<?component name="macro" inline="true" macroURI="macro.zul"?>
<zk>
<window title="Macro Test" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') @init('de.klauswr.zk.MacroViewModel')">
viewModel="@id('vm') @init('de.klauswr.zk.MacroViewModel')">
<label value="@load(vm.field)" />
<macro value="@bind(vm.field)" />
</window>
</window>
</zk>
</zk>
where macro.zul:
<hlayout>
<textbox value="${arg.value}" />
</hlayout>
But I always get an empty result for the macro, while the label properly renders "Test" as initial value for "field". I fiddled around with thousands of permutations but never got a proper result.
This macro is just a short test for a bit complexer macro i need to use over and over in order to get a unique layout for certain data entry screens so please do not just post an answer for this simple example but help me solve the @()-binding issue.
4 | No.4 Revision |
I try to pass a binding annotation as a parameter to a macro:
<?component name="macro" inline="true" macroURI="macro.zul"?>
<zk>
<window title="Macro Test"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('de.klauswr.zk.MacroViewModel')">
<label value="@load(vm.field)" />
<macro value="@bind(vm.field)" />
</window>
</zk>
where macro.zul:
<hlayout>
<textbox value="${arg.value}" />
</hlayout>
But I always get an empty result for the macro, while the label properly renders "Test" as initial value for "field". I fiddled around with thousands of permutations but never got a proper result.
This macro is just a short test for a bit complexer macro i need to use over and over in order to get a unique layout for certain data entry screens so please do not just post an answer for this simple example but help me solve the @()-binding issue.