org.kuali.rice.kns.web.struts.form
Class KualiTableRenderFormMetadata

java.lang.Object
  extended by org.kuali.rice.kns.web.struts.form.KualiTableRenderFormMetadata

public class KualiTableRenderFormMetadata
extends Object

This class holds the metadata necessary to render a table when displaytag is not being used.


Field Summary
private  int columnToSortIndex
          Comment for columnToSortIndex
private  String columnToSortName
          If it is not feasible to use an index for lookup, as with mapped properties in an AttributeSet, it may be necessary to store a string value
private  int firstRowIndex
           
private  int lastRowIndex
           
private  int previouslySortedColumnIndex
          when the looked results screen was rendered, the index of the column that the results were sorted on.
private  String previouslySortedColumnName
          When the screen was last rendered, the column name on which it was previously sorted -- this is important for toggling between ascending and descending sort orders
private  int resultsActualSize
          The number of rows that match the query criteria
private  int resultsLimitedSize
          The number of rows that match the query criteria or the max results limit size (if applicable), whichever is less
private  boolean sortDescending
           
private  int switchToPageNumber
           
private  int totalNumberOfPages
           
private  int viewedPageNumber
           
 
Constructor Summary
KualiTableRenderFormMetadata()
           
 
Method Summary
 int getColumnToSortIndex()
          Gets the columnToSortIndex attribute.
 String getColumnToSortName()
           
 int getFirstRowIndex()
          Gets the firstRowIndex attribute.
 int getLastRowIndex()
          Gets the lastRowIndex attribute.
 int getPreviouslySortedColumnIndex()
          Gets the previouslySortedColumnIndex attribute.
 String getPreviouslySortedColumnName()
           
 int getResultsActualSize()
          Gets the resultsActualSize attribute.
 int getResultsLimitedSize()
          Gets the resultsLimitedSize attribute.
 int getSwitchToPageNumber()
          Gets the switchToPageNumber attribute.
 int getTotalNumberOfPages()
          Gets the totalNumberOfPages attribute.
 int getViewedPageNumber()
          Gets the viewedPageNumber attribute.
 boolean isSortDescending()
          Gets the sortDescending attribute.
 void jumpToFirstPage(int listSize, int maxRowsPerPage)
          Sets the paging form parameters to go to the first page of the list
 void jumpToLastPage(int listSize, int maxRowsPerPage)
          Sets the paging form parameters to go to the last page of the list
 void jumpToPage(int pageNumber, int listSize, int maxRowsPerPage)
          Sets the paging form parameters to go to the specified page of the list
 void setColumnToSortIndex(int columnToSortIndex)
          Sets the columnToSortIndex attribute value.
 void setColumnToSortName(String columnToSortName)
           
 void setFirstRowIndex(int firstRowIndex)
          Sets the firstRowIndex attribute value.
 void setLastRowIndex(int lastRowIndex)
          Sets the lastRowIndex attribute value.
 void setPreviouslySortedColumnIndex(int previouslySortedColumnIndex)
          Sets the previouslySortedColumnIndex attribute value.
 void setPreviouslySortedColumnName(String previousSortedColumnName)
           
 void setResultsActualSize(int resultsActualSize)
          Sets the resultsActualSize attribute value.
 void setResultsLimitedSize(int resultsLimitedSize)
          Sets the resultsLimitedSize attribute value.
 void setSortDescending(boolean sortDescending)
          Sets the sortDescending attribute value.
 void setSwitchToPageNumber(int switchToPageNumber)
          Sets the switchToPageNumber attribute value.
 void setTotalNumberOfPages(int totalNumberOfPages)
          Sets the totalNumberOfPages attribute value.
 void setViewedPageNumber(int viewedPageNumber)
          Sets the viewedPageNumber attribute value.
 void sort(List<?> items, int maxRowsPerPage)
          Sorts a list on the form according to the form metadata (sortColumName, previouslySortedColumnName)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewedPageNumber

private int viewedPageNumber

totalNumberOfPages

private int totalNumberOfPages

firstRowIndex

private int firstRowIndex

lastRowIndex

private int lastRowIndex

switchToPageNumber

private int switchToPageNumber

resultsActualSize

private int resultsActualSize
The number of rows that match the query criteria


resultsLimitedSize

private int resultsLimitedSize
The number of rows that match the query criteria or the max results limit size (if applicable), whichever is less


previouslySortedColumnIndex

private int previouslySortedColumnIndex
when the looked results screen was rendered, the index of the column that the results were sorted on. -1 for unknown, index numbers starting at 0


columnToSortIndex

private int columnToSortIndex
Comment for columnToSortIndex


columnToSortName

private String columnToSortName
If it is not feasible to use an index for lookup, as with mapped properties in an AttributeSet, it may be necessary to store a string value


previouslySortedColumnName

private String previouslySortedColumnName
When the screen was last rendered, the column name on which it was previously sorted -- this is important for toggling between ascending and descending sort orders


sortDescending

private boolean sortDescending
Constructor Detail

KualiTableRenderFormMetadata

public KualiTableRenderFormMetadata()
Method Detail

