Package org.beangle.struts2.view.component

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


    List<Filter> keyFilters = new ArrayList<Filter>();
    if (query.hasFilter()) {
      keyFilters.add(query.getFilter());
    }
    if (lastKey != null) {
      Filter lowerBound = DatastoreHelper.makeFilter(DatastoreHelper.KEY_PROPERTY_NAME,
          PropertyFilter.Operator.GREATER_THAN_OR_EQUAL,
          DatastoreHelper.makeValue(lastKey)).build();
      keyFilters.add(lowerBound);
    }
    if (nextKey != null) {
      Filter upperBound = DatastoreHelper.makeFilter(DatastoreHelper.KEY_PROPERTY_NAME,
          PropertyFilter.Operator.LESS_THAN,
          DatastoreHelper.makeValue(nextKey)).build();
      keyFilters.add(upperBound);
    }
    return Query.newBuilder(query).setFilter(makeFilter(keyFilters)).build();
View Full Code Here


    entityQuery.limit(getPageLimit()).orderBy(get("orderBy"));
    return entityQuery;
  }

  protected PropertyExtractor getPropertyExtractor() {
    return new GroupPropertyExtractor(new ActionTextResource(this));
  }
View Full Code Here

    userQuery.orderBy(get(Order.ORDER_STR)).limit(getPageLimit());
    return userQuery;
  }

  protected PropertyExtractor getPropertyExtractor() {
    return new UserPropertyExtractor(new ActionTextResource(this));
  }
View Full Code Here

  private static final long serialVersionUID = 8451445989084058881L;

  @Override
  public String intercept(ActionInvocation invocation) throws Exception {
    String result = invocation.invoke();
    Flash flash = (Flash) invocation.getInvocationContext().getSession().get("flash");
    if (null != flash) flash.nextToNow();
    return result;
  }
View Full Code Here

  protected void addFlashErrorNow(String msgKey, Object... args) {
    getFlash().addErrorNow(getTextInternal(msgKey, args));
  }

  protected Flash getFlash() {
    Flash flash = (Flash) ActionContext.getContext().getSession().get("flash");
    if (null == flash) {
      flash = new Flash();
      ActionContext.getContext().getSession().put("flash", flash);
    }
    return flash;
  }
View Full Code Here

  /**
   * 将flash中的消息转移到actionmessage<br>
   * 不要将flash和message混合使用。
   */
  public Collection<String> getActionMessages() {
    Flash flash = getFlash();
    @SuppressWarnings("unchecked")
    List<String> messages = (List<String>) flash.get(Flash.MESSAGES);
    if (null != messages) {
      for (String msg : messages) {
        addActionMessage(msg);
      }
      messages.clear();
View Full Code Here

  /**
   * 将flash中的错误转移到actionerror<br>
   * 不要将flash和error混合使用。
   */
  public Collection<String> getActionErrors() {
    Flash flash = getFlash();
    @SuppressWarnings("unchecked")
    List<String> errors = (List<String>) flash.get(Flash.ERRORS);
    if (null != errors) {
      for (String msg : errors) {
        addActionError(msg);
      }
      errors.clear();
View Full Code Here

  protected void addFlashMessage(String msgKey) {
    getFlash().addMessage(getText(msgKey));
  }

  protected Flash getFlash() {
    Flash flash = (Flash) ActionContext.getContext().getSession().get("flash");
    if (null == flash) {
      flash = new Flash();
      ActionContext.getContext().getSession().put("flash", flash);
    }
    return flash;
  }
View Full Code Here

  /**
   * 将flash中的消息转移到actionmessage<br>
   * 不要将flash和message混合使用。
   */
  public Collection<String> getActionMessages() {
    Flash flash = getFlash();
    @SuppressWarnings("unchecked")
    List<String> messages = (List<String>) flash.get(Flash.MESSAGES);
    if (null != messages) {
      for (String msg : messages) {
        addActionMessage(msg);
      }
      messages.clear();
View Full Code Here

  /**
   * 将flash中的错误转移到actionerror<br>
   * 不要将flash和error混合使用。
   */
  public Collection<String> getActionErrors() {
    Flash flash = getFlash();
    @SuppressWarnings("unchecked")
    List<String> errors = (List<String>) flash.get(Flash.ERRORS);
    if (null != errors) {
      for (String msg : errors) {
        addActionError(msg);
      }
      errors.clear();
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.