Package javax.servlet.jsp.tagext

Examples of javax.servlet.jsp.tagext.TagSupport


   public int doEndTag()throws JspTagException {
      try {
         Definition definition = new Definition();
         HashMap screens = null;
         ArrayList params = null;
         TagSupport screen = null;

         screens = (HashMap) pageContext.getAttribute("screens", pageContext.APPLICATION_SCOPE);
         if (screens != null) {
            params = (ArrayList) screens.get(screenId);
         }
View Full Code Here


        }

        // Test for getParent method in TagSupport

        if ( "getParent".equalsIgnoreCase ( this.getAtt2() ) ) {
            TagSupport ts = new TagSupport();
            setParent( this );
            Tag tt = getParent();
            if ( tt == this ) {
                TestString = TestString + "Pass";
            } else {
View Full Code Here

  public void testHasAncestorOfTypeWhereAncestorTagIsNotATagType() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        assertFalse(TagUtils.hasAncestorOfType(
            new TagSupport(), String.class));
      }
    }.runTest();
  }
View Full Code Here

  }

  public void testHasAncestorOfTypeWithNullAncestorTagClassArgument() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        assertFalse(TagUtils.hasAncestorOfType(new TagSupport(), null));
      }
    }.runTest();
  }
View Full Code Here

 
  public void testJSPTag() throws Exception {
    Map<String, Object> attributes = facesContext.getViewRoot().getAttributes();
   
    Object ajaxBean = new Object();
    TagSupport ajaxTag = setupTag("coolBean", ajaxBean, true);
   
    ajaxTag.doStartTag();
    assertSame(ajaxBean, attributes.get(AjaxPhaseListener.AJAX_BEAN_PREFIX + "coolBean"));

    Object bean = new Object();
    TagSupport tag = setupTag("beBean", bean, false);
   
    tag.doStartTag();
    assertSame(bean, attributes.get(AjaxPhaseListener.VIEW_BEAN_PREFIX + "beBean"));
  }
View Full Code Here

    TagUtils.getScope(null);
  }

  @Test(expected = IllegalArgumentException.class)
  public void hasAncestorOfTypeWhereAncestorTagIsNotATagType() throws Exception {
    assertFalse(TagUtils.hasAncestorOfType(new TagSupport(), String.class));
  }
View Full Code Here

    assertFalse(TagUtils.hasAncestorOfType(null, TagSupport.class));
  }

  @Test(expected = IllegalArgumentException.class)
  public void hasAncestorOfTypeWithNullAncestorTagClassArgument() throws Exception {
    assertFalse(TagUtils.hasAncestorOfType(new TagSupport(), null));
  }
View Full Code Here

     PageContextImpl pageContext;
    try {
      pageContext = new PageContextImpl(request, null);
      JspWriter out = pageContext.getOut();
      TagSupport js = getJspTagSupport(request);
     
      js.setPageContext(pageContext);
      js.setParent(null);

      int eval_html = js.doStartTag();
        // if (js.doEndTag() == Tag.SKIP_PAGE)

          xmlJScripts.appendChilddocument.createCDATASection( out.toString() )  );

      return xmlJScripts;
View Full Code Here

    }

    public void testJSPTag() throws Exception {
        Map<String, Object> attributes = facesContext.getViewRoot().getAttributes();
        Object ajaxBean = new Object();
        TagSupport ajaxTag = setupTag("coolBean", ajaxBean, true);

        ajaxTag.doStartTag();
        assertSame(ajaxBean, attributes.get(AjaxPhaseListener.AJAX_BEAN_PREFIX + "coolBean"));

        Object bean = new Object();
        TagSupport tag = setupTag("beBean", bean, false);

        tag.doStartTag();
        assertSame(bean, attributes.get(AjaxPhaseListener.VIEW_BEAN_PREFIX + "beBean"));
    }
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.tagext.TagSupport

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.