org.efaps.ui.wicket.models.objects
Class UITable

java.lang.Object
  extended by org.efaps.ui.wicket.models.AbstractInstanceObject
      extended by org.efaps.ui.wicket.models.objects.AbstractUIObject
          extended by org.efaps.ui.wicket.models.objects.UIAbstractPageObject
              extended by org.efaps.ui.wicket.models.objects.UITable
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.IClusterable
Direct Known Subclasses:
UIFieldTable

public class UITable
extends UIAbstractPageObject

TODO description!

Version:
$Id: UITable.java 4705 2010-06-07 20:19:39Z jan.moxter $
Author:
The eFaps Team
See Also:
Serialized Form

Nested Class Summary
 class UITable.Filter
          Class represents one filter applied to this UITable.
static class UITable.UserAttributeKey
          This enum holds the Values used as part of the key for the UserAttributes witch belong to a TableModel.
 
Constructor Summary
UITable(org.apache.wicket.PageParameters _parameters)
          Constructor setting the parameters.
UITable(java.util.UUID _commandUUID, java.lang.String _instanceKey)
          Constructor setting the uuid and Key of the instance.
UITable(java.util.UUID _commandUUID, java.lang.String _instanceKey, java.lang.String _openerId)
          Constructor setting the uuid and Key of the instance.
 
Method Summary
 void addFilterList(UITableHeader _uitableHeader, java.util.Set<?> _list)
          Add a filterlist to the filters of this UiTable.
 void addFilterRange(UITableHeader _uitableHeader, java.lang.String _from, java.lang.String _to)
          Add a range to the filters of this UiTable.
 void execute()
          Method is used to execute the UIObject (Fill it with data).
 UIRow getEmptyRow()
          Getter method for the instance variable emptyRow.
protected  java.util.List<org.efaps.admin.event.EventDefinition> getEvents(org.efaps.admin.event.EventType _eventType)
          Method to get the events that are related to this UITable.
 UITable.Filter getFilter(UITableHeader _uitableHeader)
          Method to get a Filter from the list of filters belonging to this UITable.
 java.util.List<?> getFilterPickList(UITableHeader _uitableHeader)
          Get the List of values for a PICKERLIST.
 java.util.List<UITableHeader> getHeaders()
          This is the getter method for the instance variable headers.
protected  java.util.List<org.efaps.db.Instance> getInstanceList()
          Method to get the list of instance.
protected  java.util.List<java.util.List<org.efaps.db.Instance>> getInstanceListsOld()
          Method to get the List of Instances for the table.
 org.efaps.admin.ui.AbstractCommand.SortDirection getSortDirection()
          This is the getter method for the instance variable sortDirection.
 java.lang.String getSortKey()
          This is the getter method for the instance variable sortKey.
 org.efaps.admin.ui.Table getTable()
          This is the getter method for the instance variable #table.
 int getTableId()
          This is the getter method for the instance variable tableId.
 java.lang.String getUserAttributeKey(UITable.UserAttributeKey _key)
          This method generates the Key for a UserAttribute by using the UUID of the Command and the given UserAttributeKey, so that for every Table a unique key for sorting etc, is created.
 java.util.List<UIRow> getValues()
          This is the getter method for the instance variable values.
 int getWidthWeight()
          This is the getter method for the instance variable widthWeight.
 boolean isFiltered()
          Are the values of the Rows filtered or not.
 boolean isShowCheckBoxes()
           
 boolean isUserSetWidth()
          This is the getter method for the instance variable userWidths.
 void removeFilter(UITableHeader _uiTableHeader)
          Method to remove a filter from the filters.
 void resetModel()
          This Method resets the Model, so that the next time the Model is going to be connected, the underlying Data will be received newly from the eFapsDataBase.
 void setColumnOrder(java.lang.String _markupsIds)
          Method to set the order of the columns.
 void setShowCheckBoxes(boolean _showCheckBoxes)
          This is the setter method for the instance variable showCheckBoxes.
 void setSortDirection(org.efaps.admin.ui.AbstractCommand.SortDirection _sortdirection)
          Method to set he sort direction.
 void setSortKey(java.lang.String _sortKey)
          This is the setter method for the instance variable sortKey.
 void setTableId(int _tableId)
          This is the setter method for the instance variable tableId.
protected  void setTableUUID(java.util.UUID _tableUUID)
          This is the setter method for the instance variable tableUUID.
 void sort()
          The instance method sorts the table values depending on the sort key in sortKey and the sort direction in sortDirection.
 
Methods inherited from class org.efaps.ui.wicket.models.objects.UIAbstractPageObject
addHidden, getHelpTarget, getHiddenCells, getNewRandom, getTargetCmd, getTargetCmdUUID, getUiID2Oid, getValue4Wizard, getWizard, hasTargetCmd, isPartOfWizardCall, isRenderRevise, isTargetCmdRevise, isTargetShowFile, setPartOfWizardCall, setRenderRevise, setTargetCmdRevise, setTargetCmdUUID, setWizard
 
Methods inherited from class org.efaps.ui.wicket.models.objects.AbstractUIObject
executeEvents, getCallingCommand, getCallingCommandUUID, getCommand, getCommand, getCommandUUID, getInstanceFromManager, getMenuTreeKey, getMode, getOpenerId, getTarget, getTitle, hasInstanceManager, isCreateMode, isEditMode, isInitialized, isPrintMode, isSearchMode, isSubmit, isViewMode, setCallingCommandUUID, setCommandUUID, setInitialized, setMode, setOpenerId, setSubmit, validate
 
Methods inherited from class org.efaps.ui.wicket.models.AbstractInstanceObject
getInstance, getInstanceKey, setInstanceKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UITable

public UITable(org.apache.wicket.PageParameters _parameters)
        throws org.efaps.util.EFapsException
Constructor setting the parameters.

Parameters:
_parameters - PageParameters
Throws:
org.efaps.util.EFapsException - on error

UITable

public UITable(java.util.UUID _commandUUID,
               java.lang.String _instanceKey)
        throws org.efaps.util.EFapsException
Constructor setting the uuid and Key of the instance.

Parameters:
_commandUUID - UUID of the Command
_instanceKey - Key of the instance
Throws:
org.efaps.util.EFapsException - on error

UITable

public UITable(java.util.UUID _commandUUID,
               java.lang.String _instanceKey,
               java.lang.String _openerId)
        throws org.efaps.util.EFapsException
Constructor setting the uuid and Key of the instance.

Parameters:
_commandUUID - UUID of the Command
_instanceKey - Key of the instance
_openerId - id of the opener
Throws:
org.efaps.util.EFapsException - on error
Method Detail

getInstanceListsOld

protected java.util.List<java.util.List<org.efaps.db.Instance>> getInstanceListsOld()
                                                                             throws org.efaps.util.EFapsException
Method to get the List of Instances for the table.

Returns:
List with List of instances
Throws:
org.efaps.util.EFapsException - on error

getInstanceList

protected java.util.List<org.efaps.db.Instance> getInstanceList()
                                                         throws org.efaps.util.EFapsException
Method to get the list of instance.

Returns:
List of instances
Throws:
org.efaps.util.EFapsException - on error

execute

public void execute()
Method is used to execute the UIObject (Fill it with data).

Specified by:
execute in class AbstractUIObject

getEmptyRow

public UIRow getEmptyRow()
Getter method for the instance variable emptyRow.

Returns:
value of instance variable emptyRow

addFilterList

public void addFilterList(UITableHeader _uitableHeader,
                          java.util.Set<?> _list)
Add a filterlist to the filters of this UiTable.

Parameters:
_uitableHeader - UitableHeader this filter belongs to
_list - lsi of value to filter

addFilterRange

public void addFilterRange(UITableHeader _uitableHeader,
                           java.lang.String _from,
                           java.lang.String _to)
Add a range to the filters of this UiTable.

Parameters:
_uitableHeader - UitableHeader this filter belongs to
_from - from value
_to - to value

getFilter

public UITable.Filter getFilter(UITableHeader _uitableHeader)
Method to get a Filter from the list of filters belonging to this UITable.

Parameters:
_uitableHeader - UitableHeader this filter belongs to
Returns:
filter

getFilterPickList

public java.util.List<?> getFilterPickList(UITableHeader _uitableHeader)
Get the List of values for a PICKERLIST.

Parameters:
_uitableHeader - UitableHeader this filter belongs to
Returns:
List of Values

getHeaders

public java.util.List<UITableHeader> getHeaders()
This is the getter method for the instance variable headers.

Returns:
value of instance variable headers

getSortDirection

public org.efaps.admin.ui.AbstractCommand.SortDirection getSortDirection()
This is the getter method for the instance variable sortDirection.

Returns:
value of instance variable sortDirection
See Also:
sortDirection, setSortDirection(org.efaps.admin.ui.AbstractCommand.SortDirection)

setSortDirection

public void setSortDirection(org.efaps.admin.ui.AbstractCommand.SortDirection _sortdirection)
Method to set he sort direction.

Parameters:
_sortdirection - sort direction to set

getSortKey

public java.lang.String getSortKey()
This is the getter method for the instance variable sortKey.

Returns:
value of instance variable sortKey
See Also:
sortKey, setSortKey(java.lang.String)

setSortKey

public void setSortKey(java.lang.String _sortKey)
This is the setter method for the instance variable sortKey.

Parameters:
_sortKey - new value for instance variable sortKey
See Also:
sortKey, getSortKey()

getTable

public org.efaps.admin.ui.Table getTable()
This is the getter method for the instance variable #table.

Returns:
value of instance variable #table
See Also:
#table

getTableId

public int getTableId()
This is the getter method for the instance variable tableId.

Returns:
value of instance variable tableId

setTableId

public void setTableId(int _tableId)
This is the setter method for the instance variable tableId.

Parameters:
_tableId - the tableId to set

getUserAttributeKey

public java.lang.String getUserAttributeKey(UITable.UserAttributeKey _key)
This method generates the Key for a UserAttribute by using the UUID of the Command and the given UserAttributeKey, so that for every Table a unique key for sorting etc, is created.

Parameters:
_key - UserAttributeKey the Key is wanted
Returns:
String with the key

getValues

public java.util.List<UIRow> getValues()
This is the getter method for the instance variable values.

Returns:
value of instance variable values
Throws:
org.efaps.util.EFapsException
See Also:
values, #setValues

getWidthWeight

public int getWidthWeight()
This is the getter method for the instance variable widthWeight.

Returns:
value of instance variable widthWeight

isFiltered

public boolean isFiltered()
Are the values of the Rows filtered or not.

Returns:
true if filtered, else false

isShowCheckBoxes

public boolean isShowCheckBoxes()
Returns:
true if the check boxes must be shown, other false is returned.
See Also:
showCheckBoxes

setShowCheckBoxes

public void setShowCheckBoxes(boolean _showCheckBoxes)
This is the setter method for the instance variable showCheckBoxes.

Parameters:
_showCheckBoxes - the showCheckBoxes to set

isUserSetWidth

public boolean isUserSetWidth()
This is the getter method for the instance variable userWidths.

Returns:
value of instance variable userWidths

removeFilter

public void removeFilter(UITableHeader _uiTableHeader)
Method to remove a filter from the filters.

Parameters:
_uiTableHeader - UITableHeader the filter is removed for

resetModel

public void resetModel()
This Method resets the Model, so that the next time the Model is going to be connected, the underlying Data will be received newly from the eFapsDataBase.

Specified by:
resetModel in class AbstractUIObject

setColumnOrder

public void setColumnOrder(java.lang.String _markupsIds)
Method to set the order of the columns.

Parameters:
_markupsIds - ids of the columns as a string with ; separated

setTableUUID

protected void setTableUUID(java.util.UUID _tableUUID)
This is the setter method for the instance variable tableUUID.

Parameters:
_tableUUID - the tableUUID to set

getEvents

protected java.util.List<org.efaps.admin.event.EventDefinition> getEvents(org.efaps.admin.event.EventType _eventType)
Method to get the events that are related to this UITable.

Parameters:
_eventType - eventype to get
Returns:
List of events

sort

public void sort()
The instance method sorts the table values depending on the sort key in sortKey and the sort direction in sortDirection.



Copyright © 2003-2010 The eFaps Team. All Rights Reserved.