Java Code Examples for org.springframework.web.servlet.tags.NestedPathTag#setPageContext()
The following examples show how to use
org.springframework.web.servlet.tags.NestedPathTag#setPageContext() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InputTagTests.java From spring-analysis-note with MIT License | 6 votes |
@Test public void withNestedBind() 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"); }
Example 2
Source File: InputTagTests.java From java-technology-stack with MIT License | 6 votes |
@Test public void withNestedBind() 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"); }
Example 3
Source File: InputTagTests.java From spring4-understanding with Apache License 2.0 | 6 votes |
@Test public void withNestedBind() 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"); }
Example 4
Source File: InputTagTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void withNestedBindTagWithinForm() 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()); }
Example 5
Source File: LabelTagTests.java From spring-analysis-note with MIT License | 5 votes |
@Override protected void extendPageContext(MockPageContext pageContext) throws JspException { super.extendPageContext(pageContext); NestedPathTag nestedPathTag = new NestedPathTag(); nestedPathTag.setPath("spouse."); nestedPathTag.setPageContext(pageContext); nestedPathTag.doStartTag(); }
Example 6
Source File: InputTagTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void withNestedBindTagWithinForm() 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()); }
Example 7
Source File: LabelTagTests.java From java-technology-stack with MIT License | 5 votes |
@Override protected void extendPageContext(MockPageContext pageContext) throws JspException { super.extendPageContext(pageContext); NestedPathTag nestedPathTag = new NestedPathTag(); nestedPathTag.setPath("spouse."); nestedPathTag.setPageContext(pageContext); nestedPathTag.doStartTag(); }
Example 8
Source File: InputTagTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void withNestedBindTagWithinForm() 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()); }
Example 9
Source File: LabelTagTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Override protected void extendPageContext(MockPageContext pageContext) throws JspException { super.extendPageContext(pageContext); NestedPathTag nestedPathTag = new NestedPathTag(); nestedPathTag.setPath("spouse."); nestedPathTag.setPageContext(pageContext); nestedPathTag.doStartTag(); }