Example usage for org.springframework.web.servlet.tags NestedPathTag setPageContext

List of usage examples for org.springframework.web.servlet.tags NestedPathTag setPageContext

Introduction

In this page you can find the example usage for org.springframework.web.servlet.tags NestedPathTag setPageContext.

Prototype


public void setPageContext(PageContext pageContext) 

Source Link

Document

Set the page context.

Usage

From source file:org.hdiv.web.servlet.tags.form.InputTagTests.java

public void testWithNestedBind() throws Exception {
    NestedPathTag nestedPathTag = new NestedPathTag();
    nestedPathTag.setPath("spouse.");
    nestedPathTag.setPageContext(getPageContext());
    nestedPathTag.doStartTag();//from www  .j a v  a 2s  . c  o m

    this.tag.setPath("name");

    assertEquals(Tag.SKIP_BODY, this.tag.doStartTag());

    String output = getWriter().toString();

    assertTagOpened(output);
    assertTagClosed(output);

    assertContainsAttribute(output, "type", getType());
    assertValueAttribute(output, "Sally");
}