Examples of CustomTag


Examples of com.allaire.cfx.CustomTag

   
   
 
    public void verifyCFX(String name) throws PageException {
      CFXTagPool pool=config.getCFXTagPool();
    CustomTag ct=null;
    try {
      ct = pool.getCustomTag(name);
    }
        catch (CFXTagException e) {
      throw Caster.toPageException(e);
View Full Code Here

Examples of com.allaire.cfx.CustomTag

      // if(sn.getVersion()==SerialNumber.VERSION_COMMUNITY)
      //     throw new SecurityException("no access to this functionality with the "+sn.getStringVersion()+" version of railo");
     
   
    CFXTagPool pool=pageContext.getConfig().getCFXTagPool();
    CustomTag ct;
    try {
      ct = pool.getCustomTag(appendix);
    }
        catch (CFXTagException e) {
      throw Caster.toPageException(e);
    }
    Request req=new RequestImpl(pageContext,attributes);
    Response rsp=new ResponseImpl(pageContext,req.debug());
    try {
      ct.processRequest(req,rsp);
    } catch (Exception e) {
      throw Caster.toPageException(e);
    }
    pool.releaseCustomTag(ct);
   
View Full Code Here

Examples of com.allaire.cfx.CustomTag

      String names = ListUtil.arrayToList(set.toArray(new String[set.size()]),",");
     
      throw new CFXTagException("there is no Custom Tag (CFX) with name ["+name+"], available Custom Tags are ["+names+"]");
    }
    CFXTagClass ctc=(CFXTagClass) o;
    CustomTag ct = ctc.newInstance();
    //if(!(o instanceof CustomTag))throw new CFXTagException("["+name+"] is not of type ["+CustomTag.class.getName()+"]");
    return ct;
  }
View Full Code Here

Examples of com.opensymphony.module.sitemesh.html.CustomTag

        this.newTagName = newTagName;
    }

    public void process(Tag tag) {
        currentBuffer().delete(tag.getPosition(), tag.getLength());
        CustomTag customTag = new CustomTag(tag);
        customTag.setName(newTagName);
        customTag.writeTo(currentBuffer(), tag.getPosition());
    }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.taglib.CustomTag

    if (f == null || !f.exists())
      return;
    TaglibHelper helper = TaglibHelperManager.getInstance().getTaglibHelper(f);
    String decl = ""; //$NON-NLS-1$
    List problems = new ArrayList();
    CustomTag tag = helper.getCustomTag(tagToAdd, getStructuredDocument(), customTag, problems);
    TaglibVariable[] taglibVars = tag.getTagVariables();
    fTranslationProblems.addAll(problems);
    /*
     * Add AT_BEGIN variables
     */
    for (int i = 0; i < taglibVars.length; i++) {
      if (taglibVars[i].getScope() == VariableInfo.AT_BEGIN) {
        decl = taglibVars[i].getDeclarationString();
        appendToBuffer(decl, fUserCode, false, customTag);
      }
    }
    boolean isEmptyTag = false;
    if (index != -1)
      isEmptyTag= isEmptyTag(customTag, index);
    else
      isEmptyTag= isEmptyTag(customTag);
   
    /*
     * Add a single  { to limit the scope of NESTED variables
     */
    StringBuffer text = new StringBuffer();
    if (!isEmptyTag && tag.isIterationTag() && tag.getTagClassName() != null) {
      text.append("\nwhile(true) "); //$NON-NLS-1$
    }
    text.append("{ // <"); //$NON-NLS-1$
    text.append(tagToAdd);
    if (isEmptyTag)
View Full Code Here

