Package er.ajax.example2.components

Source Code of er.ajax.example2.components.AjaxNotifications

package er.ajax.example2.components;

import com.webobjects.appserver.WOActionResults;
import com.webobjects.appserver.WOContext;
import com.webobjects.foundation.NSTimestamp;

public class AjaxNotifications extends AjaxWOWODCPage {
  public AjaxNotifications(WOContext context) {
    super(context);
  }

  @Override
  protected boolean useDefaultComponentCSS() {
    return true;
  }

  public WOActionResults generateNotification() {
    session().addNotification("This is a notification from an Ajax request on " + new NSTimestamp());
    return null;
  }

  public WOActionResults generateException() {
    if (true) {
      throw new IllegalArgumentException("This is an exception that was thrown during an Ajax request.");
    }
    return null;
  }

  public WOActionResults generateSessionTimeout() {
    session().terminate();
    return null;
  }
}
TOP

Related Classes of er.ajax.example2.components.AjaxNotifications

TOP
Copyright © 2018 www.massapi.com. 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.