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

defining a template "component" in lang-addon.xml

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.1
    • 8.0.0
    • Configuration
    • Security Level: Jimmy
    • ZK 8.0.1 S2, ZK 8.0.1 S3
    • None

      currently it is not possible yet to "extend" a shadow element in a lang-addon.xml to predefine template components

      what currently works:

      	<component>
      		<component-name>mycomp</component-name>
      		<component-class>org.zkoss.zuti.zul.Apply</component-class>
      		<property>
      			<property-name>templateURI</property-name>
      			<property-value>~./template/mytemplate.zul</property-value>
      		</property>
      		<shadow-element/>
      	</component>
      

      At the moment it is not possible to extend "mycomp" or the original "apply":

      	<component>
      		<component-name>mycomp2</component-name>
      		<extends>mycomp</extends>
      		<property>
      			<property-name>title</property-name>
      			<property-value>amazing</property-value>
      		</property>
      	</component>
      
      	<component>
      		<component-name>mycomp3</component-name>
      		<extends>apply</extends>
      		<property>
      			<property-name>templateURI</property-name>
      			<property-value>~./template/mytemplate.zul</property-value>
      		</property>
      	</component>
      

      to further simplify the configuration it would be nice to align with the macro component definition:

      BOTH work in a zul

      <?component name="mymacrocomp" macroURI="~./template/mymacro.zul"?>
      <?component name="mytemplatecomp" templateURI="~./template/mytemplate.zul"?>
      

      however only the macro can be defined like this in a lang-addon.xml

      	<component>
      		<component-name>mymacrocomp</component-name>
      		<macro-uri>~./template/mymacro.zul<macro-uri>
      	</component>
      

      A "nice to have" feature would be a similar shortcut for a macro component

      	<component>
      		<component-name>mytemplatecomp</component-name>
      		<template-uri>~./template/mytemplate.zul<template-uri>
      	</component>
      

            DevChu DevChu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h