public class StandardPaginationWidgetManager extends StandardWidgetManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String | BUTTON_TYPE_FIND_FIRST
Find first page button type.
|
static java.lang.String | BUTTON_TYPE_FIND_LAST
Find last page button property name.
|
static java.lang.String | BUTTON_TYPE_FIND_NEXT
Find next page button property name.
|
static java.lang.String | BUTTON_TYPE_FIND_PAGE
Jump to page button property name.
|
static java.lang.String | BUTTON_TYPE_FIND_PREVIOUS
Find previous page button property name.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.String | EMPTY_STRING
constant used for empty string.
|
static java.lang.String | FIELD_TYPE_PAGE_NUMBER
Jump to page text field property name.
|
static java.lang.String | FIND_MODE_INITIAL_SEARCH
Initial search find mode.
|
static java.lang.String | FIND_MODE_INITIAL_SEARCH_COMPLETE
Initial search complete find mode.
|
static java.lang.String | FIND_MODE_SEARCH_COMPLETE
Search complete find mode.
|
static java.lang.String | LABEL_TYPE_LISTING
Records Listing label property name.
|
static java.lang.String | LABEL_TYPE_PAGE
Page Listing label property name.
|
static java.lang.String | MANAGER_TYPE_PAGINATION
Standard pagination manager type.
|
static java.lang.String | PROP_BUTTON_TYPE
Button type property name.
|
static java.lang.String | PROP_CURRENT_SEARCH_RESULTS
Total current search results property name.
|
static java.lang.String | PROP_EDITOR
Editor property.
|
static java.lang.String | PROP_FIELD_TYPE
Field type property name.
|
static java.lang.String | PROP_FIND_MODE
Find mode property name.
|
static java.lang.String | PROP_FIND_MORE_RESULTS
Property name for find more search results flag.
|
static java.lang.String | PROP_IS_CACHE_ENABLED
Constant for the cache enabled property name.
|
static java.lang.String | PROP_IS_PAGE_DIRTY
Constant for the page dirty property name.
|
static java.lang.String | PROP_LABEL_TYPE
Label type property name.
|
static java.lang.String | PROP_LOCAL_CACHE
Local cache property.
|
static java.lang.String | PROP_MAX_THRESHOLD
Max threshold property name.
|
static java.lang.String | PROP_OVERRIDE_CLIENT_PAGE_SIZE
Property name for override client page size flag.
|
static java.lang.String | PROP_PAGE_ATTRIBUTES
Constant for the page attributes property name.
|
static java.lang.String | PROP_PAGE_NUMBER
Page Number property name.
|
static java.lang.String | PROP_PAGE_SIZE_EXCEEDED
Property name for page size exceeded flag.
|
static java.lang.String | PROP_SEARCH_START_INDEX
Search start index property name.
|
static java.lang.String | PROP_SHELL
Shell property.
|
static java.lang.String | PROP_TOTAL_SEARCH_RESULTS
Total search results property name.
|
static java.lang.String | PROP_TRIGGER_FIND_ON_FIRST_ACTIVATE
Trigger find on first activate property.
|
Constructor and Description |
---|
StandardPaginationWidgetManager()
Construct a new pagination widget manager.
|
Modifier and Type | Method and Description |
---|---|
void | activate()
Handle activation.
|
void | addResultToCache(GenericGet searchResults)
This method will add the results got by the page search to the local cache if the cache is enabled.
|
void | dispose()
Dispose of this widget manager.
|
boolean | findPageFromLocalCache(int searchStartIndex)
This method is called by the find controls to find search result that is being requested is within the local cache.
|
protected TelesalesMultiPageEditor | getEditor()
This method returns the editor.
|
protected boolean | getFindMoreSearchResults()
Returns the current setting of PROP_FIND_MORE_RESULTS flag.
|
protected TelesalesProperties | getFindParameters()
This method returns the TelesalesProperties object with all the required parameters that need to be passed to the ServiceRequest handler.
|
protected java.lang.String | getFindServiceRequestID()
This method returns the string ID of the ServiceRequest that knows how to request the data that needs to be found.
|
protected int | getMaxSearchThreshold()
This method returns the maximum number(page size) of records that should be returned in one batch if there is a large number of records.
|
protected int | getPageNumber()
This method returns the moving page number for the search.
|
protected boolean | getPageSizeExceeded()
Returns the current setting of PROP_PAGE_SIZE_EXCEEDED flag.
|
java.lang.Object | getPaginationProperty(java.lang.String name)
This method returns the required pagination property which is stored against the page unique identifier.
|
protected ConfiguredControl | getSearchResultControl()
Implementation class must override this method and return search result control object.
|
protected int | getSearchStartIndex()
This method returns the moving startIndex for the search.
|
java.lang.String | getUniqueIdentifier()
This methods returns the page Identifier.
|
void | init(ConfiguredComposite configuredComposite, WidgetManagerInputProperties inputProperties)
This method initializes widget manager.
|
void | initControl(ConfiguredControl configuredControl)
This method initializes the specified configured control.
|
void | initialPageSearch()
This method is a convince method to set the find criteria parameters for the search for the first time and searches for the first page..
|
boolean | isCachingRequired()
This method is a convenience method for retrieving the current setting of the "isCacheEnabled" property.
|
boolean | isCurrentPageDirty()
This method is a convenience method for retrieving the current setting of the "isPageDirty" property.
|
void | populatePartialSearchResult(GenericGet searchResults)
This method is used to populate the partial search results which are returned from the server when the editor's page size exceeds the server's threshold and editor intends to make multiple calls to retrieve the remaining data.
|
void | populateSearchResult(GenericGet searchResults)
This method will populate the results got by the page search to the page which extends the StandardPaginationWidgetManager.
|
void | refreshControl(ConfiguredControl configuredControl)
Refresh the specified control.
|
void | refreshCurrentPage()
This method will refresh the current page after "Add" or "Delete" action.
|
void | setCurrentPageDirty(boolean pageDirty)
This method is a convenience method for setting the "isPageDirty" property.
|
void | setPaginationProperty(java.lang.String name, java.lang.Object value)
This method sets the pagination search property.
|
protected void | setSearchResult(java.lang.Object[] data)
This method is used to set the search result.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String MANAGER_TYPE_PAGINATION
public static final java.lang.String PROP_BUTTON_TYPE
public static final java.lang.String PROP_LABEL_TYPE
public static final java.lang.String PROP_FIELD_TYPE
public static final java.lang.String LABEL_TYPE_LISTING
public static final java.lang.String LABEL_TYPE_PAGE
public static final java.lang.String BUTTON_TYPE_FIND_NEXT
public static final java.lang.String BUTTON_TYPE_FIND_PREVIOUS
public static final java.lang.String BUTTON_TYPE_FIND_FIRST
public static final java.lang.String BUTTON_TYPE_FIND_LAST
public static final java.lang.String BUTTON_TYPE_FIND_PAGE
public static final java.lang.String FIELD_TYPE_PAGE_NUMBER
public static final java.lang.String PROP_TRIGGER_FIND_ON_FIRST_ACTIVATE
public static final java.lang.String PROP_EDITOR
public static final java.lang.String PROP_SHELL
public static final java.lang.String PROP_MAX_THRESHOLD
public static final java.lang.String PROP_FIND_MODE
public static final java.lang.String FIND_MODE_INITIAL_SEARCH
public static final java.lang.String FIND_MODE_INITIAL_SEARCH_COMPLETE
public static final java.lang.String PROP_SEARCH_START_INDEX
public static final java.lang.String PROP_PAGE_NUMBER
public static final java.lang.String PROP_LOCAL_CACHE
public static final java.lang.String PROP_TOTAL_SEARCH_RESULTS
public static final java.lang.String PROP_CURRENT_SEARCH_RESULTS
public static final java.lang.String FIND_MODE_SEARCH_COMPLETE
public static final java.lang.String PROP_IS_CACHE_ENABLED
The value is "isCacheEnabled".
The data stored under the "isCacheEnabled" property is a Boolean that represents whether the chaching is enabled or not.
public static final java.lang.String PROP_IS_PAGE_DIRTY
The value is "isPageDirty".
The data stored under the "isPageDirty" property is a Boolean that represents whether the page is dirty or not.
public static final java.lang.String PROP_PAGE_ATTRIBUTES
The value is "pageAttributes".
The data stored under the "pageAttributes" property is a Hashtable that stores the page attributes.
public static final java.lang.String EMPTY_STRING
public static final java.lang.String PROP_PAGE_SIZE_EXCEEDED
The value is "pageSizeExceeded"/ The data stored under this "pageSizeExceeded" property is a Boolean which indicates if the client page size exceeded the server limit.
This flag will be refreshed every time a call is made to the server.
public static final java.lang.String PROP_FIND_MORE_RESULTS
The value is "findMoreSearchResults". The flag is used to indicate that the search is only partially complete and more data needs to be fetched.
public static final java.lang.String PROP_OVERRIDE_CLIENT_PAGE_SIZE
The value is "overrideClientPageSize". The flag is used to indicate that the page size preferred by the client can be overridden if it exceeds the server's threshold.
The editor intending to use this property should pass the Boolean value in the WidgetManagerInputProperties. If not, by client page size will be overridden only if the getPageSizeExceeded returns true after a request.
If the editor is not intending to override the client page size, it should pass Boolean.FALSE in the WidgetManagerInputProperties.
public StandardPaginationWidgetManager()
public void init(ConfiguredComposite configuredComposite, WidgetManagerInputProperties inputProperties)
public void initControl(ConfiguredControl configuredControl)
public void dispose()
protected TelesalesMultiPageEditor getEditor()
public void initialPageSearch()
protected boolean getPageSizeExceeded()
protected int getSearchStartIndex()
protected int getPageNumber()
public void populatePartialSearchResult(GenericGet searchResults)
protected java.lang.String getFindServiceRequestID()
protected TelesalesProperties getFindParameters()
public void addResultToCache(GenericGet searchResults)
public void populateSearchResult(GenericGet searchResults)
The method overrides the editor's page size in case it exceeds the server limit.
protected boolean getFindMoreSearchResults()
protected ConfiguredControl getSearchResultControl()
protected void setSearchResult(java.lang.Object[] data)
public void setPaginationProperty(java.lang.String name, java.lang.Object value)
protected int getMaxSearchThreshold()
public void setCurrentPageDirty(boolean pageDirty)
public boolean isCurrentPageDirty()
public java.lang.Object getPaginationProperty(java.lang.String name)
public void refreshControl(ConfiguredControl configuredControl)
public void activate()
public java.lang.String getUniqueIdentifier()
public void refreshCurrentPage()
public boolean findPageFromLocalCache(int searchStartIndex)
public boolean isCachingRequired()