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

Directive 'import' does'nt work for importing components defined in one .zul file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 8.0.1
    • Components, ZHTML
    • Windows 7, ZK 8.0.1.1, tested in Google Chrome 55.0.2883.87 m (64-bit) and Mozilla Firefox 50.1.0

      When using "import" directive for importing components defined in one .zul file (according to ZK - ZUML Reference - Import Directives the exception "org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found" is thrown.

      Steps to reproduce:

      1. Create file 'mycomponent.zul' representing content of the component:

      <zk>
      <window title="mycomponent" border="normal" width="200px" height="100px">
      	My Component!
      </window>
      </zk>
      

      2. Create file 'components.zul' for definition of all components we have. In one case just one component 'mycomponent.zul' with name 'mynewcomponent'.

      <?component name="mynewcomponent" macroURI="mycomponent.zul" inline="true"?>
      

      3. Create file 'test-import-component.zul' for importing 'components.zul' to have all components available.

      <?page title="new page title" contentType="text/html;charset=UTF-8"?>
      <?import uri="components.zul" ?>
      <zk>
      	<mynewcomponent />
      </zk>
      

      All files are attached to this issue.

      Actual result:

      The exception "org.zkoss.zk.ui.metainfo.DefinitionNotFoundException" is thrown. Stacktrace is in attached stacktrace.txt file.

      Expected result:

      Component 'mynewcomponent' is imported to 'test-import-component.zul' and is possible to see content of component in web browser.

        1. test-import-component.zul
          0.1 kB
        2. stacktrace.txt
          8 kB
        3. mycomponent.zul
          0.1 kB
        4. components.zul
          0.1 kB

            Unassigned Unassigned
            adambabusek adambabusek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: