org.hdpagination.config
Class GlobalConfig

java.lang.Object
  extended by org.hdpagination.config.GlobalConfig

public class GlobalConfig
extends java.lang.Object

A javabean containing configuration properties which are used in pagination search

Since:
1.0
Author:
Liangfeng Ren

Constructor Summary
GlobalConfig()
           
 
Method Summary
 java.lang.String getDefaultDataScope()
          The default scope ('request','session' or 'application') where the search result is to be stored.
 java.lang.String getErrorMessageBundle()
          The resource bundle file which defines error messages.
 PageLinksPattern getPageLinksPattern()
          LinksPattern controls the layout or style of "Pagination Control" links (e.g.
 int getPageSize()
          How many records are displayed in one page
 java.lang.String getPageSizeParamName()
          The name of request parameter representing page size (number of records per page).
 java.lang.String getSortDownImage()
          Location of image file which indicates search results are sorted by descending order
 java.lang.String getSortUpImage()
          Location of image file which indicates search results are sorted by ascending order
 java.lang.String getUrlSuffix()
          Define the suffix (after '.') of URL that will be dispatched to PaginationAction instance for process.
 View getView()
          Get the view who is responsible for rendering page.
 void setDefaultDataScope(java.lang.String defaultDataScope)
          The default scope ('request','session' or 'application') where the search result is to be stored.
 void setErrorMessageBundle(java.lang.String errorMessageBundle)
          Set the resource bundle file which defines error messages
 void setPageLinksPattern(PageLinksPattern pattern)
          Set linksPattern property
 void setPageSize(int pageSize)
          Set number of records displayed in one page
 void setPageSizeParamName(java.lang.String pageSizeParaName)
          The name of request parameter representing page size (number of records per page).
 void setSortDownImage(java.lang.String sortDownImage)
          Set location of image file which indicates search results are sorted by descending order
 void setSortUpImage(java.lang.String sortUpImage)
          Set location of image file which indicates search results are sorted by ascending order
 void setUrlSuffix(java.lang.String urlSuffix)
          Set urlSuffix property
 void setView(View view)
          Set the view who is responsible for rendering page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalConfig

public GlobalConfig()
Method Detail

getPageSize

public int getPageSize()
How many records are displayed in one page

Returns:

setPageSize

public void setPageSize(int pageSize)
Set number of records displayed in one page

Parameters:
pageSize -

getDefaultDataScope

public java.lang.String getDefaultDataScope()
The default scope ('request','session' or 'application') where the search result is to be stored. If 'dataScope' property of PaginationAction is not set this default scope will be used. 'request' is highly recommended to use as the default scope.

Returns:

setDefaultDataScope

public void setDefaultDataScope(java.lang.String defaultDataScope)
The default scope ('request','session' or 'application') where the search result is to be stored. If 'dataScope' property of PaginationAction is not set this default scope will be used. 'request' is highly recommended to be used as the default scope.

Parameters:
defaultDataScope -

getPageLinksPattern

public PageLinksPattern getPageLinksPattern()
LinksPattern controls the layout or style of "Pagination Control" links (e.g. navigation links such as 'Previous','Next', 'First', 'Last' or page links like 1 2 3 4 5 6 7 8)

Returns:

setPageLinksPattern

public void setPageLinksPattern(PageLinksPattern pattern)
Set linksPattern property

Parameters:
pattern -

getSortUpImage

public java.lang.String getSortUpImage()
Location of image file which indicates search results are sorted by ascending order

Returns:

setSortUpImage

public void setSortUpImage(java.lang.String sortUpImage)
Set location of image file which indicates search results are sorted by ascending order

Parameters:
sortUpImage -

getSortDownImage

public java.lang.String getSortDownImage()
Location of image file which indicates search results are sorted by descending order

Returns:

setSortDownImage

public void setSortDownImage(java.lang.String sortDownImage)
Set location of image file which indicates search results are sorted by descending order

Parameters:
sortDownImage -

getUrlSuffix

public java.lang.String getUrlSuffix()
Define the suffix (after '.') of URL that will be dispatched to PaginationAction instance for process. In another word, all requests with URL containing such suffix are thought to be a pagination search request.

This property is only used by JSP version. JSF version does not need this.

Returns:

setUrlSuffix

public void setUrlSuffix(java.lang.String urlSuffix)
Set urlSuffix property

This property is only used by JSP version. JSF version does not need this.

Parameters:
urlSuffix -

getErrorMessageBundle

public java.lang.String getErrorMessageBundle()
The resource bundle file which defines error messages. This property is only used for input validation.

This property is only used by JSP version. JSF version does not need this.

Returns:

setErrorMessageBundle

public void setErrorMessageBundle(java.lang.String errorMessageBundle)
Set the resource bundle file which defines error messages

This property is only used by JSP version. JSF version does not need this.

Parameters:
errorMessageBundle -

getView

public View getView()
Get the view who is responsible for rendering page.

This property is only used by JSP version. JSF version does not need this.

Returns:
See Also:
PaginationAction.getView()

setView

public void setView(View view)
Set the view who is responsible for rendering page. By default InternalResourceView is used to render page if no other View instance is set.

This property is only used by JSP version. JSF version does not need this.

Parameters:
view -

getPageSizeParamName

public java.lang.String getPageSizeParamName()
The name of request parameter representing page size (number of records per page). The default request parameter name is 'page_size'. This property should be used only in case where user can change the page size dynamically from UI input. In majority cases, the page size keeps the same across the whole application and can not be changed at runtime.

This property is only used by JSP version. JSF version does not need this.

Returns:
Since:
1.2
See Also:
Globals.PAGE_SIZE_PARAM

setPageSizeParamName

public void setPageSizeParamName(java.lang.String pageSizeParaName)
The name of request parameter representing page size (number of records per page). The default request parameter name is 'page_size'. This property should be used only in case where user can change the page size dynamically from UI input. In majority cases, the page size keeps the same across the whole application and can not be changed at runtime.

This property is only used by JSP version. JSF version does not need this.

Parameters:
pageSizeParaName -
Since:
1.2
See Also:
Globals.PAGE_SIZE_PARAM


Copyright © 2008 HDPagination All Rights Reserved.