Examples of ParamTag


Examples of org.apache.struts2.views.jsp.ParamTag

    public void testWithParamsWithFieldErrors3() throws Exception {
        FieldErrorTag tag = new FieldErrorTag();
        ((InternalAction)action).setHaveFieldErrors(true);
        tag.setPageContext(pageContext);
        tag.doStartTag();
            ParamTag pTag1 = new ParamTag();
            pTag1.setPageContext(pageContext);
            pTag1.setValue("%{'field2'}");
            pTag1.doStartTag();
            pTag1.doEndTag();

        tag.doEndTag();

        verify(FieldErrorTagTest.class.getResource("fielderror-5.txt"));
    }
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

    public void testWithParamsWithoutFieldErrors1() throws Exception {
        FieldErrorTag tag = new FieldErrorTag();
        ((InternalAction)action).setHaveFieldErrors(false);
        tag.setPageContext(pageContext);
        tag.doStartTag();
            ParamTag pTag1 = new ParamTag();
            pTag1.setPageContext(pageContext);
            pTag1.setValue("%{'field1'}");
            pTag1.doStartTag();
            pTag1.doEndTag();

            ParamTag pTag2 = new ParamTag();
            pTag2.setPageContext(pageContext);
            pTag2.setValue("%{'field3'}");
            pTag2.doStartTag();
            pTag2.doEndTag();
        tag.doEndTag();

        verify(FieldErrorTagTest.class.getResource("fielderror-2.txt"));
    }
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

    public void testWithParamsWithoutFieldErrors2() throws Exception {
        FieldErrorTag tag = new FieldErrorTag();
        ((InternalAction)action).setHaveFieldErrors(false);
        tag.setPageContext(pageContext);
        tag.doStartTag();
            ParamTag pTag1 = new ParamTag();
            pTag1.setPageContext(pageContext);
            pTag1.setValue("%{'field1'}");
            pTag1.doStartTag();
            pTag1.doEndTag();

            ParamTag pTag2 = new ParamTag();
            pTag2.setPageContext(pageContext);
            pTag2.setValue("%{'field3'}");
            pTag2.doStartTag();
            pTag2.doEndTag();
        tag.doEndTag();

        verify(FieldErrorTagTest.class.getResource("fielderror-2.txt"));
    }
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

    public void testWithParamsWithoutFieldErrors3() throws Exception {
        FieldErrorTag tag = new FieldErrorTag();
        ((InternalAction)action).setHaveFieldErrors(false);
        tag.setPageContext(pageContext);
        tag.doStartTag();
            ParamTag pTag1 = new ParamTag();
            pTag1.setPageContext(pageContext);
            pTag1.setValue("%{'field2'}");
            pTag1.doStartTag();
            pTag1.doEndTag();

        tag.doEndTag();

        verify(FieldErrorTagTest.class.getResource("fielderror-2.txt"));
    }
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

        formTag.setPageContext(pageContext);
        formTag.setId("myFormId");
        formTag.setAction("testAction");


        ParamTag formParamTag = new ParamTag();
        formParamTag.setPageContext(pageContext);
        formParamTag.setName("tooltipConfig");
        formParamTag.setValue(
            "#{" +
                "'tooltipIcon':'/struts/tooltip/myTooltip.gif', " +
                "'tooltipDelay':'500', " +
                "'jsTooltipEnabled':'true' "+
                "}"
        );


        TextFieldTag tag = new TextFieldTag();
        tag.setPageContext(pageContext);
        tag.setLabel("MyLabel");
        tag.setId("myId");
        tag.setTooltip("myTooltip");

        ParamTag textFieldParamTag = new ParamTag();
        textFieldParamTag.setPageContext(pageContext);
        textFieldParamTag.setName("tooltipConfig");
        textFieldParamTag.setValue(
            "#{" +
                "'tooltipIcon':'/struts/tooltip/myTooltip2.gif', " +
                "'tooltipDelay':'5000' "+
                "}"
        );

        formTag.doStartTag();
        formParamTag.doStartTag();
        formParamTag.doEndTag();
        tag.doStartTag();
        textFieldParamTag.doStartTag();
        textFieldParamTag.doEndTag();
        tag.doEndTag();
        formTag.doEndTag();

        verify(TooltipTest.class.getResource("tooltip-3.txt"));
    }
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

        formTag.setPageContext(pageContext);
        formTag.setId("myFormId");
        formTag.setAction("testAction");


        ParamTag formParamTag = new ParamTag();
        formParamTag.setPageContext(pageContext);
        formParamTag.setName("tooltipConfig");
        StrutsMockBodyContent bodyContent = new StrutsMockBodyContent(new MockJspWriter());
        bodyContent.setString(
                "tooltipIcon=/struts/tooltip/myTooltip.gif| " +
                "tooltipDelay=500| " +
                "jsTooltipEnabled=true "
        );
        formParamTag.setBodyContent(bodyContent);

        TextFieldTag tag = new TextFieldTag();
        tag.setPageContext(pageContext);
        tag.setLabel("MyLabel");
        tag.setId("myId");
        tag.setTooltip("myTooltip");


        ParamTag textFieldParamTag = new ParamTag();
        textFieldParamTag.setPageContext(pageContext);
        textFieldParamTag.setName("tooltipConfig");
        StrutsMockBodyContent bodyContent2 = new StrutsMockBodyContent(new MockJspWriter());
        bodyContent2.setString(
                "tooltipIcon=/struts/tooltip/myTooltip2.gif| " +
                "tooltipDelay=5000 "
        );
        textFieldParamTag.setBodyContent(bodyContent2);

        formTag.doStartTag();
        formParamTag.doStartTag();
        formParamTag.doEndTag();
        tag.doStartTag();
        textFieldParamTag.doStartTag();
        textFieldParamTag.doEndTag();
        tag.doEndTag();
        formTag.doEndTag();
       
        System.out.println(writer.toString());
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

  public void testWithParamsWithFieldErrors1() throws Exception {
    FieldErrorTag tag = new FieldErrorTag();
    ((InternalAction)action).setHaveFieldErrors(true);
    tag.setPageContext(pageContext);
    tag.doStartTag();
      ParamTag pTag1 = new ParamTag();
      pTag1.setPageContext(pageContext);
      pTag1.setValue("%{'field1'}");
      pTag1.doStartTag();
      pTag1.doEndTag();
     
      ParamTag pTag2 = new ParamTag();
      pTag2.setPageContext(pageContext);
      pTag2.setValue("%{'field3'}");
      pTag2.doStartTag();
      pTag2.doEndTag();
     
    tag.doEndTag();
   
    verify(FieldErrorTagTest.class.getResource("fielderror-3.txt"));
  }
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

  public void testWithParamsWithFieldErrors2() throws Exception {
    FieldErrorTag tag = new FieldErrorTag();
    ((InternalAction)action).setHaveFieldErrors(true);
    tag.setPageContext(pageContext);
    tag.doStartTag();
      ParamTag pTag1 = new ParamTag();
      pTag1.setPageContext(pageContext);
      pTag1.setValue("%{'field1'}");
      pTag1.doStartTag();
      pTag1.doEndTag();
     
      ParamTag pTag2 = new ParamTag();
      pTag2.setPageContext(pageContext);
      pTag2.setValue("%{'field2'}");
      pTag2.doStartTag();
      pTag2.doEndTag();
     
    tag.doEndTag();
   
    verify(FieldErrorTagTest.class.getResource("fielderror-4.txt"));
  }
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

  public void testWithParamsWithFieldErrors3() throws Exception {
    FieldErrorTag tag = new FieldErrorTag();
    ((InternalAction)action).setHaveFieldErrors(true);
    tag.setPageContext(pageContext);
    tag.doStartTag();
      ParamTag pTag1 = new ParamTag();
      pTag1.setPageContext(pageContext);
      pTag1.setValue("%{'field2'}");
      pTag1.doStartTag();
      pTag1.doEndTag();
     
    tag.doEndTag();
   
    verify(FieldErrorTagTest.class.getResource("fielderror-5.txt"));
  }
View Full Code Here

Examples of org.apache.struts2.views.jsp.ParamTag

  public void testWithParamsWithoutFieldErrors1() throws Exception {
    FieldErrorTag tag = new FieldErrorTag();
    ((InternalAction)action).setHaveFieldErrors(false);
    tag.setPageContext(pageContext);
    tag.doStartTag();
      ParamTag pTag1 = new ParamTag();
      pTag1.setPageContext(pageContext);
      pTag1.setValue("%{'field1'}");
      pTag1.doStartTag();
      pTag1.doEndTag();
     
      ParamTag pTag2 = new ParamTag();
      pTag2.setPageContext(pageContext);
      pTag2.setValue("%{'field3'}");
      pTag2.doStartTag();
      pTag2.doEndTag();
    tag.doEndTag();
   
    verify(FieldErrorTagTest.class.getResource("fielderror-2.txt"));
  }
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.