getColumnToSortIndex

public int getColumnToSortIndex()
Gets the columnToSortIndex attribute.

Returns:
Returns the columnToSortIndex.

setColumnToSortIndex

public void setColumnToSortIndex(int columnToSortIndex)
Sets the columnToSortIndex attribute value.

Parameters:
columnToSortIndex - The columnToSortIndex to set.

getColumnToSortName

public String getColumnToSortName()

setColumnToSortName

public void setColumnToSortName(String columnToSortName)

getPreviouslySortedColumnIndex

public int getPreviouslySortedColumnIndex()
Gets the previouslySortedColumnIndex attribute.

Returns:
Returns the previouslySortedColumnIndex.

setPreviouslySortedColumnIndex

public void setPreviouslySortedColumnIndex(int previouslySortedColumnIndex)
Sets the previouslySortedColumnIndex attribute value.

Parameters:
previouslySortedColumnIndex - The previouslySortedColumnIndex to set.

getPreviouslySortedColumnName

public String getPreviouslySortedColumnName()
Returns:
the previousSortedColumnName

setPreviouslySortedColumnName

public void setPreviouslySortedColumnName(String previousSortedColumnName)
Parameters:
previousSortedColumnName - the previousSortedColumnName to set

getResultsActualSize

public int getResultsActualSize()
Gets the resultsActualSize attribute.

Returns:
Returns the resultsActualSize.

setResultsActualSize

public void setResultsActualSize(int resultsActualSize)
Sets the resultsActualSize attribute value.

Parameters:
resultsActualSize - The resultsActualSize to set.

getResultsLimitedSize

public int getResultsLimitedSize()
Gets the resultsLimitedSize attribute.

Returns:
Returns the resultsLimitedSize.

setResultsLimitedSize

public void setResultsLimitedSize(int resultsLimitedSize)
Sets the resultsLimitedSize attribute value.

Parameters:
resultsLimitedSize - The resultsLimitedSize to set.

getSwitchToPageNumber

public int getSwitchToPageNumber()
Gets the switchToPageNumber attribute.

Returns:
Returns the switchToPageNumber.

setSwitchToPageNumber

public void setSwitchToPageNumber(int switchToPageNumber)
Sets the switchToPageNumber attribute value.

Parameters:
switchToPageNumber - The switchToPageNumber to set.

getViewedPageNumber

public int getViewedPageNumber()
Gets the viewedPageNumber attribute.

Returns:
Returns the viewedPageNumber.

setViewedPageNumber

public void setViewedPageNumber(int viewedPageNumber)
Sets the viewedPageNumber attribute value.

Parameters:
viewedPageNumber - The viewedPageNumber to set.

getTotalNumberOfPages

public int getTotalNumberOfPages()
Gets the totalNumberOfPages attribute.

Returns:
Returns the totalNumberOfPages.

setTotalNumberOfPages

public void setTotalNumberOfPages(int totalNumberOfPages)
Sets the totalNumberOfPages attribute value.

Parameters:
totalNumberOfPages - The totalNumberOfPages to set.

getFirstRowIndex

public int getFirstRowIndex()
Gets the firstRowIndex attribute.

Returns:
Returns the firstRowIndex.

setFirstRowIndex

public void setFirstRowIndex(int firstRowIndex)
Sets the firstRowIndex attribute value.

Parameters:
firstRowIndex - The firstRowIndex to set.

getLastRowIndex

public int getLastRowIndex()
Gets the lastRowIndex attribute.

Returns:
Returns the lastRowIndex.

setLastRowIndex

public void setLastRowIndex(int lastRowIndex)
Sets the lastRowIndex attribute value.

Parameters:
lastRowIndex - The lastRowIndex to set.

isSortDescending

public boolean isSortDescending()
Gets the sortDescending attribute.

Returns:
Returns the sortDescending.

setSortDescending

public void setSortDescending(boolean sortDescending)
Sets the sortDescending attribute value.

Parameters:
sortDescending - The sortDescending to set.

jumpToFirstPage

public void jumpToFirstPage(int listSize,
                            int maxRowsPerPage)
Sets the paging form parameters to go to the first page of the list

Parameters:
listSize - size of table being rendered
maxRowsPerPage -

jumpToLastPage

public void jumpToLastPage(int listSize,
                           int maxRowsPerPage)
Sets the paging form parameters to go to the last page of the list

Parameters:
listSize - size of table being rendered
maxRowsPerPage -

jumpToPage

public void jumpToPage(int pageNumber,
                       int listSize,
                       int maxRowsPerPage)
Sets the paging form parameters to go to the specified page of the list

Parameters:
pageNumber - first page is 0, must be non-negative. If the list is not large enough to have the page specified, then this method will be equivalent to calling jumpToLastPage.
listSize - size of table being rendered
maxRowsPerPage -
See Also:
jumpToLastPage(int, int)

sort

public void sort(List<?> items,
                 int maxRowsPerPage)
Sorts a list on the form according to the form metadata (sortColumName, previouslySortedColumnName)

Parameters:
memberTableMetadata -
items -
maxRowsPerPage -
Throws:
WorkflowException


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.