Package javax.portlet

Examples of javax.portlet.PortletResponse


        {
            key = key + ":" + view;
        }
        if (uniqueIds != null)
        {
            PortletResponse response = (PortletResponse)context.getExternalContext().getResponse();
            if (!(response instanceof RenderResponse))
            {
                log.error("Cant encode action response");
            }
            else
View Full Code Here


    if (LOG.isDebugEnabled()) LOG.debug("Setting event render parameter: " + finalLocation);
    if (finalLocation.indexOf('?') != -1) {
      convertQueryParamsToRenderParams(finalLocation.substring(finalLocation.indexOf('?') + 1));
      finalLocation = finalLocation.substring(0, finalLocation.indexOf('?'));
    }
        PortletResponse response = PortletActionContext.getResponse();
    if (finalLocation.endsWith(".action")) {
      // View is rendered with a view action...luckily...
      finalLocation = finalLocation.substring(0, finalLocation.lastIndexOf("."));
      resultHelper.setRenderParameter(response, ACTION_PARAM, finalLocation);
    } else {
View Full Code Here

     */
    protected void executeMimeResult(final String finalLocation) throws PortletException, IOException {
        if (LOG.isDebugEnabled()) LOG.debug("Executing mime result");
        PortletContext ctx = PortletActionContext.getPortletContext();
        PortletRequest req = PortletActionContext.getRequest();
        PortletResponse res = PortletActionContext.getResponse();

    if (StringUtils.isNotEmpty(title) && res instanceof RenderResponse) {
        ((RenderResponse)res).setTitle(title);
    }
        if (LOG.isDebugEnabled()) LOG.debug("Location: " + finalLocation);
View Full Code Here

        portletResourceUrl.setResourceID(VaadinPortlet.RESOURCE_URL_ID);
        return portletResourceUrl.toString();
    }

    private RenderResponse getRenderResponse(BootstrapContext context) {
        PortletResponse response = ((VaadinPortletResponse) context
                .getResponse()).getPortletResponse();

        RenderResponse renderResponse = (RenderResponse) response;
        return renderResponse;
    }
View Full Code Here

        /*
         * This dummy page is used by action responses to redirect to, in order
         * to prevent the boot strap code from being rendered into strange
         * places such as iframes.
         */
        PortletResponse portletResponse = ((VaadinPortletResponse) response)
                .getPortletResponse();
        if (portletResponse instanceof ResourceResponse) {
            ((ResourceResponse) portletResponse).setContentType("text/html");
        }

View Full Code Here

     * @return action URL or null if called outside a MimeRequest (outside a
     *         UIDL request or similar)
     */
    public PortletURL generateActionURL(String action) {
        PortletURL url = null;
        PortletResponse response = getCurrentResponse();
        if (response instanceof MimeResponse) {
            url = ((MimeResponse) response).createActionURL();
            url.setParameter("javax.portlet.action", action);
        } else {
            return null;
View Full Code Here

     *            event value object that is Serializable and, if appropriate,
     *            has a valid JAXB annotation
     */
    public void sendPortletEvent(UI uI, QName name, Serializable value)
            throws IllegalStateException {
        PortletResponse response = getCurrentResponse();
        if (response instanceof MimeResponse) {
            String actionKey = "" + System.currentTimeMillis();
            while (eventActionDestinationMap.containsKey(actionKey)) {
                actionKey = actionKey + ".";
            }
View Full Code Here

     * @param value
     *            parameter value
     */
    public void setSharedRenderParameter(UI uI, String name, String value)
            throws IllegalStateException {
        PortletResponse response = getCurrentResponse();
        if (response instanceof MimeResponse) {
            String actionKey = "" + System.currentTimeMillis();
            while (sharedParameterActionNameMap.containsKey(actionKey)) {
                actionKey = actionKey + ".";
            }
View Full Code Here

     *             if the portlet mode is not allowed for some reason
     *             (configuration, permissions etc.)
     */
    public void setPortletMode(UI uI, PortletMode portletMode)
            throws IllegalStateException, PortletModeException {
        PortletResponse response = getCurrentResponse();
        if (response instanceof MimeResponse) {
            PortletURL url = ((MimeResponse) response).createRenderURL();
            url.setPortletMode(portletMode);
            throw new RuntimeException("UI.open has not yet been implemented");
            // UI.open(new ExternalResource(url.toString()));
View Full Code Here

            VaadinRequest request, VaadinResponse response) throws IOException {

        VaadinPortletSession sess = (VaadinPortletSession) session;
        PortletRequest portletRequest = ((VaadinPortletRequest) request)
                .getPortletRequest();
        PortletResponse portletResponse = ((VaadinPortletResponse) response)
                .getPortletResponse();

        // Finds the right UI
        UI uI = null;
        if (ServletPortletHelper.isUIDLRequest(request)) {
View Full Code Here

TOP

Related Classes of javax.portlet.PortletResponse

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.