|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openxava.tab.Tab
public class Tab
Session object to work with tabular data.
| Field Summary | |
|---|---|
static java.lang.String |
COLLECTION_PREFIX
Prefix used for naming (in session) to the tab objects used for collections. |
static java.lang.String |
CONTAINS_COMPARATOR
|
static java.lang.String |
EQ_COMPARATOR
|
static java.lang.String |
GE_COMPARATOR
|
static java.lang.String |
GT_COMPARATOR
|
static java.lang.String |
LE_COMPARATOR
|
static java.lang.String |
LT_COMPARATOR
|
static java.lang.String |
MONTH_COMPARATOR
|
static java.lang.String |
NE_COMPARATOR
|
static java.lang.String |
NOT_CONTAINS_COMPARATOR
|
static java.lang.String |
RANGE_COMPARATOR
|
static java.lang.String |
STARTS_COMPARATOR
|
static java.lang.String |
TAB_RESETED_PREFIX
|
static java.lang.String |
YEAR_COMPARATOR
|
static java.lang.String |
YEAR_MONTH_COMPARATOR
|
| Constructor Summary | |
|---|---|
Tab()
|
|
| Method Summary | |
|---|---|
void |
addProperties(java.util.Collection properties)
|
void |
addProperty(int index,
java.lang.String propertyName)
|
void |
addProperty(java.lang.String propertyName)
|
void |
addSumProperty(java.lang.String property)
Add total property. |
void |
clearProperties()
|
void |
clearSelected()
Deprecated. Since v4.7, use deselectAll() instead |
void |
clearStyle()
Clear the effect of all calls to setStyle(int, String) |
void |
deselect(int row)
|
void |
deselect(java.util.Map key)
|
void |
deselectAll()
|
java.lang.String |
friendCustomReportGetPreferencesNodeName()
|
void |
friendExecuteJspDeselect(java.lang.String deselect)
|
static int |
friendViewGetDefaultColumnWidth(MetaProperty p)
|
int |
getAddColumnsLastPage()
|
int |
getAddColumnsPage()
|
int |
getAddColumnsPageRowCount()
|
int |
getAdditionalTotalsCount()
|
IXTableModel |
getAllDataTableModel()
A table model with load all data at once. |
java.util.Map[] |
getAllKeys()
An array with the keys (in Map format) of the all
rows. |
java.lang.String |
getBaseCondition()
|
java.lang.String |
getBaseConditionForReference()
|
View |
getCollectionView()
If this tab represents a collection the collection view of that collection. |
java.util.Collection |
getColumnsToAdd()
|
int |
getColumnWidth(int columnIndex)
|
java.lang.String[] |
getConditionComparators()
|
java.lang.String[] |
getConditionValues()
|
java.lang.String[] |
getConditionValuesTo()
|
IFilter |
getFilter()
Filter used currently by this tab. |
int |
getFinalIndex()
|
int |
getInitialIndex()
|
int |
getLastPage()
|
java.util.List<MetaProperty> |
getMetaProperties()
|
java.util.List |
getMetaPropertiesNotCalculated()
|
MetaProperty |
getMetaProperty(int i)
|
MetaProperty |
getMetaProperty(java.lang.String qualifiedName)
|
MetaTab |
getMetaTab()
|
java.lang.String |
getModelName()
|
java.lang.String |
getOrderBy()
|
int |
getPage()
|
int |
getPageRowCount()
|
java.lang.String |
getPropertiesNamesAsString()
|
HttpServletRequest |
getRequest()
|
int[] |
getSelected()
Deprecated. use getSelectedKeys |
java.util.Map[] |
getSelectedKeys()
|
java.lang.String |
getStyle(int row)
The CSS style associated to the specified row. |
java.util.Set<java.lang.String> |
getSumPropertiesNames()
|
IXTableModel |
getTableModel()
A table model with on-demand data reading. |
java.lang.String |
getTabName()
|
java.lang.String |
getTitle()
|
static java.lang.String |
getTitleI18n(java.util.Locale locale,
java.lang.String modelName,
java.lang.String tabName)
|
java.lang.String |
getTitleId()
|
java.lang.Object |
getTotal(int column)
|
java.lang.Object |
getTotal(int row,
int column)
|
java.lang.Object |
getTotal(java.lang.String qualifiedPropertyName)
|
java.lang.String |
getTotalLabel(int row,
int column)
|
java.util.Collection<java.lang.String> |
getTotalPropertiesNames()
|
java.lang.String |
getTotalPropertiesNamesAsString()
|
int |
getTotalSize()
|
void |
goAddColumnsPage(int page)
|
void |
goPage(int page)
1 is the first page |
boolean |
hasSelected()
|
boolean |
hasTotal(int column)
|
boolean |
hasTotal(int row,
int column)
|
void |
hideRows()
|
boolean |
isCustomize()
|
boolean |
isCustomizeAllowed()
|
boolean |
isFilterVisible()
|
boolean |
isFixedTotal(int column)
|
boolean |
isIgnorePageRowCount()
|
boolean |
isLastPage()
|
boolean |
isNotResetNextTime()
|
boolean |
isOrderAscending(java.lang.String name)
|
boolean |
isOrderAscending2(java.lang.String name)
|
boolean |
isOrderDescending(java.lang.String name)
|
boolean |
isOrderDescending2(java.lang.String name)
|
boolean |
isResizeColumns()
|
boolean |
isRowsHidden()
|
boolean |
isSelected(int row)
|
boolean |
isSortRemainingProperties()
|
boolean |
isTitleVisible()
|
boolean |
isTotalCapable(int column)
|
void |
movePropertyToLeft(int index)
|
void |
movePropertyToRight(int index)
|
void |
orderBy(java.lang.String property)
|
void |
pageBack()
|
void |
pageForward()
|
void |
removeProperty(int index)
|
void |
removeProperty(java.lang.String propertyName)
|
void |
removeSumProperty(java.lang.String property)
Remove total property. |
void |
reset()
|
void |
restoreDefaultProperties()
|
void |
setAddColumnsPageRowCount(int addColumnsPageRowCount)
|
void |
setAllSelected(int[] values)
Deprecated. use setAllSelectedKeys |
void |
setAllSelectedKeys(java.util.Map[] values)
|
void |
setBaseCondition(java.lang.String condition)
|
void |
setBaseConditionForReference(java.lang.String baseConditionForReference)
|
void |
setBaseConditionValuesForReference(java.util.Map values)
|
void |
setCollectionView(View collectionView)
If this tab represents a collection the collection view of that collection. |
void |
setColumnWidth(int columnIndex,
int width)
|
void |
setConditionComparators(java.util.Collection<java.lang.String> comparators)
|
void |
setConditionValue(java.lang.String property,
java.lang.Object value)
|
void |
setConditionValues(java.util.Collection<java.lang.String> values)
|
void |
setCustomize(boolean customize)
|
void |
setCustomizeAllowed(boolean customizeAllowed)
|
void |
setDefaultOrder(java.lang.String defaultOrder)
Set the default order for this Tab in runtime. |
void |
setDefaultPropertiesNames(java.lang.String properties)
The default properties are the initial ones and those to show when the user reset his customizations. |
void |
setFilter(IFilter filter)
Sets the filter for this tab in runtime. |
void |
setFilterVisible(boolean filterVisible)
|
void |
setIgnorePageRowCount(boolean ignorePageRowCount)
|
void |
setMetaRowStyles(java.util.Collection styles)
|
void |
setModelName(java.lang.String newModelName)
|
void |
setNotResetNextTime(boolean b)
|
void |
setPageRowCount(int pageRowCount)
|
void |
setPropertiesNames(java.lang.String propertiesNames)
Set the properties to be displayed by this Tab in runtime. |
void |
setReferencesCollection(java.lang.String model,
java.lang.String collectionName)
This is an alternative to setModelName, and is used when this tab represent a collection of references. |
void |
setRequest(HttpServletRequest request)
|
void |
setResizeColumns(boolean resizeColumns)
|
void |
setRowsHidden(boolean rowsHidden)
If you like show or hide rows is better calling to showRows() and hideRows(). |
void |
setSelected(int[] values)
Change the selectedKeys only within the current page range. |
void |
setSelected(java.lang.String[] values)
Same that setSelected(int [] values) but from String []. |
void |
setSortRemainingProperties(boolean sortRemainingProperties)
|
void |
setStyle(int row,
java.lang.String style)
Set the CSS style associated to the specified row. |
void |
setTableModel(IXTableModel tableModel)
|
void |
setTabName(java.lang.String newTabName)
|
void |
setTabObject(java.lang.String tabObject)
|
void |
setTitle(java.lang.String title)
Set the specific title as is. |
void |
setTitleArgument(java.lang.Object v1)
|
void |
setTitleArguments(java.lang.Object[] valores)
|
void |
setTitleArguments(java.lang.Object v1,
java.lang.Object v2)
|
void |
setTitleArguments(java.lang.Object v1,
java.lang.Object v2,
java.lang.Object v3)
|
void |
setTitleArguments(java.lang.Object v1,
java.lang.Object v2,
java.lang.Object v3,
java.lang.Object v4)
|
void |
setTitleId(java.lang.String titleId)
Set the title from an i18n id. |
void |
setTitleVisible(boolean b)
|
void |
showRows()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COLLECTION_PREFIX
public static final java.lang.String TAB_RESETED_PREFIX
public static final java.lang.String STARTS_COMPARATOR
public static final java.lang.String CONTAINS_COMPARATOR
public static final java.lang.String NOT_CONTAINS_COMPARATOR
public static final java.lang.String YEAR_COMPARATOR
public static final java.lang.String MONTH_COMPARATOR
public static final java.lang.String YEAR_MONTH_COMPARATOR
public static final java.lang.String RANGE_COMPARATOR
public static final java.lang.String EQ_COMPARATOR
public static final java.lang.String NE_COMPARATOR
public static final java.lang.String GE_COMPARATOR
public static final java.lang.String LE_COMPARATOR
public static final java.lang.String GT_COMPARATOR
public static final java.lang.String LT_COMPARATOR
| Constructor Detail |
|---|
public Tab()
| Method Detail |
|---|
public java.util.List<MetaProperty> getMetaProperties()
public java.util.Collection getColumnsToAdd()
throws XavaException
XavaException
public java.util.List getMetaPropertiesNotCalculated()
throws XavaException
XavaException
public java.lang.String getBaseCondition()
throws XavaException
XavaException
public void setBaseCondition(java.lang.String condition)
throws XavaException
XavaException
public void setReferencesCollection(java.lang.String model,
java.lang.String collectionName)
throws XavaException
XavaException
public void setBaseConditionValuesForReference(java.util.Map values)
throws XavaException
XavaException
public MetaTab getMetaTab()
throws XavaException
XavaExceptionpublic void setDefaultPropertiesNames(java.lang.String properties)
public java.lang.String getPropertiesNamesAsString()
public int getColumnWidth(int columnIndex)
public static int friendViewGetDefaultColumnWidth(MetaProperty p)
public void setColumnWidth(int columnIndex,
int width)
public MetaProperty getMetaProperty(int i)
public MetaProperty getMetaProperty(java.lang.String qualifiedName)
public void setMetaRowStyles(java.util.Collection styles)
throws XavaException
XavaExceptionpublic IXTableModel getTableModel()
Suitable for UI.
public IXTableModel getAllDataTableModel()
throws java.lang.Exception
Suitable for report generation (for example).
java.lang.Exceptionpublic void setTableModel(IXTableModel tableModel)
public void reset()
public int[] getSelected()
public boolean hasSelected()
public void setAllSelectedKeys(java.util.Map[] values)
public void setAllSelected(int[] values)
Deprecated since 4.7
public void deselect(int row)
int - rowpublic void friendExecuteJspDeselect(java.lang.String deselect)
as - 'ox_OpenXavaTest_Color__xava_tab:4,3,1'public void deselect(java.util.Map key)
Map - keypublic void setSelected(int[] values)
Postcondition this.selectedKey == values is not fulfilled
public void setSelected(java.lang.String[] values)
setSelected(int [] values) but from String [].
public boolean isSelected(int row)
public int getInitialIndex()
public int getFinalIndex()
public boolean isLastPage()
public void pageForward()
public boolean isNotResetNextTime()
public void setNotResetNextTime(boolean b)
public int getLastPage()
public int getAddColumnsLastPage()
public int getAddColumnsPage()
public void goAddColumnsPage(int page)
public void pageBack()
public void goPage(int page)
page - public int getPage()
public int getTotalSize()
public void setConditionValues(java.util.Collection<java.lang.String> values)
throws XavaException
XavaException
public void setConditionComparators(java.util.Collection<java.lang.String> comparators)
throws XavaException
XavaExceptionpublic java.lang.String[] getConditionValues()
public java.lang.String[] getConditionValuesTo()
public java.lang.String[] getConditionComparators()
public void orderBy(java.lang.String property)
public java.lang.String getOrderBy()
public boolean isOrderAscending(java.lang.String name)
public boolean isOrderDescending(java.lang.String name)
public boolean isOrderAscending2(java.lang.String name)
public boolean isOrderDescending2(java.lang.String name)
public java.lang.String getModelName()
public void setModelName(java.lang.String newModelName)
public java.lang.String getTabName()
public void setTabName(java.lang.String newTabName)
public void setRequest(HttpServletRequest request)
public void setTabObject(java.lang.String tabObject)
public java.lang.String friendCustomReportGetPreferencesNodeName()
public HttpServletRequest getRequest()
public boolean isTitleVisible()
public void setTitleVisible(boolean b)
public void setTitleArgument(java.lang.Object v1)
public void setTitleArguments(java.lang.Object v1,
java.lang.Object v2)
public void setTitleArguments(java.lang.Object v1,
java.lang.Object v2,
java.lang.Object v3)
public void setTitleArguments(java.lang.Object v1,
java.lang.Object v2,
java.lang.Object v3,
java.lang.Object v4)
public void setTitleArguments(java.lang.Object[] valores)
public java.lang.String getTitle()
throws XavaException
XavaExceptionpublic void setTitle(java.lang.String title)
This title is used in list mode if the title is visible and as title for reports.
If you want to use an i18n title use setTitleId(String titleId) instead.
public static java.lang.String getTitleI18n(java.util.Locale locale,
java.lang.String modelName,
java.lang.String tabName)
throws XavaException
XavaExceptionpublic java.lang.String getBaseConditionForReference()
public void setBaseConditionForReference(java.lang.String baseConditionForReference)
public void addProperty(java.lang.String propertyName)
throws XavaException
XavaException
public void addProperty(int index,
java.lang.String propertyName)
throws XavaException
XavaException
public void addProperties(java.util.Collection properties)
throws XavaException
XavaException
public void removeProperty(java.lang.String propertyName)
throws XavaException
XavaException
public void removeProperty(int index)
throws XavaException
XavaException
public void movePropertyToRight(int index)
throws XavaException
XavaException
public void movePropertyToLeft(int index)
throws XavaException
XavaException
public void clearProperties()
throws XavaException
XavaException
public void restoreDefaultProperties()
throws XavaException
XavaExceptionpublic boolean isCustomizeAllowed()
public void setCustomizeAllowed(boolean customizeAllowed)
public boolean isResizeColumns()
public void setResizeColumns(boolean resizeColumns)
public boolean isCustomize()
public void setCustomize(boolean customize)
public java.lang.String getTitleId()
public void setTitleId(java.lang.String titleId)
This title is used in list mode if the title is visible and as title for reports.
public java.lang.String getStyle(int row)
public void setStyle(int row,
java.lang.String style)
row - Row number affected by this style.style - A string with the CSS style suitable to use in a 'class' attribute in HTML.public void clearStyle()
setStyle(int, String)
public boolean isSortRemainingProperties()
public void setSortRemainingProperties(boolean sortRemainingProperties)
public java.util.Map[] getSelectedKeys()
public java.util.Map[] getAllKeys()
Map format) of the all
rows.
public void hideRows()
public void showRows()
public boolean isRowsHidden()
public void setRowsHidden(boolean rowsHidden)
showRows() and hideRows().
public int getPageRowCount()
public void setPageRowCount(int pageRowCount)
public IFilter getFilter()
throws XavaException
By default the filter is the defined one in the <tab/> of the
component or using the filter attribute of @Tab annotation.
But, it's possible to assign in runtime other filter using the
setFilter(IFilter) method.
XavaExceptionpublic void setFilter(IFilter filter)
This override the filter defined using <tab> or @Tab.
public void setPropertiesNames(java.lang.String propertiesNames)
throws XavaException
Tab in runtime.
This override the properties defined using <tab> or @Tab.
XavaException
public void setDefaultOrder(java.lang.String defaultOrder)
throws XavaException
Tab in runtime.
This override the default order defined using <tab> or @Tab.
XavaExceptionpublic View getCollectionView()
If this tab does not represents a collection collectionView will be null.
public void setCollectionView(View collectionView)
If this tab does not represents a collection collectionView will be null.
public boolean isFilterVisible()
public void setFilterVisible(boolean filterVisible)
public java.lang.String toString()
toString in class java.lang.Objectpublic int getAddColumnsPageRowCount()
public void setAddColumnsPageRowCount(int addColumnsPageRowCount)
public void deselectAll()
public void clearSelected()
public void setConditionValue(java.lang.String property,
java.lang.Object value)
public boolean hasTotal(int column)
public boolean hasTotal(int row,
int column)
public void addSumProperty(java.lang.String property)
It was created in v4.1 with the name addTotalProperty()
public void removeSumProperty(java.lang.String property)
It was created in v4.1 with the name removeTotalProperty()
public java.util.Set<java.lang.String> getSumPropertiesNames()
public java.util.Collection<java.lang.String> getTotalPropertiesNames()
public boolean isTotalCapable(int column)
public boolean isFixedTotal(int column)
public java.lang.Object getTotal(int column)
public java.lang.Object getTotal(int row,
int column)
public java.lang.String getTotalLabel(int row,
int column)
public java.lang.Object getTotal(java.lang.String qualifiedPropertyName)
public int getAdditionalTotalsCount()
public java.lang.String getTotalPropertiesNamesAsString()
public void setIgnorePageRowCount(boolean ignorePageRowCount)
public boolean isIgnorePageRowCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||