FilterWindowService Class
- public final class FilterWindowService
extends Object
The FilterWindowService is used to create a FilterWindowService.FilterWindowData object
that contains state information that is used to render a filter window. The filter
window is used to add parameters to a URL which, when submitted to the server,
changes a query for data on the server. The filter window displays a type specific
user interface depending on the type of the data being filtered. The FilterWindowService.isStringType(int),
FilterWindowService.isDateType(int), FilterWindowService.isBooleanType(int) methods are used to determine
the type of UI that will be rendered. The options available for filtering a specific
column will also change depending on the column type.
-
Hierarchy
-
Object
FilterWindowService
public static class | FilterWindowService.Filter
The Filter class contains information about filters that are applied
to a grid/column pair for which the filter window is being rendered.
|
public static final class | FilterWindowService.FilterWindowData
The FilterWindowData class contains information extracted from the
current request and response which is used when rendering a filter window. |
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterWindowService
public FilterWindowService()
getFilterWindowData(HttpServletRequest, HttpServletResponse) Method
public static FilterWindowService.FilterWindowData getFilterWindowData(HttpServletRequest request,
HttpServletResponse response)
Factory method to create an instance of a FilterWindowService.FilterWindowData object that contains
state from the request which is used when rendering a filter window.
Parameters
-
request
- the current request
-
response
- the current response
Returns
- a
FilterWindowData object that represents necessary information
that is parsed out of the URL for the filter window.
getOptions() Method
public static String[][] getOptions()
Get a list of options that are available for display in the filter
drop downs of the filter window. Not all operations are
available for all column types. The return value is
a two dimensional array of Strings as:
(readable name of an operation, URL key of an operation)
Returns
- the list of filter opations.
Using the default Locale for the JVM.
getOptions(Locale) Method
public static String[][] getOptions(Locale locale)
Get a list of options that are available for display in the filter
drop downs of the filter window. Not all operations are
available for all column types. The return value is
a two dimensional array of Strings as:
(readable name of an operation, URL key of an operation)
Returns
- the list of filter opations.
isBooleanType(int) Method
public static boolean isBooleanType(int columnType)
Check a given column type to see if it is a boolean column type. Boolean types include:
Parameters
-
columnType
- the int representation of a column type
Returns
true if the column is a boolean type; false otherwise
isDateType(int) Method
public static boolean isDateType(int columnType)
Check a given column type to see if it is a date column type. Date types include:
Parameters
-
columnType
- the int representation of a column type
Returns
true if the column is a date type; false otherwise
isStringType(int) Method
public static boolean isStringType(int columnType)
Check a given column type to see if it is a string column type. String types include:
Parameters
-
columnType
- the int representation of a column type
Returns
true if the column is a string type; false otherwise