2017-07-07 69 views
0

我想構建一個包含ComboBox [ZK組件]的表單,但我無法獲取它來顯示。ComboBox不顯示引導程序

下面的代碼:

<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

你可以提供一個zkfiddle再現問題? – 2017-07-07 16:16:27

+0

是的,在這裏:[zkfiddle](http://zkfiddle.org/sample/3s3lsce/4-Another-new-ZK-fiddle) –

回答

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