com.sun.rave.web.ui.faces
Class ValueBindingSortCriteria

java.lang.Object
  extended by com.sun.data.provider.SortCriteria
      extended by com.sun.rave.web.ui.faces.ValueBindingSortCriteria
All Implemented Interfaces:
java.io.Serializable

public class ValueBindingSortCriteria
extends com.sun.data.provider.SortCriteria

The ValueBindingSortCriteria class is an implementation of SortCriteria that simply retrieves the sort value from the ValueBinding.

See Also:
Serialized Form

Constructor Summary
ValueBindingSortCriteria()
          Constructs a ValueBindingSortCriteria with no associated ValueBinding.
ValueBindingSortCriteria(javax.faces.el.ValueBinding valueBinding)
          Constructs a ValueBindingSortCriteria with the specified ValueBinding.
ValueBindingSortCriteria(javax.faces.el.ValueBinding valueBinding, boolean ascending)
          Constructs a ValueBindingSortCriteria with the specified ValueBinding and ascending state.
 
Method Summary
 java.lang.String getCriteriaKey()
          Returns the ValueBinding's value expresssion string.
 java.lang.String getDisplayName()
          If no display name is set, this returns the ValueBinding's display name.
 java.lang.String getRequestMapKey()
          Returns the request map variable key that will be used to store the TableRowDataProvider for the current row being sorted.
 java.lang.Object getSortValue(com.sun.data.provider.TableDataProvider provider, com.sun.data.provider.RowKey row)
          Returns the value from the ValueBinding ignoring the arguments.
 javax.faces.el.ValueBinding getValueBinding()
          Returns the ValueBinding to use for this sort criteria.
 void setRequestMapKey(java.lang.String requestMapKey)
          Sets the request map variable key that will be used to store the TableRowDataProvider for the current row being sorted.
 void setValueBinding(javax.faces.el.ValueBinding valueBinding)
          Sets the ValueBinding for this sort criteria.
 
Methods inherited from class com.sun.data.provider.SortCriteria
isAscending, setAscending, setDisplayName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueBindingSortCriteria

public ValueBindingSortCriteria()
Constructs a ValueBindingSortCriteria with no associated ValueBinding.


ValueBindingSortCriteria

public ValueBindingSortCriteria(javax.faces.el.ValueBinding valueBinding)
Constructs a ValueBindingSortCriteria with the specified ValueBinding.

Parameters:
valueBinding - The desired ValueBinding

ValueBindingSortCriteria

public ValueBindingSortCriteria(javax.faces.el.ValueBinding valueBinding,
                                boolean ascending)
Constructs a ValueBindingSortCriteria with the specified ValueBinding and ascending state.

Parameters:
valueBinding - The desired ValueBinding
ascending - The desired boolean state for the ascending property
Method Detail

getValueBinding

public javax.faces.el.ValueBinding getValueBinding()
Returns the ValueBinding to use for this sort criteria.

Returns:
The currently set ValueBinding for this sort criteria

setValueBinding

public void setValueBinding(javax.faces.el.ValueBinding valueBinding)
Sets the ValueBinding for this sort criteria.

Parameters:
valueBinding - The desired ValueBinding for this sort criteria

getRequestMapKey

public java.lang.String getRequestMapKey()
Returns the request map variable key that will be used to store the TableRowDataProvider for the current row being sorted. This allows value expressions to refer to the "current" row during the sort operation.

Returns:
String key to use for the TableRowDataProvider

setRequestMapKey

public void setRequestMapKey(java.lang.String requestMapKey)
Sets the request map variable key that will be used to store the TableRowDataProvider for the current row being sorted. This allows value expressions to refer to the "current" row during the sort operation.

Parameters:
requestMapKey - String key to use for the TableRowDataProvider

getDisplayName

public java.lang.String getDisplayName()

If no display name is set, this returns the ValueBinding's display name.

Overrides:
getDisplayName in class com.sun.data.provider.SortCriteria

getCriteriaKey

public java.lang.String getCriteriaKey()
Returns the ValueBinding's value expresssion string.

Specified by:
getCriteriaKey in class com.sun.data.provider.SortCriteria

getSortValue

public java.lang.Object getSortValue(com.sun.data.provider.TableDataProvider provider,
                                     com.sun.data.provider.RowKey row)

Returns the value from the ValueBinding ignoring the arguments.

Specified by:
getSortValue in class com.sun.data.provider.SortCriteria