Package org.beangle.struts2.view.component

Examples of org.beangle.struts2.view.component.Grid$Filter


    String name = get("name");
    if (StringUtils.isNotBlank(name)) {
      User user = userService.get(name);
      if (null != user) {
        put("user", user);
        return forward(new Action((Class<?>) null, "dashboard", "&user.id=" + user.getId()));
      } else {
        return null;
      }
    } else {
      return super.info();
View Full Code Here


    }
    newResources.retainAll(mngResources);
    authorityService.authorize(mao, newResources);
    authorityManager.refreshGroupAuthorities(new GrantedAuthorityBean(mao.getName()));

    Action redirect = Action.to(this).method("edit");
    redirect.param("group.id", mao.getId()).param("menuProfileId", menuProfile.getId());
    String displayFreezen = get("displayFreezen");
    if (null != displayFreezen) {
      redirect.param("displayFreezen", displayFreezen);
    }
    return redirect(redirect, "info.save.success");
  }
View Full Code Here

        avatarBase.updateAvatar(getUsername(), files[0], type);
      } else {
        return forward("upload");
      }
    }
    return redirect(new Action(MyAction.class, "info"), "info.upload.success");
  }
View Full Code Here

      } else {
        addActionError("不支持的文件类型");
        return forward("info");
      }
    }
    return redirect(new Action(UserAction.class, "info", "&user.name=" + userName), "info.save.success");
  }
View Full Code Here

   * @param clazz
   * @return
   */
  public Action build(String className) {
    Profile profile = profileService.getProfile(className);
    Action action = new Action();
    StringBuilder sb = new StringBuilder();
    // namespace
    sb.append(profile.getUriPath());
    if (Constants.SHORT_URI.equals(profile.getUriPathStyle())) {
      String simpleName = className.substring(className.lastIndexOf('.') + 1);
      sb.append(StringUtils.uncapitalize(simpleName.substring(0, simpleName.length()
          - profile.getActionSuffix().length())));
    } else if (Constants.SIMPLE_URI.equals(profile.getUriPathStyle())) {
      sb.append(profile.getInfix(className));
    } else if (Constants.SEO_URI.equals(profile.getUriPathStyle())) {
      sb.append(StrUtils.unCamel(profile.getInfix(className)));
    } else {
      throw new RuntimeException("unsupported uri style " + profile.getUriPathStyle());
    }
    action.path(sb.toString()).method(profile.getDefaultMethod()).extention(profile.getUriExtension());
    return action;
  }
View Full Code Here

  /**
   * forward to index method
   */
  public String execute() throws Exception {
    return forward(new Action((Class<?>) null, "index"));
  }
View Full Code Here

   * @param message
   * @param params
   * @return
   */
  protected String redirect(String method, String message, String params) {
    return redirect(new Action((String) null, method, params), message);
  }
View Full Code Here

  protected String redirect(String method, String message, String params) {
    return redirect(new Action((String) null, method, params), message);
  }

  protected String redirect(String method) {
    return redirect(new Action(method), null);
  }
View Full Code Here

   * @param method
   * @param message
   * @return
   */
  protected String redirect(String method, String message) {
    return redirect(new Action(method), message);
  }
View Full Code Here

      case 0:
        logger.warn("Cannot find bean definition for {}.", actionClass);
        break;
      case 1:
        Profile profile = actionBuilder.getProfileService().getProfile(actionClass.getName());
        Action action = actionBuilder.build(actionClass.getName());
        PackageConfig.Builder packageConfig = getPackageConfig(profile, packageConfigs, action,
            actionClass);
        if (createActionConfig(packageConfig, action, actionClass, beanNames[0])) {
          createCount++;
        }
View Full Code Here

TOP

Related Classes of org.beangle.struts2.view.component.Grid$Filter

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.