Examples of org.htmlparser.tests.scannersTests.CompositeTagScannerTest.CustomTag

    {
        createParser(xml);
        parser.addScanner(new CustomScanner());
        parseAndAssertNodeCount(numNodes);
        assertType("custom node", CustomTag.class, node[useNode]);
        CustomTag tag = (CustomTag) node[useNode];
        assertEquals(
            "start line",
            expectedStartLine,
            tag.tagData.getStartLine());
        assertEquals("end line", expectedEndLine, tag.tagData.getEndLine());
View Full Code Here

Examples of org.htmlparser.tests.scannersTests.CompositeTagScannerTest.CustomTag

     * @param endLine int the expected end line number of the tag
     * @throws ParserException if there is an exception during parsing
     */
    private void testLineNumber(String xml, int numNodes, int useNode, int expectedStartLine, int expectedEndLine) throws ParserException {
        createParser(xml);
        parser.setNodeFactory (new PrototypicalNodeFactory (new CustomTag ()));
        parseAndAssertNodeCount(numNodes);
        assertType("custom node",CustomTag.class,node[useNode]);
        CustomTag tag = (CustomTag)node[useNode];
        assertEquals("start line", expectedStartLine, tag.getStartingLineNumber ());
        assertEquals("end line", expectedEndLine, tag.getEndTag ().getEndingLineNumber ());
    }
View Full Code Here

Examples of org.htmlparser.tests.scannersTests.CompositeTagScannerTest.CustomTag

      throws ParserException {
    createParser(xml);
    parser.addScanner(new CustomScanner());
    parseAndAssertNodeCount(numNodes);
    assertType("custom node", CustomTag.class, node[useNode]);
    CustomTag tag = (CustomTag) node[useNode];
    assertEquals("start line", expectedStartLine, tag.tagData.getStartLine());
    assertEquals("end line", expectedEndLine, tag.tagData.getEndLine());

  }
View Full Code Here

Examples of org.rometools.feed.module.base.CustomTag

        List tags = ((CustomTags)module).getValues();
        Iterator it = tags.iterator();

        while(it.hasNext()) {
            CustomTag tag = (CustomTag)it.next();

            if(tag.getValue() instanceof DateTimeRange) {
                DateTimeRange dtr = (DateTimeRange)tag.getValue();
                Element newTag = new Element(tag.getName(),CustomTagParser.NS);
                newTag.setAttribute("type","dateTimeRange");
                newTag.addContent(this.generateSimpleElement("start",GoogleBaseParser.LONG_DT_FMT.format(dtr.getStart())));
                newTag.addContent(this.generateSimpleElement("end",GoogleBaseParser.LONG_DT_FMT.format(dtr.getEnd())));
                element.addContent(newTag);
            } else if(tag.getValue() instanceof ShortDate) {
                ShortDate sd = (ShortDate)tag.getValue();
                Element newTag = this.generateSimpleElement(tag.getName(),GoogleBaseParser.SHORT_DT_FMT.format(sd));
                newTag.setAttribute("type","date");
                element.addContent(newTag);
            } else if(tag.getValue() instanceof Date) {
                Date d = (Date)tag.getValue();
                Element newTag = this.generateSimpleElement(tag.getName(),GoogleBaseParser.SHORT_DT_FMT.format(d));
                newTag.setAttribute("type","dateTime");
                element.addContent(newTag);
            } else if(tag.getValue() instanceof Integer) {
                Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString());
                newTag.setAttribute("type","int");
                element.addContent(newTag);
            } else if(tag.getValue() instanceof IntUnit) {
                Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString());
                newTag.setAttribute("type","intUnit");
                element.addContent(newTag);
            } else if(tag.getValue() instanceof Float) {
                Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString());
                newTag.setAttribute("type","float");
                element.addContent(newTag);
            } else if(tag.getValue() instanceof FloatUnit) {
                Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString());
                newTag.setAttribute("type","floatUnit");
                element.addContent(newTag);
            } else if(tag.getValue() instanceof String) {
                Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString());
                newTag.setAttribute("type","string");
                element.addContent(newTag);
            } else if(tag.getValue() instanceof URL) {
                Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString());
                newTag.setAttribute("type","url");
                element.addContent(newTag);
            } else if(tag.getValue() instanceof Boolean) {
                Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString());
                newTag.setAttribute("type","boolean");
                element.addContent(newTag);
            } else if( tag.getValue() instanceof CustomTagImpl.Location ){
    Element newTag = this.generateSimpleElement(tag.getName(),tag.getValue().toString());
                newTag.setAttribute("type","location");
                element.addContent(newTag);
      }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.