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

Parsing labels referencing other labels with ".$" causes them to be evaluated as expression

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • None
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.3 S3
    • None

      In LabelLoaderImpl.expendValue()

      If the value is the full name of another label entry, the correct value is returned.
      If the value is the full name of another label followed by ".$" (to access the name, and not the map after parsing), the value is not ound in labels, and the result is an expression, not a value.

      Reproduce with:

      my.app.a= test
      my.app.a.child = test2
      my.app.b= ${my.app.a.$}
      my.app.c= ${my.app.a}
      
      
      <zk>
          <vlayout>
             <button label="${labels.my.app.a.$}"/>
             <button label="${labels.my.app.b}"/>
             <button label="${labels.my.app.c}"/>
          </vlayout>
      </zk>
      

      put a breakpoint in LabelLoaderImpl.expendValue line 331, and compare the returned values / expressions for b and c
      my.app.b > "${my.app.a.$}"
      my.app.c > "test"

            SEFI SEFI
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: