Class OnChangeLambda

  • All Implemented Interfaces:
    com.samskivert.mustache.Mustache.Lambda

    public class OnChangeLambda
    extends Object
    implements com.samskivert.mustache.Mustache.Lambda
    Lambda writes current fragment to the output when it is different than the previous fragment. Register:
     additionalProperties.put("onchange", new OnChangeLambda());
     
    Use:
     {{#onchange}}{{name}}{{/onchange}}
     
    • Constructor Detail

      • OnChangeLambda

        public OnChangeLambda()
    • Method Detail

      • execute

        public void execute​(com.samskivert.mustache.Template.Fragment frag,
                            Writer out)
                     throws IOException
        Specified by:
        execute in interface com.samskivert.mustache.Mustache.Lambda
        Throws:
        IOException