Package org.springframework.web.portlet.context

Examples of org.springframework.web.portlet.context.PortletConfigAwareBean


    DispatcherPortlet portlet = new DispatcherPortlet();

    portlet.init(new MockPortletConfig(portletContext, "empty"));
    PortletContextAwareBean contextBean = (PortletContextAwareBean)
        portlet.getPortletApplicationContext().getBean("portletContextAwareBean");
    PortletConfigAwareBean configBean = (PortletConfigAwareBean)
        portlet.getPortletApplicationContext().getBean("portletConfigAwareBean");
    assertSame(portletContext, contextBean.getPortletContext());
    assertSame(portlet.getPortletConfig(), configBean.getPortletConfig());
    PortletMultipartResolver multipartResolver = portlet.getMultipartResolver();
    assertNotNull(multipartResolver);

    portlet.refresh();

    PortletContextAwareBean contextBean2 = (PortletContextAwareBean)
        portlet.getPortletApplicationContext().getBean("portletContextAwareBean");
    PortletConfigAwareBean configBean2 = (PortletConfigAwareBean)
        portlet.getPortletApplicationContext().getBean("portletConfigAwareBean");
    assertSame(portletContext, contextBean.getPortletContext());
    assertSame(portlet.getPortletConfig(), configBean.getPortletConfig());
    assertTrue(contextBean != contextBean2);
    assertTrue(configBean != configBean2);
View Full Code Here


    DispatcherPortlet portlet = new DispatcherPortlet();

    portlet.init(new MockPortletConfig(portletContext, "empty"));
    PortletContextAwareBean contextBean = (PortletContextAwareBean)
        portlet.getPortletApplicationContext().getBean("portletContextAwareBean");
    PortletConfigAwareBean configBean = (PortletConfigAwareBean)
        portlet.getPortletApplicationContext().getBean("portletConfigAwareBean");
    assertSame(portletContext, contextBean.getPortletContext());
    assertSame(portlet.getPortletConfig(), configBean.getPortletConfig());
    PortletMultipartResolver multipartResolver = portlet.getMultipartResolver();
    assertNotNull(multipartResolver);

    ((ConfigurableApplicationContext) portlet.getPortletApplicationContext()).refresh();

    PortletContextAwareBean contextBean2 = (PortletContextAwareBean)
        portlet.getPortletApplicationContext().getBean("portletContextAwareBean");
    PortletConfigAwareBean configBean2 = (PortletConfigAwareBean)
        portlet.getPortletApplicationContext().getBean("portletConfigAwareBean");
    assertSame(portletContext, contextBean.getPortletContext());
    assertSame(portlet.getPortletConfig(), configBean.getPortletConfig());
    assertTrue(contextBean != contextBean2);
    assertTrue(configBean != configBean2);
View Full Code Here

    DispatcherPortlet portlet = new DispatcherPortlet();

    portlet.init(new MockPortletConfig(portletContext, "empty"));
    PortletContextAwareBean contextBean = (PortletContextAwareBean)
        portlet.getPortletApplicationContext().getBean("portletContextAwareBean");
    PortletConfigAwareBean configBean = (PortletConfigAwareBean)
        portlet.getPortletApplicationContext().getBean("portletConfigAwareBean");
    assertSame(portletContext, contextBean.getPortletContext());
    assertSame(portlet.getPortletConfig(), configBean.getPortletConfig());
    PortletMultipartResolver multipartResolver = portlet.getMultipartResolver();
    assertNotNull(multipartResolver);

    portlet.refresh();

    PortletContextAwareBean contextBean2 = (PortletContextAwareBean)
        portlet.getPortletApplicationContext().getBean("portletContextAwareBean");
    PortletConfigAwareBean configBean2 = (PortletConfigAwareBean)
        portlet.getPortletApplicationContext().getBean("portletConfigAwareBean");
    assertSame(portletContext, contextBean.getPortletContext());
    assertSame(portlet.getPortletConfig(), configBean.getPortletConfig());
    assertTrue(contextBean != contextBean2);
    assertTrue(configBean != configBean2);
View Full Code Here

    DispatcherPortlet portlet = new DispatcherPortlet();

    portlet.init(new MockPortletConfig(portletContext, "empty"));
    PortletContextAwareBean contextBean = (PortletContextAwareBean)
        portlet.getPortletApplicationContext().getBean("portletContextAwareBean");
    PortletConfigAwareBean configBean = (PortletConfigAwareBean)
        portlet.getPortletApplicationContext().getBean("portletConfigAwareBean");
    assertSame(portletContext, contextBean.getPortletContext());
    assertSame(portlet.getPortletConfig(), configBean.getPortletConfig());
    PortletMultipartResolver multipartResolver = portlet.getMultipartResolver();
    assertNotNull(multipartResolver);

    ((ConfigurableApplicationContext) portlet.getPortletApplicationContext()).refresh();

    PortletContextAwareBean contextBean2 = (PortletContextAwareBean)
        portlet.getPortletApplicationContext().getBean("portletContextAwareBean");
    PortletConfigAwareBean configBean2 = (PortletConfigAwareBean)
        portlet.getPortletApplicationContext().getBean("portletConfigAwareBean");
    assertSame(portletContext, contextBean.getPortletContext());
    assertSame(portlet.getPortletConfig(), configBean.getPortletConfig());
    assertTrue(contextBean != contextBean2);
    assertTrue(configBean != configBean2);
View Full Code Here

TOP

Related Classes of org.springframework.web.portlet.context.PortletConfigAwareBean

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.