Frage

I am new to ZK. I have craeted a zul file which includes the vlayout component. Here is the entire code:

 <?page title="My Chart"?>

   <zk xmlns="http://www.zkoss.org/2005/zul"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.zkoss.org/2005/zul
      http://www.zkoss.org/2005/zul/zul.xsd">

    <vlayout apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('util.charts.LineChartVM')" >
       <chart id="chart" title="Half-Year Report" width="520" height="350" paneColor="#FFFFFF"
           type="line" yAxis="Amount"
           model="@bind(vm.model)" engine="@bind(vm.engine)" threeD="@bind(vm.threeD)"
       />
      <hlayout visible="@bind(not empty vm.message)">
         You clicked on :<label value="@bind(vm.message)"/>
     </hlayout>
    </vlayout>

  </zk>

Moreover I have added the following snippet in the pom file:

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zul</artifactId>
        <version>3.6.3</version>
    </dependency>

However when I go run the file I get the following error:

org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found: vlayout in [LanguageDefinition: xul/html],...

It looks like vlayout is not supported in the my version of zul. Does anyone know a possible solution to this issue? Has anyone had a similar experience?

Thanks in advance!

War es hilfreich?

Lösung

The problem is the version of zk in your pom.
Vlayout is available since 5.0.4 but you are using 3.6.3
I guess the best will be to use 6.5.0, which is the newest zk.
But you need at least 6.0 cos you are using data binding.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top