public void testWithNestedBindTagWithinForm() throws Exception { NestedPathTag nestedPathTag = new NestedPathTag(); nestedPathTag.setPath("spouse."); nestedPathTag.setPageContext(getPageContext()); nestedPathTag.doStartTag(); BindTag bindTag = new BindTag(); bindTag.setPath("name"); bindTag.setPageContext(getPageContext()); bindTag.doStartTag(); BindStatus bindStatus = (BindStatus) getPageContext().findAttribute(BindTag.STATUS_VARIABLE_NAME); assertEquals("Sally", bindStatus.getValue()); }
public void testWithNestedBind() throws Exception { NestedPathTag nestedPathTag = new NestedPathTag(); nestedPathTag.setPath("spouse."); nestedPathTag.setPageContext(getPageContext()); nestedPathTag.doStartTag(); this.tag.setPath("name"); assertEquals(Tag.SKIP_BODY, this.tag.doStartTag()); String output = getOutput(); assertTagOpened(output); assertTagClosed(output); assertContainsAttribute(output, "type", getType()); assertValueAttribute(output, "Sally"); }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); // form:form org.springframework.web.servlet.tags.form.FormTag _jspx_th_form_005fform_005f0 = (org.springframework.web.servlet.tags.form.FormTag) _005fjspx_005ftagPool_005fform_005fform_0026_005fmodelAttribute_005fmethod_005faction .get(org.springframework.web.servlet.tags.form.FormTag.class); _jspx_th_form_005fform_005f0.setPageContext(_jspx_page_context); _jspx_th_form_005fform_005f0.setParent(null); // /jsp/detailBus.jsp(3,0) name = action type = null reqTime = true required = false fragment // = false deferredValue = false expectedTypeName = null deferredMethod = false // methodSignature = null _jspx_th_form_005fform_005f0.setAction("/edit-bus"); // /jsp/detailBus.jsp(3,0) name = method type = null reqTime = true required = false fragment // = false deferredValue = false expectedTypeName = null deferredMethod = false // methodSignature = null _jspx_th_form_005fform_005f0.setMethod("get"); // /jsp/detailBus.jsp(3,0) name = modelAttribute type = null reqTime = true required = false // fragment = false deferredValue = false expectedTypeName = null deferredMethod = false // methodSignature = null _jspx_th_form_005fform_005f0.setModelAttribute("detailFormBean"); int[] _jspx_push_body_count_form_005fform_005f0 = new int[] {0}; try { int _jspx_eval_form_005fform_005f0 = _jspx_th_form_005fform_005f0.doStartTag(); if (_jspx_eval_form_005fform_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write("\t<fieldset>\r\n"); out.write("\t\t<legend>"); if (_jspx_meth_spring_005fmessage_005f0( _jspx_th_form_005fform_005f0, _jspx_page_context, _jspx_push_body_count_form_005fform_005f0)) return; out.write("</legend>\r\n"); out.write("\t\t\r\n"); out.write("\t\t"); if (_jspx_meth_tiles_005finsertTemplate_005f0( _jspx_th_form_005fform_005f0, _jspx_page_context, _jspx_push_body_count_form_005fform_005f0)) return; out.write("\r\n"); out.write("\t\t\r\n"); out.write("\t\t<br>\r\n"); out.write("\t\t"); // spring:nestedPath org.springframework.web.servlet.tags.NestedPathTag _jspx_th_spring_005fnestedPath_005f0 = (org.springframework.web.servlet.tags.NestedPathTag) _005fjspx_005ftagPool_005fspring_005fnestedPath_0026_005fpath.get( org.springframework.web.servlet.tags.NestedPathTag.class); _jspx_th_spring_005fnestedPath_005f0.setPageContext(_jspx_page_context); _jspx_th_spring_005fnestedPath_005f0.setParent( (javax.servlet.jsp.tagext.Tag) _jspx_th_form_005fform_005f0); // /jsp/detailBus.jsp(10,2) name = path type = null reqTime = true required = true // fragment = false deferredValue = false expectedTypeName = null deferredMethod = false // methodSignature = null _jspx_th_spring_005fnestedPath_005f0.setPath("bus"); int[] _jspx_push_body_count_spring_005fnestedPath_005f0 = new int[] {0}; try { int _jspx_eval_spring_005fnestedPath_005f0 = _jspx_th_spring_005fnestedPath_005f0.doStartTag(); if (_jspx_eval_spring_005fnestedPath_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { java.lang.String nestedPath = null; nestedPath = (java.lang.String) _jspx_page_context.findAttribute("nestedPath"); do { out.write("\r\n"); out.write("\t\t\t"); if (_jspx_meth_form_005flabel_005f0( _jspx_th_spring_005fnestedPath_005f0, _jspx_page_context, _jspx_push_body_count_spring_005fnestedPath_005f0)) return; out.write("\r\n"); out.write("\t\t\t<span id=\"bus.bodywork\">"); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate( "${detailFormBean.bus.bodywork}", java.lang.String.class, (PageContext) _jspx_page_context, null, false)); out.write("</span>\r\n"); out.write("\t\t\t<br>\r\n"); out.write("\t\t\t"); if (_jspx_meth_form_005flabel_005f1( _jspx_th_spring_005fnestedPath_005f0, _jspx_page_context, _jspx_push_body_count_spring_005fnestedPath_005f0)) return; out.write("\r\n"); out.write("\t\t\t<span id=\"bus.sittingPlacesCount\">"); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate( "${detailFormBean.bus.sittingPlacesCount}", java.lang.String.class, (PageContext) _jspx_page_context, null, false)); out.write("</span>\r\n"); out.write("\t\t\t<br>\r\n"); out.write("\t\t\t"); if (_jspx_meth_form_005flabel_005f2( _jspx_th_spring_005fnestedPath_005f0, _jspx_page_context, _jspx_push_body_count_spring_005fnestedPath_005f0)) return; out.write("\r\n"); out.write("\t\t\t<span id=\"bus.volume\">"); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate( "${detailFormBean.bus.volume}", java.lang.String.class, (PageContext) _jspx_page_context, null, false)); out.write("</span>\r\n"); out.write("\t\t"); int evalDoAfterBody = _jspx_th_spring_005fnestedPath_005f0.doAfterBody(); nestedPath = (java.lang.String) _jspx_page_context.findAttribute("nestedPath"); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_spring_005fnestedPath_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { return; } } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_spring_005fnestedPath_005f0[0]-- > 0) out = _jspx_page_context.popBody(); _jspx_th_spring_005fnestedPath_005f0.doCatch(_jspx_exception); } finally { _jspx_th_spring_005fnestedPath_005f0.doFinally(); _005fjspx_005ftagPool_005fspring_005fnestedPath_0026_005fpath.reuse( _jspx_th_spring_005fnestedPath_005f0); } out.write("\r\n"); out.write("\t</fieldset>\r\n"); out.write("\t\r\n"); out.write("\t<fieldset>\r\n"); out.write("\t\t<legend>"); if (_jspx_meth_spring_005fmessage_005f4( _jspx_th_form_005fform_005f0, _jspx_page_context, _jspx_push_body_count_form_005fform_005f0)) return; out.write("</legend>\r\n"); out.write("\t\t"); if (_jspx_meth_tiles_005finsertTemplate_005f1( _jspx_th_form_005fform_005f0, _jspx_page_context, _jspx_push_body_count_form_005fform_005f0)) return; out.write("\r\n"); out.write("\t</fieldset>\r\n"); out.write("\t\r\n"); out.write("\t<input type=\"submit\" name=\"editVehicle\" value='"); if (_jspx_meth_spring_005fmessage_005f5( _jspx_th_form_005fform_005f0, _jspx_page_context, _jspx_push_body_count_form_005fform_005f0)) return; out.write("'/>\r\n"); out.write("\t\r\n"); out.write("\t"); if (_jspx_meth_tiles_005finsertTemplate_005f2( _jspx_th_form_005fform_005f0, _jspx_page_context, _jspx_push_body_count_form_005fform_005f0)) return; out.write('\r'); out.write('\n'); int evalDoAfterBody = _jspx_th_form_005fform_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_form_005fform_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { return; } } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_form_005fform_005f0[0]-- > 0) out = _jspx_page_context.popBody(); _jspx_th_form_005fform_005f0.doCatch(_jspx_exception); } finally { _jspx_th_form_005fform_005f0.doFinally(); _005fjspx_005ftagPool_005fform_005fform_0026_005fmodelAttribute_005fmethod_005faction.reuse( _jspx_th_form_005fform_005f0); } out.write('\r'); out.write('\n'); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) { } if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }