Display the main user-facing view of the portlet.

@param request
@return
975643
@RenderMapping
    public String getView(RenderRequest req, Model model) {

        final String[] images = imageSetSelectionStrategy.getImageSet(req);
        model.addAttribute("images", images);

        final String[] thumbnailImages = imageSetSelectionStrategy.getImageThumbnailSet(req);
        model.addAttribute("thumbnailImages", thumbnailImages);

        final String[] imageCaptions = imageSetSelectionStrategy.getImageCaptions(req);
        model.addAttribute("imageCaptions", imageCaptions);

        final String preferredBackgroundImage = imageSetSelectionStrategy.getSelectedImage(req);
        model.addAttribute("backgroundImage", preferredBackgroundImage);

        final String backgroundContainerSelector =
                imageSetSelectionStrategy.getBackgroundContainerSelector(req);
        model.addAttribute("backgroundContainerSelector", backgroundContainerSelector);

        final PortletPreferences prefs = req.getPreferences();
        model.addAttribute("applyOpacityTo", prefs.getValue("applyOpacityTo", null));
        model.addAttribute("opacityCssValue", prefs.getValue("opacityCssValue", "1.0"));

        return "/jsp/BackgroundPreference/viewBackgroundPreference";
    }
860514
public static ReadRequest checkRequest(final HttpServletRequest request,
			final ReadResponse readResponse) {
		final Node user = checkUserIdentifier(request, readResponse);
		if (user != null) {
			final Node poster = checkPosterIdentifier(request, readResponse);
			if (poster != null) {
				final int numItems = checkNumItems(request, readResponse);
				if (numItems != 0) {
					final Boolean ownUpdates = checkOwnUpdates(request,
							readResponse);
					if (ownUpdates != null) {
						return new ReadRequest(user, poster, numItems,
								ownUpdates);
					}
				}
			}
		}

		return null;
	}
670254
@Override
	public void handleRequest(final Request request) {
		super.handleRequest(request);

		WComponent visibleDialog = getVisible();

		if (visibleDialog != null) {
			visibleDialog.serviceRequest(request);
		}
	}
917892
public static String getUrl(final HttpServletRequest request) {
    try {
      final StringBuffer sb = request.getRequestURL();
      if (sb != null) {
        return sb.toString();
      }

      // Presumably portlet - see what happens with uri
      return request.getRequestURI();
    } catch (Throwable t) {
      return "BogusURL.this.is.probably.a.portal";
    }
  }
284678
public static ContainerWrapper getContainer(HttpServletRequest request) throws Exception {
		ContainerFinderImp scf = new ContainerFinderImp();
		ServletContext sc = request.getSession().getServletContext();
		return scf.findContainer(new ServletContextWrapper(sc));
	}
627695
public static boolean isHttpPostRequest(HttpServletRequest request) {
        boolean isSane = isSaneRequest(request);
        boolean isPost = isSane && request.getMethod().equals(HttpMethod.POST.toString());
        return isSane && isPost;
    }
648621
public boolean actionInternalUse(HttpServletRequest request) {

        String internal = request.getParameter(PARAM_INTERNAL);

        CmsResource resource;
        boolean internalValue = false;
        if (internal != null) {
            internalValue = true;
        }
        try {
            resource = getCms().readResource(getParamResource(), CmsResourceFilter.ALL);

            int flags = resource.getFlags();

            if (internalValue) {
                flags |= CmsResource.FLAG_INTERNAL;
            } else {
                flags &= ~CmsResource.FLAG_INTERNAL;
            }

            getCms().lockResource(getParamResource());
            getCms().chflags(getParamResource(), flags);

        } catch (CmsException e) {
            m_errorMessages.add(key(Messages.ERR_MODIFY_INTERNAL_FLAG_0));
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage(), e);
            }
            return false;
        }
        return true;
    }
270806
public void renderView(HttpServerRequest request, JsonObject params) {
		renderView(request, params, null, null, 200);
	}
