//
//  LOVViewController.h
//  iEAM
//
//  Created by Weikang Ding on 10-4-9.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LOVData.h"
#import "Utility.h"
#import "LOVGridWebService.h"
#import "EAMBasePopoverViewController.h"

@protocol LOVViewControllerDelegate <NSObject>
@optional
- (void)dismissLOV;
- (void)selectedLOVValue:(NSString *)lovName andValues:(NSArray *)data;
@end


@interface LOVViewController : EAMBasePopoverViewController <UITableViewDelegate,UITableViewDataSource, LOVGridWebServiceDelegate, UISearchBarDelegate>{

	LOVGridWebService *lovGridWebService;
	
    NSArray* fieldList;
	NSMutableArray *dataList;
	BOOL disconnected;
	BOOL moreDataOnServer;
	
	NSString *searchValue;
}

@property (nonatomic,retain) LOVData *lovData;
@property (assign) id<LOVViewControllerDelegate> delegate;
@property (nonatomic,retain) NSString *searchValue;

@property (nonatomic,assign) BOOL showSearchBox;
@property (nonatomic,assign) BOOL showClearButton;
@property (nonatomic,assign) BOOL showDoneButton;
@property (nonatomic,assign) BOOL allowMultipleSelection;
@property (nonatomic,assign) BOOL showConnectedModeData;
@property (nonatomic,assign) BOOL showContacts;

//- (void)woListDataRefreshed:(NSArray *)data;
-(void)downloadLOVDataFrom:(NSInteger)position;
-(void)searchRecord:(NSString *)seachValue;
-(IBAction)searchClicked:(id)sender;
	
@end
