Package org.apache.tapestry

Examples of org.apache.tapestry.ContentType


    {
        ComponentResources pageResources = page.getRootComponent().getComponentResources();

        String contentTypeString = _metaDataLocator.findMeta(TapestryConstants.RESPONSE_CONTENT_TYPE, pageResources,
                                                             String.class);
        ContentType contentType = new ContentType(contentTypeString);

        // Make sure thre's always a charset specified.

        String encoding = contentType.getParameter(InternalConstants.CHARSET_CONTENT_TYPE_PARAMETER);

        if (encoding == null)
        {
            encoding = _metaDataLocator
                    .findMeta(TapestryConstants.RESPONSE_ENCODING, pageResources, String.class);
            contentType.setParameter(InternalConstants.CHARSET_CONTENT_TYPE_PARAMETER, encoding);
        }

        return contentType;
    }
View Full Code Here


        // If we end up doing a partial render, the page render queue service needs to know the
        // page that will be rendered (for logging purposes, if nothing else).

        _queue.setRenderingPage(activePage);

        ContentType contentType = _pageContentTypeAnalyzer.findContentType(activePage);

        _request.setAttribute(InternalConstants.CONTENT_TYPE_ATTRIBUTE_NAME, contentType);

        Page containerPage = _cache.get(parameters.getContainingPageName());
View Full Code Here

            }
        };

        _resources.triggerEvent("providecompletions", new Object[] { input }, callback);

        ContentType contentType = _responseRenderer.findContentType(this);

        MarkupWriter writer = _factory.newMarkupWriter(contentType);

        generateResponseMarkup(writer, matchesHolder.get());

        return new TextStreamResponse(contentType.getMimeType(), writer.toString());
    }
View Full Code Here

        // If we end up doing a partial render, the page render queue service needs to know the
        // page that will be rendered (for logging purposes, if nothing else).

        _queue.initializeForCompletePage(activePage);

        ContentType contentType = _pageContentTypeAnalyzer.findContentType(activePage);

        _request.setAttribute(InternalConstants.CONTENT_TYPE_ATTRIBUTE_NAME, contentType);

        Page containerPage = _cache.get(parameters.getContainingPageName());
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ContentType

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.