592739
public GetStatUvResponse getStatUv(GetStatUvRequest request) {
        InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, STAT, "uv");
        
        if (request.getStartTime() != null) {
            internalRequest.addParameter("startTime", DateUtils.formatAlternateIso8601Date(request.getStartTime()));
        }
        
        if (request.getEndTime() != null) {
            internalRequest.addParameter("endTime", DateUtils.formatAlternateIso8601Date(request.getEndTime()));
        }
        
        if (request.getDomain() != null) {
            internalRequest.addParameter("domain", request.getDomain());
        }
        
        if (request.getPeriod() != null) {
            internalRequest.addParameter("period", String.valueOf(request.getPeriod()));
        }
        
        return this.invokeHttpClient(internalRequest, GetStatUvResponse.class);
    }
46842
def mainview(request, **criterias):
	''
	view_data = initview(request)
	wrap = lambda func: ft.partial(func, _view_data=view_data, **criterias)
	return condition(
			etag_func=wrap(cache_etag),
			last_modified_func=wrap(cache_last_modified) )\
		(_mainview)(request, view_data, **criterias)
992893
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);
		WComponent content = getContent();

		if (content != null) {
			switch (getMode()) {
				case EAGER: {
					// Will always be visible
					content.setVisible(true);
					AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
					break;
				}
				case LAZY: {
					content.setVisible(isOpen());
					if (!isOpen()) {
						AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
					}

					break;
				}
				case DYNAMIC: {
					content.setVisible(isOpen());
					AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
					break;
				}
				case SERVER: {
					content.setVisible(isOpen());
					break;
				}
				case CLIENT: {
					// Will always be visible
					content.setVisible(true);
					break;
				}

				default:
					// do nothing.
					break;
			}
		}
	}
817716
protected EvaluationContext getEvaluationContext(WebRequest request) {
        final HttpServletRequest httpRequest =
                this.portalRequestUtils.getOriginalPortalRequest(request);
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(httpRequest);
        final IPerson person = userInstance.getPerson();

        final SpELEnvironmentRoot root = new SpELEnvironmentRoot(request, person);
        final StandardEvaluationContext context = new StandardEvaluationContext(root);
        context.setBeanResolver(this.beanResolver);
        return context;
    }
239755
public ImageHelper load(ImageView v, Request request) {
        loadInternal(v, request, listener, null);

        return this;
    }
694509
public void showMainForm(String userName) {
        align();
        changeUserName(userName);

        mainForm.addMember(header); 
        mainForm.addMember(repositoryHeader);
        mainForm.addMember(viewPort);
        mainForm.addMember(strut(30));
        mainForm.addMember(footer);
           
        setLayoutWidth(LAYOUT_WIDTH);     
        loadData();
        
        //init HTML history
        htmlHistory.addValueChangeHandler(this);
        mainForm.draw();        
    }
46206
public GetPresetResponse getPreset(GetPresetRequest request) {
        checkNotNull(request, "The parameter request should NOT be null.");
        checkStringNotEmpty(request.getName(), "The parameter name should NOT be null or empty string.");
        InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_PRESET,
                request.getName());
        return invokeHttpClient(internalRequest, GetPresetResponse.class);
    }
469603
@SuppressWarnings("unchecked")
	static public Map<String, Object> getParameters(ServletRequest request){
    	Map<String, Object> params = (Map<String, Object>) request.getAttribute(TEMPLATE_PARAMETER_MAP);
    	if (params == null){							// no need to check thread-safe?
    		params = new HashMap<String, Object>();
    		request.setAttribute(TEMPLATE_PARAMETER_MAP, params);
    	}
    	return params;
    }
275667
public static String defaultHtml(HttpServletRequest request) {

        CmsObject cms = CmsFlexController.getController(request).getCmsObject();

        // We only want the big red warning in Offline mode
        if (cms.getRequestContext().getCurrentProject().isOnlineProject()) {
            return "<div><!--Dynamic function not configured--></div>";
        } else {
            Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms);
            String message = Messages.get().getBundle(locale).key(Messages.GUI_FUNCTION_DEFAULT_HTML_0);
            return "<div style=\"border: 2px solid red; padding: 10px;\">" + message + "</div>";
        }
    }