Sha256: ebcf9d7fe0e733ce7fef0079adb41a0d26c76f8b98c71a128f773ccc2a0c1e9e
Contents?: true
Size: 1.63 KB
Versions: 28
Compression:
Stored size: 1.63 KB
Contents
// // <%= @class_name %>FormMediator.m // <%= @project_name %> // // Created by <%= @developer.capitalize %> on <%= @created_on %> // Copyright(c) <%= Time.now.year %>, All rights reserved. // #import "<%= @class_name %>FormMediator.h" @implementation <%= @class_name %>FormMediator +(NSString *)NAME { return @"<%= @class_name %>FormMediator"; } -(<%= @class_name %>Form *)viewComponent { return viewComponent; } -(void)initializeMediator { self.mediatorName = [<%= @class_name %>FormMediator NAME]; } -(void)onRegister { [self.viewComponent setDelegate:self]; } -(NSArray *)listNotificationInterests { return [NSArray arrayWithObjects:ShowEdit<%= @class_name %>, ShowNew<%= @class_name %>, nil]; } -(void)create<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO { [self sendNotification:Create<%= @class_name %> body:<%= @project_name %>VO]; } -(void)update<%= @class_name %>Selected:(<%= @class_name %>VO *)<%= @project_name %>VO { [self sendNotification:Update<%= @class_name %> body:<%= @project_name %>VO]; } -(void)handleNotification:(id<INotification>)notification { [self.viewComponent setView:nil]; if ([[notification name] isEqualToString:ShowEdit<%= @class_name %>]) { [self.viewComponent set<%= @class_name %>VO:[notification body]]; [self.viewComponent setMode:EDIT]; } else if ([[notification name] isEqualToString:ShowNew<%= @class_name %>]) { [self.viewComponent set<%= @class_name %>VO:[[[<%= @class_name %>VO alloc] init] autorelease]]; [self.viewComponent setMode:NEW]; } [self sendNotification:Show<%= @class_name %>Form body:self.viewComponent]; } -(void)dealloc { [super dealloc]; } @end
Version data entries
28 entries across 28 versions & 1 rubygems