zktest/src/main/webapp/zuti/mvvm/_apply/basic.zul

Summary

Maintainability
Test Coverage
<zk>
    <style>
    .yellow {border:1px solid #f1da36}
    .red {color: red}
    .green {color: green}
    .blue {background: blue; color: white;}
    </style>
    <window id="host" apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vm') @init('org.zkoss.zktest.zats.zuti.vm.ApplyVM')">
        <div>
            <apply template="@load(vm.template)">
                <template>Default</template>
                <template name="readonly"><label class="yellow">1</label></template>
                <template name="edit"><label class="green">2</label></template>
            </apply>
        </div>
        <div>
            <apply templateURI="@load(vm.simpleTemplateURI)" person="@ref(vm.person)"/>    
        </div>
        <button label="Change Template" onClick='@command("changeTemplate")'/>
    </window>
    <debugger rootId="host" />
</zk>