Examples of UserPortraitResource


Examples of com.liferay.faces.demos.resource.UserPortraitResource

      ExternalContext externalContext = facesContext.getExternalContext();
      PortletRequest portletRequest = (PortletRequest) externalContext.getRequest();
      ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
      String portalURL = themeDisplay.getPortalURL();
      String imagePath = portalURL + "/image";
      UserPortraitResource userPortraitResource = new UserPortraitResource(imagePath, selectedUser,
          uploadedFileId);
      String requestPath = userPortraitResource.getRequestPath();
      Application application = facesContext.getApplication();
      ViewHandler viewHandler = application.getViewHandler();
      String resourceURL = viewHandler.getResourceURL(facesContext, requestPath);
      selectedUserPortraitURL = externalContext.encodeResourceURL(resourceURL);
    }
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.