예제 #1
0
  private String createURL(
      boolean ajax,
      UIComponent targetComponent,
      String action,
      String confirm,
      String targetBeanId,
      Parameter[] params) {
    url.reset();

    //
    url.setAjax(ajax);
    url.setConfirm(confirm);
    url.setResource(targetComponent);

    //
    url.setAction(action);
    url.setQueryParameterValue(UIComponent.OBJECTID, targetBeanId);

    //
    if (params != null) {
      for (Parameter param : params) {
        url.setQueryParameterValue(param.getName(), param.getValue());
      }
    }

    //
    if (removeLocale) {
      url.setLocale(null);
    } else if (locale != null) {
      url.setLocale(locale);
    }

    //
    return url.toString();
  }
예제 #2
0
  public PortalURLBuilder(PortalRequestContext ctx, ComponentURL url) {
    String path = ctx.getNodePath();
    url.setPath(path);

    //
    this.url = url;
  }