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

Can not set composer name with <custom-attributes>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.0.3
    • 6.0.0, 5.0.11, 6.0.1, 6.0.2
    • None
    • jetty 6.1.26

    • None

      Problem Description

      In a zul, we can use <custom-attributes composerName=""/> to set a variable name for the composer used in EL. But it doesn't work in 6.0.x
      Actually, I have tested it under 5.0.11 with GenericForwardComposer, it doesn't work, either.

      Reproducing Step:

      Run the following code.

      package composer;
      
      import org.zkoss.zk.ui.select.SelectorComposer;
      
      public class MyComposer extends SelectorComposer {
      
      	public String getName(){
      		return "testing name";
      	}
      }
      
      <window id="win" title="custom" border="normal" apply="composer.MyComposer">
      	<custom-attributes composerName="mc"/>
      	<vlayout>
      	<label>window id prefix: ${win$composer.name}</label>
      	<label>window attribute: ${win.attributes.composerName}</label>
      	<label>access composer: ${mc.name}</label>
      	</vlayout>
      </window>
      

      Expected result:

      3rd line should print
      access composer: testing name

      Actually result:

      access composer:

      It doesn't get composer's name attribute.

            dennis dennis
            hawk hawk
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: