Package org.jboss.portletbridge.context

Examples of org.jboss.portletbridge.context.PortalActionURL


      if (null != ajaxContext && null != windowState) {
        Map commonAjaxParameters = ajaxContext.getCurrentInstance(
            context).getCommonAjaxParameters();

        PortalActionURL pal = windowState.getPortalActionURL();
        if (null != pal) {
          pal.setParameter(AbstractExternalContext.VIEW_ID_PARAMETER,
              context.getViewRoot().getViewId());
        }
        commonAjaxParameters.put(PortletStateHolder.STATE_ID_PARAMETER,
            bridgeContext.getStateId().toString());
        commonAjaxParameters.put(
View Full Code Here


    StateId stateId = null;
    if(null != session){
      String modeViewId = (String) session.getAttribute(Bridge.VIEWID_HISTORY+"."+portletModeName);
      if(null != modeViewId){
        try {
          PortalActionURL viewUrl = new PortalActionURL(modeViewId);
          String stateIdParameter = viewUrl.getParameter(STATE_ID_PARAMETER);
          if(null != stateIdParameter){
            stateId = new StateId(stateIdParameter);
          }
        } catch (MalformedURLException e) {
          // Ignore.
View Full Code Here

  public UIViewRoot createView(FacesContext facesContext, String viewId) {
    boolean portletRequest = FacesUtil.isPortletRequest(facesContext);
    if (portletRequest) {
      viewId = evaluateUrl(facesContext, viewId);
      try {
        PortalActionURL viewIdUrl = new PortalActionURL(viewId);
        viewId = viewIdUrl.getPath();
        Map<String, String[]> viewIdParameters = viewIdUrl
            .getParameters();
        facesContext.getExternalContext().getRequestMap().put(
            AjaxPortletBridge.VIEW_ID_PARAMETERS, viewIdParameters);
      } catch (MalformedURLException e) {
        // Do nothing, it is ordinary view Id
View Full Code Here

  public String getUri(InternetResource resource, FacesContext context,
      Object storeData) {
    String uri = super.getUri(resource, context, storeData);
    if(isPortletRequest(context) && resource.requireFacesContext()){
      try {
        PortalActionURL portalUrl = new PortalActionURL(uri);
        AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
        Map<String, Object> ajaxParameters = ajaxContext.getCommonAjaxParameters();
        if(null != ajaxParameters && ajaxParameters.size()>0){
          for (Entry<String,Object> entry : ajaxParameters.entrySet()) {
            portalUrl.addParameter(entry.getKey(), String.valueOf(entry.getValue()));
          }
          uri = portalUrl.toString();
        }
      } catch (MalformedURLException e) {
        throw new FacesException("Bad resource URL ",e);
      }
    }
View Full Code Here

TOP

Related Classes of org.jboss.portletbridge.context.PortalActionURL

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.