Examples of IPage


Examples of org.apache.tapestry.IPage

     * @param cycle the RequestCycle to use to locate the component
     * @return IComponent a component that has been initialized for the given RequestCycle
     */
    public IComponent findComponent(IRequestCycle cycle)
    {
        IPage objPage = cycle.getPage(_pageName);
        return objPage.getNestedComponent(_idPath);
    }
View Full Code Here

Examples of org.apache.tapestry.IPage

     *
     **/

    public void performCallback(IRequestCycle cycle)
    {
        IPage page = cycle.getPage(_pageName);
        IComponent component = page.getNestedComponent(_componentIdPath);
        IDirect direct = null;

        try
        {
            direct = (IDirect) component;
View Full Code Here

Examples of org.apache.tapestry.IPage

        {
            startTime = System.currentTimeMillis();

            writeDocType(writer, cycle);

            IPage page = getPage();

            writer.comment("Application: " + page.getEngine().getSpecification().getName());

            writer.comment("Page: " + page.getPageName());
            writer.comment("Generated: " + new Date());

            writer.begin("html");
            renderInformalParameters(writer, cycle);
            writer.println();
View Full Code Here

Examples of org.apache.tapestry.IPage

        ILocation location = getLocation();

        try
        {
            IPage page = cycle.getPage();

            bsf.declareBean("component", _component, _component.getClass());
            bsf.declareBean("page", page, page.getClass());
            bsf.declareBean("cycle", cycle, cycle.getClass());

            bsf.exec(
                _language,
                location.getResourceLocation().toString(),
View Full Code Here

Examples of org.apache.tapestry.IPage

        // the response page will render.
        // In 1.0.6, we start to record *both* the render page
        // and the component page (if different), as the extended
        // context.

        IPage renderPage = cycle.getPage();
        IPage componentPage = component.getPage();

        boolean complex = renderPage != componentPage;

        String[] context = complex ? new String[4] : new String[3];

        int i = 0;

        String stateful = cycle.getEngine().isStateful() ? STATEFUL_ON : STATEFUL_OFF;

        context[i++] = stateful;

        if (complex)
            context[i++] = renderPage.getPageName();

        context[i++] = componentPage.getPageName();
        context[i++] = component.getIdPath();

        return constructLink(cycle, Tapestry.DIRECT_SERVICE, context, parameters, true);
    }
View Full Code Here

Examples of org.apache.tapestry.IPage

        throws ServletException, IOException
    {
        IDirect direct;
        int count = 0;
        String componentPageName;
        IPage componentPage;
        RequestContext requestContext = cycle.getRequestContext();
        String[] serviceContext = getServiceContext(requestContext);

        if (serviceContext != null)
            count = serviceContext.length;

        if (count != 3 && count != 4)
            throw new ApplicationRuntimeException(
                Tapestry.getMessage("DirectService.context-parameters"));

        boolean complex = count == 4;

        int i = 0;
        String stateful = serviceContext[i++];
        String pageName = serviceContext[i++];

        if (complex)
            componentPageName = serviceContext[i++];
        else
            componentPageName = pageName;

        String componentPath = serviceContext[i++];

        IPage page = cycle.getPage(pageName);

        cycle.activate(page);

        if (complex)
            componentPage = cycle.getPage(componentPageName);
View Full Code Here

Examples of org.apache.tapestry.IPage

        if (parameters == null || parameters.length != 1)
            throw new IllegalArgumentException(
                Tapestry.format("service-single-parameter", Tapestry.ACTION_SERVICE));

        String stateful = cycle.getEngine().isStateful() ? STATEFUL_ON : STATEFUL_OFF;
        IPage componentPage = component.getPage();
        IPage responsePage = cycle.getPage();

        boolean complex = (componentPage != responsePage);

        String[] serviceContext = new String[complex ? 5 : 4];

        int i = 0;

        serviceContext[i++] = stateful;
        serviceContext[i++] = responsePage.getPageName();
        serviceContext[i++] = (String) parameters[0];

        // Because of Block/InsertBlock, the component may not be on
        // the same page as the response page and we need to make
        // allowances for this.
View Full Code Here

Examples of org.apache.tapestry.IPage

        else
            componentPageName = pageName;

        String targetIdPath = serviceContext[i++];

        IPage page = cycle.getPage(pageName);

    // Setup the page for the rewind, then do the rewind.

    cycle.activate(page);
   
        IPage componentPage = cycle.getPage(componentPageName);
        IComponent component = componentPage.getNestedComponent(targetIdPath);

        try
        {
            action = (IAction) component;
        }
View Full Code Here

Examples of org.apache.tapestry.IPage

        return (IDirect) newMock(IDirect.class);
    }

    public void testGetLinkOnSamePage()
    {
        IPage page = newPage("ThePage");
        IDirect c = newDirect();
        IRequestCycle cycle = newCycle();
        WebRequest request = newWebRequest(false, null);
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();
View Full Code Here

Examples of org.apache.tapestry.IPage

        verifyControls();
    }

    public void testGetLinkOnSamePageForPost()
    {
        IPage page = newPage("ThePage");
        IDirect c = newDirect();
        IRequestCycle cycle = newCycle();
        WebRequest request = newWebRequest(false, null);
        LinkFactory lf = newLinkFactory();
        ILink link = newLink();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.