Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2576

Support a shadow element concept for Databinding or EL expression

    Details

    • gh.sprint.customfield.default.name:
      ZK 8.0.1

      Description

      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>
      

        Issue Links

          Activity

          Hide
          jumperchen jumperchen added a comment -

          Ready since 4/10/2015

          Show
          jumperchen jumperchen added a comment - Ready since 4/10/2015

            People

            • Assignee:
              DevChu DevChu
              Reporter:
              jumperchen jumperchen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 5 hours
                1d 5h

                  Agile