Changeset 196:8b148eb1acaa in livinglogic.java.ul4

Show
Ignore:
Timestamp:
01/31/09 15:33:44 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Template implements JSPTemplate now.

This means that a Template object loaded from the datebase can now be called
via <?render?> in a template converted to JSP source.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/src/com/livinglogic/ul4/Template.java

    r187 r196  
    1717import java.util.regex.Pattern; 
    1818import java.util.regex.Matcher; 
     19import javax.servlet.*; 
     20import javax.servlet.http.*; 
     21import javax.servlet.jsp.*; 
    1922import org.apache.commons.lang.ObjectUtils; 
    2023 
    21 public class Template 
     24public class Template implements JSPTemplate 
    2225{ 
    2326    // used by the code tokenizer 
     
    21622165        return buffer.toString(); 
    21632166    } 
     2167 
     2168    public void execute(JspWriter out, Map variables) throws java.io.IOException, javax.servlet.ServletException 
     2169    { 
     2170        for (Iterator iterator = render(variables); iterator.hasNext();) 
     2171        { 
     2172            out.write((String)iterator.next()); 
     2173        } 
     2174    } 
    21642175}