Class PathQueryDirective

java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.directives.PathQueryDirective
All Implemented Interfaces:
Nice2TemplateDirective, TemplateIdentifiers, freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

public class PathQueryDirective extends Object implements Nice2TemplateDirective, TemplateIdentifiers
executes a query using the path query builder parameters: name: name of the variable paths: string, comma seperated list of paths to be loaded limit: optional, number, limit for the query returns a List of Maps that can be accessed similarly to an EntityListSequenceModel example: [@pathQuery name="memberships" paths="relSingle_user.firstname,relSingle_user.lastname,relSingle_user.relAddress_user.relAddress.company_c")]find Membership[/@pathQuery] [#list memberships as membership] ${membership.relUser.firstname} ${membership.relUser.lastname} ... [/#list]
  • Constructor Details

  • Method Details

    • execute

      public void execute(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] loopVars, freemarker.template.TemplateDirectiveBody body) throws freemarker.template.TemplateException, IOException
      Specified by:
      execute in interface freemarker.template.TemplateDirectiveModel
      Throws:
      freemarker.template.TemplateException
      IOException