doc
 All Classes Functions Variables Properties
Public Member Functions | Protected Attributes | Properties
EMCategoryController Class Reference

#import <EMCategoryController.h>

Inherits UITableViewController, and <EMPageableDataSourceDelegate>.

List of all members.

Public Member Functions

(id) - initWithResultsListController:categoryFacet:otherFacetOptions:showViewAll:

Protected Attributes

NSString * _categoryFacetName
NSArray * _facetOptions
BOOL _viewAll
EMSearchQueryDataSource_dataSource
Class _searchQueryInfiniteScrollController
BOOL _hierarchical
TTView * _loadingOverlay

Properties

EMSearchQueryDataSourcedataSource
BOOL hierarchical

Detailed Description

This controller might get used to provide a very basic category browse through a hiearachical dimension without using Page Builder. We kept it in the core library for the case where someone is not using Page Builder.


Member Function Documentation

- (id) initWithResultsListController: (Class)  searchQueryInfiniteScrollController
categoryFacet: (NSString *)  categoryFacetName
otherFacetOptions: (NSArray *)  facetOptions
showViewAll: (BOOL)  viewAll 
Parameters:
searchQueryInfiniteScrollController- this controller will be created calling the single init method and then push this onto the navigation stack either when the "View All" or one of the facetOptions values are selected, or once the user reaches a leaf node in the categoryFacetName dimension
categoryFacetName- the name of a dimension to use for category browse
facetOptions- these options will show up above the dimension values of the categoryFacetName, for instance "On Sale", or "New", or "Best Buys". This is an NSArray of NSDictionary objects of the form {name: 'On Sale', value: EMFacetValueSelection}. When the table view cell is selected, the specified EMFacetValueSelection is applied along with the current dimension value of the categoryFacetName
showViewAll- if this is specified as YES, then a "View All" table cell will show up at the bottom below all the other dimension values. Selecting this option applies only the current level of the category hierarchy

Property Documentation

- (BOOL) hierarchical [read, write, assign]

This controller checks to see if a dimension values is a leaf node by selecting that value and querying for more dimension values. If there are no more dimension values, it pushes an instance of the searchQueryInfinteScrollController onto the stack. If a dimension is multi-or, dimesion values will always come back, so this approach does not work. Setting hierarchical to false will cause this controller to always push an instance of searchQueryInfinteScrollController onto the stack without checking for more values.


The documentation for this class was generated from the following files: