Package

Source Code of HighlightExample

import com.webobjects.appserver.WOActionResults;
import com.webobjects.appserver.WOComponent;
import com.webobjects.appserver.WOContext;
import com.webobjects.foundation.NSArray;
import com.webobjects.foundation.NSMutableArray;

import er.ajax.AjaxHighlight;
import er.ajax.example.Comment;
import er.ajax.example.ExampleDataFactory;

public class HighlightExample extends WOComponent {
  private NSMutableArray<Comment> _comments;
  private Comment _comment;
  public Comment _repetitionComment;

  public HighlightExample(WOContext context) {
    super(context);
    _comments = ExampleDataFactory.comments(4);
  }

  public NSArray comments() {
    return _comments;
  }

  public Comment comment() {
    if (_comment == null) {
      _comment = new Comment();
    }
    return _comment;
  }

  public WOActionResults save() {
    AjaxHighlight.highlight(_comment);
    _comments.addObject(_comment);
    _comment = null;
    return null;
  }
}
TOP

Related Classes of HighlightExample

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.