Package org.apache.struts2.components

Examples of org.apache.struts2.components.Head


/**
* @see Head
*/
public class HeadDirective extends AbstractDirective {
    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Head(stack, req, res);
    }
View Full Code Here


    public HeadModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        super(stack, req, res);
    }

    protected Component getBean() {
        return new Head(stack, req, res);
    }
View Full Code Here

public class HeadTag extends AbstractUITag {

    private static final long serialVersionUID = 6876765769175246030L;

    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Head(stack, req, res);
    }
View Full Code Here

    public HeadModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        super(stack, req, res);
    }

    protected Component getBean() {
        return new Head(stack, req, res);
    }
View Full Code Here

/**
* @see Head
*/
public class HeadDirective extends AbstractDirective {
    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Head(stack, req, res);
    }
View Full Code Here

 
  private String calendarcss;
    private String debug;

    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Head(stack, req, res);
    }
View Full Code Here

    }

    public void testHead2() throws Exception {
        tag.setTheme("ajax");
        tag.doStartTag();
        Head component = (Head) tag.getComponent();
        assertTrue(!component.isDebug());
        tag.doEndTag();

        verify(HeadTagTest.class.getResource("HeadTagTest-2.txt"));
        assertTrue("should have debug false", writer.toString().indexOf("isDebug: false") > -1);
    }
View Full Code Here

    public void testHead3() throws Exception {
        tag.setTheme("ajax");
        tag.setDebug("true");
        tag.doStartTag();
        Head component = (Head) tag.getComponent(); // must be done between start and end
        assertTrue(component.isDebug());
        tag.doEndTag();

        verify(HeadTagTest.class.getResource("HeadTagTest-3.txt"));
        assertTrue("should have debug true", writer.toString().indexOf("isDebug: true") > -1);
    }
View Full Code Here

    }

    public void testHead4b() throws Exception {
        tag.setCalendarcss("my-calendar.css");
        tag.doStartTag();
        Head component = (Head) tag.getComponent(); // must be done between start and end
        assertEquals("my-calendar.css", component.getCalendarcss());
        tag.doEndTag();

        verify(HeadTagTest.class.getResource("HeadTagTest-4.txt"));
        assertEquals("my-calendar.css", tag.getCalendarcss());
    }
View Full Code Here

    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        this.tag = new Head(stack, request, response);
    }
View Full Code Here

TOP

Related Classes of org.apache.struts2.components.Head

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.