Package railo.transformer.bytecode.statement.tag

Examples of railo.transformer.bytecode.statement.tag.TagOutput


       
     
        TagLib lib = libTag.getTagLib();
        TagLibTag outputTag = lib.getTag("output");
       
        TagOutput output=new TagOutput(tag.getStart(),null);
        output.setFullname(outputTag.getFullName());
        output.setTagLibTag(outputTag);
        output.addAttribute(new Attribute(false,"output",LitBoolean.TRUE,"boolean"));
        output.addAttribute(new Attribute(false,"formail",LitBoolean.TRUE,"boolean"));
       
        Body body=new BodyBase();//output.getBody();
        output.setBody(body);
       
        ASMUtil.replace(tag,output,false);
        body.addStatement(tag);

        output.addAttribute(tag.removeAttribute("query"));
        if(tag.containsAttribute("group"))output.addAttribute(tag.removeAttribute("group"));
        if(tag.containsAttribute("groupcasesensitive"))output.addAttribute(tag.removeAttribute("groupcasesensitive"));
        if(tag.containsAttribute("startrow"))output.addAttribute(tag.removeAttribute("startrow"));
        if(tag.containsAttribute("maxrows"))output.addAttribute(tag.removeAttribute("maxrows"));
       
        new Output().evaluate(output,outputTag);
    }
  }
View Full Code Here


  /**
   * @see railo.transformer.cfml.evaluator.EvaluatorSupport#evaluate(org.w3c.dom.Element, railo.transformer.library.tag.TagLibTag)
   */
  public void evaluate(Tag tag,TagLibTag libTag) throws EvaluatorException {
   
    TagOutput output=(TagOutput) tag;
   
        // check if inside a query tag
    TagOutput parent = output;
        boolean hasParentWithGroup=false;
        boolean hasParentWithQuery=false;
    boolean hasQuery=tag.containsAttribute("query");
   
    while((parent=getParentTagOutput(parent))!=null) {
            if(!hasParentWithQuery)hasParentWithQuery=parent.hasQuery();
            if(!hasParentWithGroup)hasParentWithGroup=parent.hasGroup();
            if(hasParentWithQuery && hasParentWithGroup)break;
    }
       
        if(hasQuery && hasParentWithQuery)
      throw new EvaluatorException("Nesting of tags cfoutput with attribute query is not allowed");
View Full Code Here

TOP

Related Classes of railo.transformer.bytecode.statement.tag.TagOutput

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.