Changeset 379
- Timestamp:
- 2008-06-17 14:38:37 (5 years ago)
- Location:
- trunk/universe/kauri-template/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/universe/kauri-template/src/main/java/org/kauriproject/template/OutputBlock.java
r185 r379 73 73 @Override 74 74 public Step executeAndProceed(TemplateContext context, SaxTemplateResult result) { 75 AttributesImpl atts = getSaxElement().getAttributes();75 AttributesImpl atts = new AttributesImpl(attributes); 76 76 Expression elExpression; 77 77 for (int i = 0; i < attributes.getLength(); i++) { … … 79 79 atts.setValue(i, (String) elExpression.evaluate(context)); 80 80 } 81 getSaxElement().setAttributes(atts); 81 82 82 83 // override it to generate a TemplateEvent -
trunk/universe/kauri-template/src/main/java/org/kauriproject/template/SaxElement.java
r171 r379 64 64 } 65 65 66 public void setAttributes(AttributesImpl attributes) { 67 this.attributes = attributes; 68 } 69 66 70 public void setNamespaces(Map<String, String> namespaces) { 67 71 this.namespaces = namespaces; -
trunk/universe/kauri-template/src/test/resources/org/kauriproject/template/foreach.xml
r370 r379 25 25 <div> 26 26 <ktl:forEach var="element" in="${myarray}"> 27 <p >in array: ${element}</p>27 <p class="${element}">in array: ${element}</p> 28 28 </ktl:forEach> 29 29 </div> -
trunk/universe/kauri-template/src/test/resources/org/kauriproject/template/foreach_result.xml
r369 r379 29 29 </div> 30 30 <div> 31 <p >in array: one</p>32 <p >in array: two</p>33 <p >in array: three</p>31 <p class="one">in array: one</p> 32 <p class="two">in array: two</p> 33 <p class="three">in array: three</p> 34 34 </div> 35 35 <div>
Note: See TracChangeset
for help on using the changeset viewer.