private boolean _jspx_meth_s_text_5(
     javax.servlet.jsp.tagext.JspTag _jspx_th_s_if_7, PageContext _jspx_page_context)
     throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  s:text
   org.apache.struts2.views.jsp.TextTag _jspx_th_s_text_5 =
       (org.apache.struts2.views.jsp.TextTag)
           _jspx_tagPool_s_text_name_nobody.get(org.apache.struts2.views.jsp.TextTag.class);
   _jspx_th_s_text_5.setPageContext(_jspx_page_context);
   _jspx_th_s_text_5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_s_if_7);
   _jspx_th_s_text_5.setName("Entity.attribute.flag.maxLength.short");
   int _jspx_eval_s_text_5 = _jspx_th_s_text_5.doStartTag();
   if (_jspx_th_s_text_5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_s_text_name_nobody.reuse(_jspx_th_s_text_5);
     return true;
   }
   _jspx_tagPool_s_text_name_nobody.reuse(_jspx_th_s_text_5);
   return false;
 }
Example #2
0
  // Text
  public void testTextComponentDisposeItselfFromComponentStack() throws Exception {
    TextFieldTag t = new TextFieldTag();
    t.setPageContext(pageContext);
    t.setName("textFieldName");

    TextTag tag = new TextTag();
    tag.setName("some.i18n.key");
    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());
    }
  }