Changeset 799:d84eed69b6df in livinglogic.java.ul4

Show
Ignore:
Timestamp:
02/19/13 11:09:37 (6 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Subtemplates see themselves in the state of the variables of the parent template.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/main/java/com/livinglogic/ul4/TemplateClosure.java

    r796 r799  
    3131        this.template = template; 
    3232        this.variables = new HashMap<String, Object>(variables); 
     33        // The template (i.e. the closure) itself should be visible in the parent variables 
     34        this.variables.put(template.nameUL4(), this); 
    3335    } 
    3436