public class Tab
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
class |
Tab.Configuration |
Modifier and Type | Field and Description |
---|---|
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 |
DESCRIPTIONS_LIST_SEPARATOR |
static java.lang.String |
EMPTY_COMPARATOR |
static java.lang.String |
ENDS_COMPARATOR |
static java.lang.String |
EQ_COMPARATOR |
static java.lang.String |
GE_COMPARATOR |
static java.lang.String |
GROUP_COUNT_PROPERTY |
static java.lang.String |
GT_COMPARATOR |
static java.lang.String |
IN_COMPARATOR |
static java.lang.String |
LE_COMPARATOR |
static java.lang.String |
LT_COMPARATOR |
static int |
MAX_CONFIGURATIONS_COUNT |
static java.lang.String |
MONTH_COMPARATOR |
static java.lang.String |
NE_COMPARATOR |
static java.lang.String |
NOT_CONTAINS_COMPARATOR |
static java.lang.String |
NOT_EMPTY_COMPARATOR |
static java.lang.String |
NOT_IN_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 and Description |
---|
Tab() |
Tab(boolean cancelSavingPreferences)
Creates a tab that will not save the preferences values.
|
Modifier and Type | Method and Description |
---|---|
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 |
clearCondition() |
void |
clearProperties() |
void |
clearSelected()
Deprecated.
Since v4.7, use deselectAll() instead
|
void |
clearStyle()
Clear the effect of all calls to
setStyle(int, String) |
Tab |
clone() |
boolean |
containsProperty(java.lang.String qualifiedName) |
void |
createConfiguration() |
void |
cutOutRow(java.util.Map keyValues) |
void |
deselect(int row) |
void |
deselect(java.util.Map key) |
void |
deselectAll() |
void |
filter() |
void |
friendExecuteJspDeselect(java.lang.String deselect) |
static int |
friendViewGetDefaultColumnWidth(MetaProperty p) |
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() |
java.lang.String |
getConfigurationName() |
java.util.Collection<Tab.Configuration> |
getConfigurations() |
int |
getConfigurationsCount() |
java.lang.String |
getEditor() |
Messages |
getErrors() |
IFilter |
getFilter()
Filter used currently by this tab.
|
int |
getFinalIndex() |
java.lang.String |
getGroupBy() |
int |
getInitialIndex() |
int |
getLastPage() |
java.util.List<MetaProperty> |
getMetaProperties() |
java.util.Collection<MetaProperty> |
getMetaPropertiesBeforeGrouping() |
java.util.Collection<MetaProperty> |
getMetaPropertiesGroupBy() |
java.util.List<MetaProperty> |
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 |
getPreferencesNodeName(java.lang.String prefix) |
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 |
getTotalPropertyName(int row,
int column) |
int |
getTotalSize() |
void |
goPage(int page)
1 is the first page
|
void |
groupBy(java.lang.String property) |
boolean |
hasSelected() |
boolean |
hasTotal(int column) |
boolean |
hasTotal(int row,
int column) |
void |
hideRows() |
boolean |
isAllConfiguration() |
boolean |
isColumnsToAddUntilSecondLevel() |
boolean |
isCustomizeAllowed() |
boolean |
isFilterVisible() |
boolean |
isFixedTotal(int column) |
boolean |
isFromCollection(MetaProperty p) |
boolean |
isIgnorePageRowCount() |
boolean |
isLastPage() |
boolean |
isNotResetNextTime() |
boolean |
isOrderAscending(java.lang.String name) |
boolean |
isOrderAscending2(java.lang.String name) |
boolean |
isOrderCapable(MetaProperty p) |
boolean |
isOrderDescending(java.lang.String name) |
boolean |
isOrderDescending2(java.lang.String name) |
boolean |
isResizeColumns() |
boolean |
isRowsHidden() |
boolean |
isSaveConfigurationAllowed() |
boolean |
isSelected(int row) |
boolean |
isTitleVisible() |
boolean |
isTotalCapable(int column) |
boolean |
isTotalCapable(MetaProperty p) |
boolean |
isTotalEditable(int row,
int column) |
void |
moveProperty(int from,
int to) |
void |
orderBy(java.lang.String property) |
void |
pageBack() |
void |
pageForward() |
void |
reloadMetaModel() |
void |
removeConfiguration() |
void |
removeProperty(int index) |
void |
removeProperty(java.lang.String propertyName) |
void |
removeSumProperty(java.lang.String property)
Remove total property.
|
void |
reset() |
void |
restoreDefaultProperties() |
void |
saveConfiguration() |
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 |
setColumnsToAddUntilSecondLevel(boolean columnsToAddUntilSecondLevel) |
void |
setColumnWidth(int columnIndex,
int width) |
void |
setConditionComparators(java.util.Collection<java.lang.String> comparators) |
void |
setConditionParameters() |
void |
setConditionValue(java.lang.String property,
java.lang.Object value) |
void |
setConditionValues(java.util.Collection<java.lang.String> values) |
void |
setConfigurationId(int configurationId) |
void |
setConfigurationName(java.lang.String newName) |
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 |
setEditor(java.lang.String editor) |
void |
setErrors(Messages errors) |
void |
setFilter(IFilter filter)
Sets the filter for this tab in runtime.
|
void |
setFilterVisible(boolean filterVisible) |
void |
setIgnorePageRowCount(boolean ignorePageRowCount) |
void |
setLabel(java.lang.String propertyName,
java.lang.String label) |
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.
|
static void |
setRefiner(java.lang.Object newRefiner) |
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 |
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() |
public static final java.lang.String COLLECTION_PREFIX
public static final java.lang.String TAB_RESETED_PREFIX
public static final java.lang.String DESCRIPTIONS_LIST_SEPARATOR
public static final int MAX_CONFIGURATIONS_COUNT
public static final java.lang.String GROUP_COUNT_PROPERTY
public static final java.lang.String STARTS_COMPARATOR
public static final java.lang.String CONTAINS_COMPARATOR
public static final java.lang.String ENDS_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
public static final java.lang.String IN_COMPARATOR
public static final java.lang.String NOT_IN_COMPARATOR
public static final java.lang.String EMPTY_COMPARATOR
public static final java.lang.String NOT_EMPTY_COMPARATOR
public Tab()
public Tab(boolean cancelSavingPreferences)
cancelSavingPreferences
- If the parameter is true, no preferences are stored.public static void setRefiner(java.lang.Object newRefiner)
public java.util.List<MetaProperty> getMetaProperties()
public boolean isColumnsToAddUntilSecondLevel()
public void setColumnsToAddUntilSecondLevel(boolean columnsToAddUntilSecondLevel)
public java.util.Collection getColumnsToAdd() throws XavaException
XavaException
public java.util.List<MetaProperty> 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
XavaException
public 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 boolean containsProperty(java.lang.String qualifiedName)
public void setMetaRowStyles(java.util.Collection styles) throws XavaException
XavaException
public IXTableModel getTableModel()
Suitable for UI.
public IXTableModel getAllDataTableModel() throws java.lang.Exception
Suitable for report generation (for example).
java.lang.Exception
public 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 void pageBack()
public void goPage(int page)
page
- public int getPage()
public int getTotalSize()
public void clearCondition()
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
XavaException
public java.lang.String[] getConditionValues()
public java.lang.String[] getConditionValuesTo()
public java.lang.String[] getConditionComparators()
public void groupBy(java.lang.String property)
public java.lang.String getGroupBy()
public java.util.Collection<MetaProperty> getMetaPropertiesBeforeGrouping()
public java.util.Collection<MetaProperty> getMetaPropertiesGroupBy()
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 void reloadMetaModel()
public java.lang.String getTabName()
public void setTabName(java.lang.String newTabName)
public void setRequest(HttpServletRequest request)
public void filter()
public void setConditionParameters()
public void setTabObject(java.lang.String tabObject)
public java.lang.String getPreferencesNodeName(java.lang.String prefix)
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 void createConfiguration()
public void saveConfiguration()
public int getConfigurationsCount()
public java.util.Collection<Tab.Configuration> getConfigurations()
public void setConfigurationId(int configurationId)
public void setConfigurationName(java.lang.String newName)
public void removeConfiguration() throws java.lang.Exception
java.lang.Exception
public java.lang.String getTitle() throws XavaException
XavaException
public java.lang.String getConfigurationName() throws XavaException
XavaException
public boolean isAllConfiguration()
public 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
XavaException
public 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 setLabel(java.lang.String propertyName, java.lang.String label)
propertyName
- label
- public void removeProperty(int index) throws XavaException
XavaException
public void removeProperty(java.lang.String propertyName) throws XavaException
XavaException
public void moveProperty(int from, int to)
public void restoreDefaultProperties() throws XavaException
XavaException
public void clearProperties() throws XavaException
XavaException
public boolean isCustomizeAllowed()
public void setCustomizeAllowed(boolean customizeAllowed)
public boolean isResizeColumns()
public void setResizeColumns(boolean resizeColumns)
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 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.
XavaException
public 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.
XavaException
public 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.Object
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 boolean isTotalEditable(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 isTotalCapable(MetaProperty p)
public boolean isOrderCapable(MetaProperty p)
public boolean isFromCollection(MetaProperty p)
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.String getTotalPropertyName(int row, int column)
public java.lang.Object getTotal(java.lang.String qualifiedPropertyName)
public int getAdditionalTotalsCount()
public void setIgnorePageRowCount(boolean ignorePageRowCount)
public boolean isIgnorePageRowCount()
public void cutOutRow(java.util.Map keyValues) throws XavaException
XavaException
public Messages getErrors()
public void setErrors(Messages errors)
public java.lang.String getEditor()
public void setEditor(java.lang.String editor)
public Tab clone()
clone
in class java.lang.Object
public boolean isSaveConfigurationAllowed()