Package org.apache.tapestry

Examples of org.apache.tapestry.IPage


    public void testServiceSimple() throws Exception
    {
        Object[] parameters = new Object[0];
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IDirect d = newDirect();
        LinkFactory lf = newLinkFactory();
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
View Full Code Here


     */
    public void testServiceComplex() throws Exception
    {
        Object[] parameters = new Object[0];
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IPage componentPage = newPage();
        IDirect d = newDirect();
        LinkFactory lf = newLinkFactory();
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
View Full Code Here

    }

    public void testServiceNotDirect() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IComponent c = newComponent();
        Location l = newLocation();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
        trainGetParameter(cycle, ServiceConstants.CONTAINER, null);
View Full Code Here

    public void testSessionActiveAndRequired() throws Exception
    {
        Object[] parameters = new Object[0];
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IDirect d = newDirect();
        WebSession session = newWebSession(false);
        WebRequest request = newWebRequest(session);
        LinkFactory lf = newLinkFactory();
        ResponseRenderer rr = newResponseRenderer();
View Full Code Here

    }

    public void testStaleSession() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IDirect d = newDirect();
        WebRequest request = newWebRequest(null);
        Location l = newLocation();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
View Full Code Here

     */

    public IComponent createImplicitComponent(IRequestCycle cycle, IComponent container,
            String componentId, String componentType, Location location)
    {
        IPage page = container.getPage();

        _componentResolver.resolve(cycle, container.getNamespace(), componentType, location);

        INamespace componentNamespace = _componentResolver.getNamespace();
        IComponentSpecification spec = _componentResolver.getSpecification();
View Full Code Here

        ComponentConstructor cc = _componentConstructorFactory.getComponentConstructor(
                spec,
                className);

        IPage result = (IPage) cc.newInstance();

        result.setNamespace(namespace);
        result.setPageName(pageName);
        result.setPage(result);
        result.setLocale(_locale);
        result.setLocation(location);

        return result;
    }
View Full Code Here

    }

    public IPage loadPage(String name, INamespace namespace, IRequestCycle cycle,
            IComponentSpecification specification)
    {
        IPage page = null;

        _count = 0;
        _depth = 0;
        _maxDepth = 0;

        _locale = _threadLocale.getLocale();

        try
        {
            page = instantiatePage(name, namespace, specification);

            // The page is now attached to the engine and request cycle; some code
            // inside the page's finishLoad() method may require this. TAPESTRY-763

            page.attach(cycle.getEngine(), cycle);

            constructComponent(cycle, page, page, specification, namespace);

            // Walk through the complete component tree to set up the default
            // parameter values.
            _establishDefaultParameterValuesWalker.walkComponentTree(page);

            establishInheritedBindings();

            // Walk through the complete component tree to ensure that required
            // parameters are bound
            _verifyRequiredParametersWalker.walkComponentTree(page);

            // Now that the page has been properly constructed, the page
            // or any components on the page will have been registered as
            // page attach listeners.

            page.firePageAttached();
        }
        finally
        {
            _locale = null;
            _inheritedBindingQueue.clear();
View Full Code Here

    public void pageBeginRender(PageEvent event)
    {
        Inspector inspector = (Inspector) getPage();

        IPage inspectedPage = inspector.getInspectedPage();

        String pageName = inspectedPage.getPageName();

        PropertyPersistenceStrategySource source = getPropertySource();

        Collection properties = source.getAllStoredChanges(pageName);
View Full Code Here

        Throwable cause)
        throws ServletException
    {
        try
        {
            IPage exceptionPage = cycle.getPage(getExceptionPageName());

            exceptionPage.setProperty("exception", cause);

            cycle.activate(exceptionPage);

            renderResponse(cycle, output);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IPage

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.