14151617181920212223
public ExpensiveUpdates(WOContext context) { super(context); _comments = new NSMutableArray<Comment>(); for (int i = 0; i < 5; i++) { Comment c = new Comment(); c.setText(ERXLoremIpsumGenerator.sentences(1)); _comments.addObject(c); } }
3435363738394041424344
public Object cacheKey() { return Integer.valueOf(_comments.count()); } public WOActionResults addComment() { Comment comment = new Comment(); comment.setText(_newComment); _newComment = null; _comments.addObject(comment); return null; }