private boolean _jspx_meth_s_set_2(
     javax.servlet.jsp.tagext.JspTag _jspx_th_s_if_1, PageContext _jspx_page_context)
     throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  s:set
   org.apache.struts2.views.jsp.SetTag _jspx_th_s_set_2 =
       (org.apache.struts2.views.jsp.SetTag)
           _jspx_tagPool_s_set_var.get(org.apache.struts2.views.jsp.SetTag.class);
   _jspx_th_s_set_2.setPageContext(_jspx_page_context);
   _jspx_th_s_set_2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_if_1);
   _jspx_th_s_set_2.setVar("htmlContent");
   int _jspx_eval_s_set_2 = _jspx_th_s_set_2.doStartTag();
   if (_jspx_eval_s_set_2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     if (_jspx_eval_s_set_2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
       out = _jspx_page_context.pushBody();
       _jspx_th_s_set_2.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
       _jspx_th_s_set_2.doInitBody();
     }
     do {
       out.write("\n");
       out.write("\t<ul class=\"fa-ul\">\n");
       out.write("\n");
       out.write("\t");
       if (_jspx_meth_s_if_2(
           (javax.servlet.jsp.tagext.JspTag) _jspx_th_s_set_2, _jspx_page_context)) return true;
       if (_jspx_meth_s_if_3(
           (javax.servlet.jsp.tagext.JspTag) _jspx_th_s_set_2, _jspx_page_context)) return true;
       if (_jspx_meth_s_if_4(
           (javax.servlet.jsp.tagext.JspTag) _jspx_th_s_set_2, _jspx_page_context)) return true;
       if (_jspx_meth_s_if_5(
           (javax.servlet.jsp.tagext.JspTag) _jspx_th_s_set_2, _jspx_page_context)) return true;
       if (_jspx_meth_s_if_8(
           (javax.servlet.jsp.tagext.JspTag) _jspx_th_s_set_2, _jspx_page_context)) return true;
       out.write("\n");
       out.write("\n");
       out.write("\t</ul>\n");
       int evalDoAfterBody = _jspx_th_s_set_2.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
     if (_jspx_eval_s_set_2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
       out = _jspx_page_context.popBody();
   }
   if (_jspx_th_s_set_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_s_set_var.reuse(_jspx_th_s_set_2);
     return true;
   }
   _jspx_tagPool_s_set_var.reuse(_jspx_th_s_set_2);
   return false;
 }
 private boolean _jspx_meth_s_set_0(PageContext _jspx_page_context) throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  s:set
   org.apache.struts2.views.jsp.SetTag _jspx_th_s_set_0 =
       (org.apache.struts2.views.jsp.SetTag)
           _jspx_tagPool_s_set_var_value_nobody.get(org.apache.struts2.views.jsp.SetTag.class);
   _jspx_th_s_set_0.setPageContext(_jspx_page_context);
   _jspx_th_s_set_0.setParent(null);
   _jspx_th_s_set_0.setVar("validationRules");
   _jspx_th_s_set_0.setValue("#attribute.validationRules");
   int _jspx_eval_s_set_0 = _jspx_th_s_set_0.doStartTag();
   if (_jspx_th_s_set_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_s_set_var_value_nobody.reuse(_jspx_th_s_set_0);
     return true;
   }
   _jspx_tagPool_s_set_var_value_nobody.reuse(_jspx_th_s_set_0);
   return false;
 }
 private boolean _jspx_meth_s_set_1(PageContext _jspx_page_context) throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  s:set
   org.apache.struts2.views.jsp.SetTag _jspx_th_s_set_1 =
       (org.apache.struts2.views.jsp.SetTag)
           _jspx_tagPool_s_set_var_value_nobody.get(org.apache.struts2.views.jsp.SetTag.class);
   _jspx_th_s_set_1.setPageContext(_jspx_page_context);
   _jspx_th_s_set_1.setParent(null);
   _jspx_th_s_set_1.setVar("hasValidationRulesVar");
   _jspx_th_s_set_1.setValue(
       "%{#validationRules != null && #validationRules.ognlValidationRule != null&& #validationRules.ognlValidationRule.expression != null}");
   int _jspx_eval_s_set_1 = _jspx_th_s_set_1.doStartTag();
   if (_jspx_th_s_set_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_s_set_var_value_nobody.reuse(_jspx_th_s_set_1);
     return true;
   }
   _jspx_tagPool_s_set_var_value_nobody.reuse(_jspx_th_s_set_1);
   return false;
 }
示例#4
0
  // Set
  public void testSetComponentDisposeItselfFromComponentStack() throws Exception {
    TextFieldTag t = new TextFieldTag();
    t.setPageContext(pageContext);
    t.setName("textFieldName");

    SetTag tag = new SetTag();
    tag.setName("name");
    tag.setValue("'value'");
    tag.setPageContext(pageContext);

    try {
      t.doStartTag();
      tag.doStartTag();
      assertEquals(tag.getComponent().getComponentStack().peek(), tag.getComponent());
      tag.doEndTag();
      assertEquals(t.getComponent().getComponentStack().peek(), t.getComponent());
      t.doEndTag();
    } catch (Exception e) {
      e.printStackTrace();
      fail(e.toString());
    }
  }
 private boolean _jspx_meth_s_set_4(
     javax.servlet.jsp.tagext.JspTag _jspx_th_s_if_9, PageContext _jspx_page_context)
     throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  s:set
   org.apache.struts2.views.jsp.SetTag _jspx_th_s_set_4 =
       (org.apache.struts2.views.jsp.SetTag)
           _jspx_tagPool_s_set_var_value_scope_nobody.get(
               org.apache.struts2.views.jsp.SetTag.class);
   _jspx_th_s_set_4.setPageContext(_jspx_page_context);
   _jspx_th_s_set_4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_if_9);
   _jspx_th_s_set_4.setVar("langCode");
   _jspx_th_s_set_4.setValue("currentLang.code");
   _jspx_th_s_set_4.setScope("page");
   int _jspx_eval_s_set_4 = _jspx_th_s_set_4.doStartTag();
   if (_jspx_th_s_set_4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_s_set_var_value_scope_nobody.reuse(_jspx_th_s_set_4);
     return true;
   }
   _jspx_tagPool_s_set_var_value_scope_nobody.reuse(_jspx_th_s_set_4);
   return false;
 }
 private boolean _jspx_meth_s_set_3(
     javax.servlet.jsp.tagext.JspTag _jspx_th_s_if_9, PageContext _jspx_page_context)
     throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  s:set
   org.apache.struts2.views.jsp.SetTag _jspx_th_s_set_3 =
       (org.apache.struts2.views.jsp.SetTag)
           _jspx_tagPool_s_set_var_value_scope_nobody.get(
               org.apache.struts2.views.jsp.SetTag.class);
   _jspx_th_s_set_3.setPageContext(_jspx_page_context);
   _jspx_th_s_set_3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_if_9);
   _jspx_th_s_set_3.setVar("labelKey");
   _jspx_th_s_set_3.setValue("#validationRules.ognlValidationRule.helpMessageKey");
   _jspx_th_s_set_3.setScope("page");
   int _jspx_eval_s_set_3 = _jspx_th_s_set_3.doStartTag();
   if (_jspx_th_s_set_3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_s_set_var_value_scope_nobody.reuse(_jspx_th_s_set_3);
     return true;
   }
   _jspx_tagPool_s_set_var_value_scope_nobody.reuse(_jspx_th_s_set_3);
   return false;
 }