-
New Feature
-
Resolution: Done
-
Normal
-
8.0.0
-
ZK 8.0.1
for example,
Apply Shadow
<!-- Basic Example --> <div> <apply>test</apply> </div> <!-- Macro Like --> <?component name="foo" templateURI="../include/apply.zul"?> <div> <foo/> </div> <!-- EL --> <zk> <zscript> String templateName = "default"; </zscript> <div> <apply template="${templateName}"> <template>test</template> <template name="default">test with the default name</template> </apply> </div> </zk>
Choose Shadow
<zk> <zscript> int each = 1; </zscript> <div style="border:1px solid red;" id="host"> <choose> <when test="false"> <div style="color:blue">${each} Template</div> </when> <when test="true"> <div style="color:green">${each} Template</div> </when> <otherwise> <div style="color:red">${each} Template</div> </otherwise> </choose> </div> </zk>
ForEach Shadow
<zk xmlns:x="xhtml"> <x:table id="host" border="1"> <forEach begin="1" end="9" var="x"> <x:tr> <forEach begin="1" end="9" var="y"> <x:td>${x} X ${y} = ${x * y}</x:td> </forEach> </x:tr> </forEach> </x:table> </zk>
If Shadow
<div style="border:1px solid red;" id="host"> <if test="${isVisible}"> <div style="background:yellow"> 1. First <if test="${isVisible}"> <div style="background:yellow"> Without Template </div> </if> 3. Last </div> </if> </div>