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

Custom attributes on template do not resolve after ZK-5002

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 10.0.0, 9.6.3
    • 9.6.1, 9.6.2
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      Run fiddle:

      [-https://zkfiddle.org/sample/kmu10r/3-Custom-Attribute-do-not-resolve-on-template-]

      Steps to reproduce (updated)

      Run updated fiddle

      https://zkfiddle.org/sample/kmu10r/6-Custom-Attribute-do-not-resolve-on-template

      Current Result

      The value="@load(customAtt)" doesn't resolve (returns null)

      		<template name="testTemplate2">
      			<custom-attributes customAtt="${foo}"/>
      
      			Loading value from custom attribute on parent template:
      			<label style="font-weight: bold;"  value="@load(customAtt)"/>
      

      updated: components retrieving a value set on the parent <apply> as an attribute also fail.

      The if={bar} doesn't resolve for the 2nd template (resolves in 1st template)

      Expected Result

       The value="@load(customAtt)" returns the value stored by <custom-attributes customAtt="${foo}"/>

      Debug Information

       related to ZK-5002

      Workaround

       Works if the custom attribute is stored on a normal component (not template root).

      However, this force the template to have a single component as root.

            DevChu DevChu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: