Class DebugTag

java.lang.Object
org.javalite.activeweb.freemarker.FreeMarkerTag
org.javalite.activeweb.freemarker.DebugTag
All Implemented Interfaces:
freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel, RequestAccess

public class DebugTag extends FreeMarkerTag
Debug tag is for printing an arbitrary object from page context. FreeMarker special handling of types sometimes makes it hard to see the value(s) of an object, but this tag makes it easy:

 <@debug print=objectname/>
 

For instance, for a `java,util.Map` object it will print this:

     {key1=value1, key2=value2}
 
Author:
Igor Polevoy
  • Constructor Details

    • DebugTag

      public DebugTag()
  • Method Details

    • render

      protected void render(Map params, String body, Writer writer) throws Exception
      Description copied from class: FreeMarkerTag
      Implement this method ina concrete subclass.
      Specified by:
      render in class FreeMarkerTag
      Parameters:
      params - this is a list of parameters as provided to tag in HTML.
      body - body of tag
      writer - writer to write output to.
      Throws:
      Exception - if any