Package org.beangle.struts2.convention.config

Examples of org.beangle.struts2.convention.config.SmartActionConfigBuilderTest$MyPackageConfig


    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

public class FlashInterceptor extends AbstractInterceptor {

  @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

TOP

Related Classes of org.beangle.struts2.convention.config.SmartActionConfigBuilderTest$MyPackageConfig

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.