我正在尝试构建一个包含ComboBox [ZK组件]的表单,但我无法将其显示出来。
这里是代码:
<h:form class="form form-vb">
<h:div class="input-group">
<h:label for="ZipCode">
Code ZIP :
</h:label>
<combobox
sclass="form-control"
width="100%"
id="ZipCode"
model="@bind(vm.ZipCodeList)"
selectedItem="@bind(vm.zipcode)" autodrop="true"
autocomplete="true"
value="@load(ZipCode.name)">
<template name="model">
<comboitem
value="@bind(each.zipcode)" />
</template>
</combobox>
</h:div>
</h:form>
答案 0 :(得分:0)
问题是周围的<html>
标记。如果你删除它,你会得到组合。
<zk xmlns:h="http://www.w3.org/1999/xhtml">
<style src="css/home/bootstrap.css" />
<window border="normal" title="hello" apply="pkg$.TestComposer">
<div>Welcome to ZK Fiddle , run it right now!</div>
<h:form class="form form-vb">
<h:div class="input-group">
<h:label for="ZipCode">
Code ZIP :
</h:label>
<combobox
sclass="form-control"
width="100%"
id="ZipCode"
model="@bind(vm.ZipCodeList)"
selectedItem="@bind(vm.zipcode)"
autodrop="true"
autocomplete="true"
value="@load(ZipCode.name)">
<template name="model">
<comboitem value="@bind(each.zipcode)" />
</template>
</combobox>
</h:div>
</h:form>
<button id="btn" label="Click Me To Evalute Event Binding With Composer"/>
</window>
</zk>
演示:http://zkfiddle.org/sample/af6lv3/1-Another-new-ZK-fiddle