Class GridTab
- java.lang.Object
-
- org.compiere.model.GridTab
-
- All Implemented Interfaces:
Serializable
,EventListener
,DataStatusListener
,Evaluatee
public class GridTab extends Object implements DataStatusListener, Evaluatee, Serializable
Tab Model. - a combination of AD_Tab (the display attributes) and AD_Table information.The Tab owns also it's Table model and listens to data changes to update the Field values.
The Tab maintains the bound property: CurrentRow
Event Hierarchies: - dataChanged (from MTable) - setCurrentRow - Update all Field Values - setValue - Update Field Value - Callout
- Version:
- $Id: GridTab.java,v 1.10 2006/10/02 05:18:39 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
- BF [ 1742159 ] Editable number field for inactive record
- BF [ 1968598 ] Callout is not called if tab is processed
- BF [ 2104022 ] GridTab.processCallout: throws NPE if callout returns null
- FR [ 2846871 ] Add method org.compiere.model.GridTab.getIncludedTabs https://sourceforge.net/p/adempiere/feature-requests/805/, Teo Sarca, teo.sarca@gmail.com
- BF [ 2873323 ] ABP: Do not concatenate strings in SQL queries https://sourceforge.net/p/adempiere/feature-requests/845/
- BF [ 2874109 ] Tab ORDER BY clause is not supporting context variables https://sourceforge.net/p/adempiere/bugs/2162/
- BF [ 2905287 ] GridTab query is not build correctly https://sourceforge.net/p/adempiere/bugs/2242/
- BF [ 3007342 ] Included tab context conflict issue https://sourceforge.net/p/adempiere/bugs/2409/, Victor Perez , e-Evolution.SC
- FR [1877902] Implement JSR 223 Scripting APIs to Callout
- BF [ 2910358 ] Error in context when a field is found in different tabs. https://sourceforge.net/p/adempiere/bugs/2255/
- BF [ 2910368 ] Error in context when IsActive field is found in different https://sourceforge.net/p/adempiere/bugs/2256/, Carlos Ruiz, qss FR [1877902], Cristina Ghita, www.arhipac.ro FR [2870645] Set null value for an ID, Paul Bowden, phib BF 2900767 Zoom to child tab - inefficient queries
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CTX_AccessLevel
static String
CTX_AD_Tab_ID
static String
CTX_AD_Tab_UU
static String
CTX_AD_Table_ID
static String
CTX_AD_Table_UU
static String
CTX_FindSQL
static String
CTX_IsAllowAdvancedLookup
static String
CTX_IsLookupOnlySelection
static String
CTX_IsSortTab
static String
CTX_KeyColumnName
static String
CTX_LinkColumnName
static String
CTX_Name
static String
CTX_SQL
static String
CTX_TabLevel
static String
DEFAULT_STATUS_MESSAGE
boolean
isQuickForm
protected CLogger
log
Loggerprotected EventListenerList
m_listenerList
A list of event listeners for this component.static String
PROPERTY
Property Change Type
-
Constructor Summary
Constructors Constructor Description GridTab(GridTabVO vo, GridWindow w)
Create Tab (Model) from Value Object.GridTab(GridTabVO vo, GridWindow w, boolean virtual)
Create Tab (Model) from Value Object.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addDataStatusListener(DataStatusListener l)
void
addPropertyChangeListener(PropertyChangeListener l)
void
addStateChangeListener(StateChangeListener l)
void
addToSelection(int rowIndex)
boolean
canHaveAttachment()
Can this tab have Attachments?.void
clearSelection()
boolean
dataDelete()
Delete current Rowvoid
dataIgnore()
Ignore data changesboolean
dataNew(boolean copy)
Create (copy) new Row and process Calloutsvoid
dataRefresh()
Refresh current row datavoid
dataRefresh(boolean fireEvent)
Refresh current row datavoid
dataRefresh(int row)
Refresh row datavoid
dataRefresh(int row, boolean fireEvent)
Refresh row datavoid
dataRefreshAll()
Refresh all datavoid
dataRefreshAll(boolean fireEvent)
Refresh all datavoid
dataRefreshAll(boolean fireEvent, boolean retainedCurrentRow)
Refresh all databoolean
dataSave(boolean manualCmd)
Unconditionally Save datavoid
dataStatusChanged(DataStatusEvent e)
Data Status Listener from MTableprotected void
dispose()
Dispose - clean up resourcesvoid
enableEvents()
Enable Events - enable data events of tabs (add listeners)void
fireDataStatusEEvent(String AD_Message, String info, boolean isError)
Create and fire Data Status Error Eventvoid
fireDataStatusEEvent(ValueNamePair errorLog)
Create and fire Data Status Error Event (from Error Log)String
get_ValueAsString(String variableName)
Get Variable Value (Evaluatee)String
get_ValueAsString(Properties ctx, String variableName)
Get Variable Value (Evaluatee)Callout[]
getActiveCalloutInstance()
String[]
getActiveCallouts()
int
getAD_AttachmentID()
Get Attachment_ID for current record.int
getAD_ColumnSortOrder_ID()
Get Order column for sort tabint
getAD_ColumnSortYesNo_ID()
Get Yes/No column for sort tabint
getAD_PostIt_ID()
Get PostItID for this record.int
getAD_Process_ID()
Get Process IDString
getAD_Process_UU()
int
getAD_Tab_ID()
Get Tab IDString
getAD_Tab_UU()
int
getAD_Table_ID()
Get Table IDint
getAD_Window_ID()
Get Window IDICalloutUI
getCalloutUI()
int
getCM_ChatID()
Get Chat_ID for this record.String
getCommitWarning()
Get Commit Warningint
getCurrentRow()
Get Current RowArrayList<GridField>
getDependantFields(String columnName)
Get dependents fields of columnNameArrayList<String>
getDependentOn()
Get a list of variables, this tab is dependent onString
getDescription()
Get Description of TabString
getDisplayLogic()
Get Display LogicGridField
getField(int index)
Get Field by indexGridField
getField(String columnName)
Get Field by DB column nameint
getFieldCount()
Get Column/Field CountGridField[]
getFields()
Get all FieldsGridWindow
getGridWindow()
String
getHelp()
Get Help of TabIcon
getIcon()
Get Tab Iconint
getIncluded_Tab_ID()
Deprecated.the functionality related to AD_Tab.Included_Tab_ID was not developedList<GridTab>
getIncludedTabs()
int
getKeyColumnIndex()
String
getKeyColumnName()
Return the name of the key column - may be ""int
getKeyID(int row)
Get Key ID of rowString
getLinkColumnName()
Return Name of link columnint
getMaxQueryRecords()
Get Max Query Records.protected GridTable
getMTable()
Return Table ModelString
getName()
Get Name of Tabint
getNumColumns()
ArrayList<String>
getParentColumnNames()
Return Parent ArrayListGridTab
getParentTab()
MQuery
getQuery()
Get Queryint
getRecord_ID()
Get Current Table Key IDint
getRowCount()
Get RowCountint[]
getSelection()
String
getStatusLine()
Status Line support Depending on Window/Tab returns transaction infoString
getStatusLinesWidget()
Widget support Depending on Window/Tab returns widget lines infoGridTable
getTableModel()
Get TableModel.String
getTableName()
Get TableNameint
getTabLevel()
Get Tab Levelint
getTabNo()
Get TabNoString
getTabType()
get Tab TypeString
getTreeDisplayedOn()
Where the tree should be shownString
getTrxInfo()
Deprecated.use getStatusLine and configure Status Line insteadObject
getValue(int row, String columnName)
Get Value of Field in rowObject
getValue(String columnName)
Get Value of Field with columnNameObject
getValue(GridField field)
Get Value of Fieldboolean
getValueAsBoolean(String columnName)
Get Boolean Value of Field with columnName.GridTabVO
getVO()
String
getWhereClause()
Get Tab Where ClauseString
getWhereExtended()
Get extended Where Clause (parent link)int
getWindowNo()
Get WindowNoboolean
hasAttachment()
Returns true, if current row has an Attachmentboolean
hasChangedCurrentTabAndParents()
boolean
hasChat()
Returns true, if current row has a Chatboolean
hasDependants(String columnName)
Has this field dependents ?boolean
hasPostIt()
boolean
hasTemplate()
Returns true, if this tab have templates allowed with current roleboolean
initTab(boolean async)
Initialize Tab with record from AD_Tab_vboolean
isActive()
Is the current record activeboolean
IsAllowAdvancedLookup()
Is Allow Advanced Lookup panel?boolean
isAlwaysUpdateField()
Tab contains Always Update Fieldboolean
isCurrent()
Is the tab current?.boolean
isDeleteRecord()
Can we Delete Records?boolean
isDetail()
Returns true if this is a detail recordboolean
isDisplayed()
Is the Tab Visible.boolean
isHighVolume()
Is High Volume?boolean
isIncluded()
Is Tab Included in other Tabboolean
isInsertRecord()
Can we Insert Records?boolean
isLoadComplete()
boolean
isLocked()
Record Is Lockedboolean
IsLookupOnlySelection()
Is Lookup Only By Selection Fields?boolean
isNew()
boolean
isOnlyCurrentRows()
Are Only Current Rows displayedboolean
isOpen()
Is the tab/table currently openboolean
isPrinted()
Is Printed (Document can be printed)boolean
isProcessed()
Is Processedboolean
isQueryActive()
Is Query Activeboolean
isQueryMax(int noRecords)
Over max Queryboolean
isQueryNewRecord()
Is Query New Recordboolean
isQueryRequire(int noRecords)
Require Queryboolean
isQuickForm()
boolean
isReadOnly()
Is Read Only?boolean
isSelected(int rowIndex)
boolean
isSingleRow()
Is Single Rowboolean
isSortTab()
Is Sort Tabboolean
isTreeTab()
Has Treeboolean
isUpdateWindowContext()
void
loadLocks()
Load Locks for Table and Userprotected boolean
loadTab()
void
lock(Properties ctx, int Record_ID, boolean lock)
Lock Recordint
navigate(int targetRow)
Navigate absolute - goto Row - (zero based)int
navigateCurrent()
Navigate to current now (reload)int
navigateRelative(int rowChange)
Navigate relatively - i.e. plus/minus from current positionboolean
needSave(boolean rowChange, boolean onlyRealChange)
Do we need to Save?String
processCallout(GridField field)
Process Callout(s).String
processFieldChange(GridField changedField)
Process Field Change - evaluate Dependencies and process Callouts.void
query(boolean onlyCurrentRows)
Assemble whereClause and query MTable and position to row 0.void
query(boolean onlyCurrentRows, int onlyCurrentDays, int maxRows)
Assemble whereClause and query MTable and position to row 0.void
refreshParentTabs()
refresh current row of parent tabsvoid
refreshParentTabs(boolean fireParentEvent)
refresh current row of parent tabsvoid
removeDataStatusListener(DataStatusListener l)
boolean
removeFromSelection(int rowIndex)
void
removePropertyChangeListener(PropertyChangeListener l)
void
removeStateChangeListener(StateChangeListener l)
void
reset()
reset to emptyvoid
resetDetailForNewParentRecord()
reset detail data grid when parent tab current record is new and not saved yetvoid
setCalloutUI(ICalloutUI calloutUI)
void
setCurrentRow(int row)
Set current row - used for deleteSelectionint
setCurrentRow(int newCurrentRow, boolean fireEvents)
Set current row and load data into fields.void
setFieldVFormat(String identifier, String strNewFormat)
Feature Request [1707462] Enable runtime change of VFormatvoid
setIncluded(boolean isIncluded)
Deprecated.The method getIncluded now validate against the structure, this method is called nowherevoid
setLinkColumnName(String linkColumnName)
Set Name of link column.void
setQuery(MQuery query)
Set Queryvoid
setQuickForm(boolean isQuickForm)
void
setSingleRow(boolean isSingleRow)
Set Single Row.void
setUpdateWindowContext(boolean updateWindowContext)
String
setValue(String columnName, Object value)
Set New Value and call CalloutString
setValue(GridField field, Object value)
Set New Value and call Calloutvoid
switchRows(int from, int to, int sortColumn, boolean ascending)
Switches the line/seqNo of the two rowsString
toString()
toStringvoid
updateDataStatusEventProperties(DataStatusEvent e)
updateDataStatusEvent
properties from gridTab
-
-
-
Field Detail
-
DEFAULT_STATUS_MESSAGE
public static final String DEFAULT_STATUS_MESSAGE
- See Also:
- Constant Field Values
-
PROPERTY
public static final String PROPERTY
Property Change Type- See Also:
- Constant Field Values
-
m_listenerList
protected EventListenerList m_listenerList
A list of event listeners for this component.
-
log
protected CLogger log
Logger
-
isQuickForm
public boolean isQuickForm
-
CTX_KeyColumnName
public static final String CTX_KeyColumnName
- See Also:
- Constant Field Values
-
CTX_LinkColumnName
public static final String CTX_LinkColumnName
- See Also:
- Constant Field Values
-
CTX_TabLevel
public static final String CTX_TabLevel
- See Also:
- Constant Field Values
-
CTX_AccessLevel
public static final String CTX_AccessLevel
- See Also:
- Constant Field Values
-
CTX_AD_Tab_ID
public static final String CTX_AD_Tab_ID
- See Also:
- Constant Field Values
-
CTX_AD_Tab_UU
public static final String CTX_AD_Tab_UU
- See Also:
- Constant Field Values
-
CTX_Name
public static final String CTX_Name
- See Also:
- Constant Field Values
-
CTX_AD_Table_ID
public static final String CTX_AD_Table_ID
- See Also:
- Constant Field Values
-
CTX_AD_Table_UU
public static final String CTX_AD_Table_UU
- See Also:
- Constant Field Values
-
CTX_FindSQL
public static final String CTX_FindSQL
- See Also:
- Constant Field Values
-
CTX_SQL
public static final String CTX_SQL
- See Also:
- Constant Field Values
-
CTX_IsSortTab
public static final String CTX_IsSortTab
- See Also:
- Constant Field Values
-
CTX_IsLookupOnlySelection
public static final String CTX_IsLookupOnlySelection
- See Also:
- Constant Field Values
-
CTX_IsAllowAdvancedLookup
public static final String CTX_IsAllowAdvancedLookup
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridTab
public GridTab(GridTabVO vo, GridWindow w)
Create Tab (Model) from Value Object.MTab provides a property listener for changed rows and a DataStatusListener for communicating changes of the underlying data
- Parameters:
vo
- Value Objectw
-
-
GridTab
public GridTab(GridTabVO vo, GridWindow w, boolean virtual)
Create Tab (Model) from Value Object.MTab provides a property listener for changed rows and a DataStatusListener for communicating changes of the underlying data
- Parameters:
vo
- Value Objectw
-virtual
-
-
-
Method Detail
-
isLoadComplete
public boolean isLoadComplete()
-
initTab
public boolean initTab(boolean async)
Initialize Tab with record from AD_Tab_v- Parameters:
async
- async- Returns:
- true, if correctly initialized (ignored)
-
loadTab
protected boolean loadTab()
-
dispose
protected void dispose()
Dispose - clean up resources
-
getDependentOn
public ArrayList<String> getDependentOn()
Get a list of variables, this tab is dependent on. - for display purposes- Returns:
- ArrayList
-
getDisplayLogic
public String getDisplayLogic()
Get Display Logic- Returns:
- display logic
-
getTableModel
public GridTable getTableModel()
Get TableModel. Do not directly communicate with the table model, but through the methods of this class- Returns:
- Table Model
-
getIcon
public Icon getIcon()
Get Tab Icon- Returns:
- Icon
-
hasDependants
public boolean hasDependants(String columnName)
Has this field dependents ?- Parameters:
columnName
- column name- Returns:
- true if column has dependent
-
getDependantFields
public ArrayList<GridField> getDependantFields(String columnName)
Get dependents fields of columnName- Parameters:
columnName
- column name- Returns:
- ArrayList with GridFields dependent on columnName
-
setQuery
public void setQuery(MQuery query)
Set Query- Parameters:
query
- query
-
getQuery
public MQuery getQuery()
Get Query- Returns:
- query
-
isQueryActive
public boolean isQueryActive()
Is Query Active- Returns:
- true if query active
-
isQueryNewRecord
public boolean isQueryNewRecord()
Is Query New Record- Returns:
- true if query active
-
enableEvents
public void enableEvents()
Enable Events - enable data events of tabs (add listeners)
-
getTabType
public String getTabType()
get Tab Type- Returns:
- String
-
query
public void query(boolean onlyCurrentRows)
Assemble whereClause and query MTable and position to row 0.Scenarios: - Never opened (full query) - query changed (full query) - Detail link value changed (full query) - otherwise (refreshAll)
- Parameters:
onlyCurrentRows
- only current rows (1 day)
-
query
public void query(boolean onlyCurrentRows, int onlyCurrentDays, int maxRows)
Assemble whereClause and query MTable and position to row 0.Scenarios: - Never opened (full query) - query changed (full query) - Detail link value changed (full query) - otherwise (refreshAll)
- Parameters:
onlyCurrentRows
- only current rowsonlyCurrentDays
- if only current row, how many days backmaxRows
- maximum rows or 0 for all
-
resetDetailForNewParentRecord
public void resetDetailForNewParentRecord()
reset detail data grid when parent tab current record is new and not saved yet
-
dataRefreshAll
public void dataRefreshAll()
Refresh all data
-
dataRefreshAll
public void dataRefreshAll(boolean fireEvent)
Refresh all data- Parameters:
fireEvent
-
-
dataRefreshAll
public void dataRefreshAll(boolean fireEvent, boolean retainedCurrentRow)
Refresh all data- Parameters:
fireEvent
-
-
dataRefresh
public void dataRefresh()
Refresh current row data
-
dataRefresh
public void dataRefresh(boolean fireEvent)
Refresh current row data- Parameters:
fireEvent
-
-
dataRefresh
public void dataRefresh(int row)
Refresh row data- Parameters:
row
- index
-
dataRefresh
public void dataRefresh(int row, boolean fireEvent)
Refresh row data- Parameters:
row
- indexfireEvent
-
-
dataSave
public boolean dataSave(boolean manualCmd)
Unconditionally Save data- Parameters:
manualCmd
- if true, no vetoable PropertyChange will be fired for save confirmation from MTable- Returns:
- true if save complete (or nor required)
-
hasChangedCurrentTabAndParents
public boolean hasChangedCurrentTabAndParents()
-
refreshParentTabs
public void refreshParentTabs()
refresh current row of parent tabs
-
refreshParentTabs
public void refreshParentTabs(boolean fireParentEvent)
refresh current row of parent tabs
-
needSave
public boolean needSave(boolean rowChange, boolean onlyRealChange)
Do we need to Save?- Parameters:
rowChange
- row changeonlyRealChange
- if true the value of a field was actually changed (e.g. for new records, which have not been changed) - default false- Returns:
- true it needs to be saved
-
dataIgnore
public void dataIgnore()
Ignore data changes
-
dataNew
public boolean dataNew(boolean copy)
Create (copy) new Row and process Callouts- Parameters:
copy
- copy- Returns:
- true if copied/new
-
dataDelete
public boolean dataDelete()
Delete current Row- Returns:
- true if deleted
-
getName
public String getName()
Get Name of Tab- Returns:
- name
-
getDescription
public String getDescription()
Get Description of Tab- Returns:
- description
-
getHelp
public String getHelp()
Get Help of Tab- Returns:
- help
-
getTabLevel
public int getTabLevel()
Get Tab Level- Returns:
- tab level
-
getCommitWarning
public String getCommitWarning()
Get Commit Warning- Returns:
- commit warning
-
getMTable
protected GridTable getMTable()
Return Table Model- Returns:
- MTable
-
getKeyColumnName
public String getKeyColumnName()
Return the name of the key column - may be ""- Returns:
- key column name
-
getKeyColumnIndex
public int getKeyColumnIndex()
-
getLinkColumnName
public String getLinkColumnName()
Return Name of link column- Returns:
- link column name
-
setLinkColumnName
public void setLinkColumnName(String linkColumnName)
Set Name of link column. Set from MWindow.loadTabData Used in MTab.isCurreny, (.setCurrentRow) .query - APanel.cmd_report and MField.isEditable and .isDefault via context- Parameters:
linkColumnName
- name of column - or sets name to AD_Column_ID, if exists
-
isCurrent
public boolean isCurrent()
Is the tab current?.Yes - Table must be open - Query String is the same - Not Detail - Old link column value is same as current one
- Returns:
- true if current
-
isOpen
public boolean isOpen()
Is the tab/table currently open- Returns:
- true if open
-
isIncluded
public boolean isIncluded()
Is Tab Included in other Tab- Returns:
- true if included
-
setIncluded
public void setIncluded(boolean isIncluded)
Deprecated.The method getIncluded now validate against the structure, this method is called nowhereIs Tab Included in other Tab- Parameters:
isIncluded
- true if included
-
isOnlyCurrentRows
public boolean isOnlyCurrentRows()
Are Only Current Rows displayed- Returns:
- true if no history
-
getParentColumnNames
public ArrayList<String> getParentColumnNames()
Return Parent ArrayList- Returns:
- parent column names
-
isDetail
public boolean isDetail()
Returns true if this is a detail record- Returns:
- true if not parent tab
-
isPrinted
public boolean isPrinted()
Is Printed (Document can be printed)- Returns:
- true if printing
-
getWindowNo
public int getWindowNo()
Get WindowNo- Returns:
- window no
-
getTabNo
public int getTabNo()
Get TabNo- Returns:
- tab no
-
getAD_Process_ID
public int getAD_Process_ID()
Get Process ID- Returns:
- Process ID
-
isHighVolume
public boolean isHighVolume()
Is High Volume?- Returns:
- true if high volume table
-
IsLookupOnlySelection
public boolean IsLookupOnlySelection()
Is Lookup Only By Selection Fields?- Returns:
- true if only selection
-
IsAllowAdvancedLookup
public boolean IsAllowAdvancedLookup()
Is Allow Advanced Lookup panel?- Returns:
- true if allow the use
-
isReadOnly
public boolean isReadOnly()
Is Read Only?- Returns:
- true if read only
-
isAlwaysUpdateField
public boolean isAlwaysUpdateField()
Tab contains Always Update Field- Returns:
- true if field with always updateable
-
isInsertRecord
public boolean isInsertRecord()
Can we Insert Records?- Returns:
- true not read only and allowed
-
isDeleteRecord
public boolean isDeleteRecord()
Can we Delete Records?- Returns:
- true not read only and allowed
-
isDisplayed
public boolean isDisplayed()
Is the Tab Visible. Called when constructing the window.- Returns:
- true, if displayed
-
get_ValueAsString
public String get_ValueAsString(String variableName)
Get Variable Value (Evaluatee)- Specified by:
get_ValueAsString
in interfaceEvaluatee
- Parameters:
variableName
- name- Returns:
- value
-
get_ValueAsString
public String get_ValueAsString(Properties ctx, String variableName)
Get Variable Value (Evaluatee)- Parameters:
ctx
- contextvariableName
- name- Returns:
- value
-
isSingleRow
public boolean isSingleRow()
Is Single Row- Returns:
- true if single row
-
setSingleRow
public void setSingleRow(boolean isSingleRow)
Set Single Row. Temporary store of current value- Parameters:
isSingleRow
- toggle
-
isTreeTab
public boolean isTreeTab()
Has Tree- Returns:
- true if tree exists
-
getTreeDisplayedOn
public String getTreeDisplayedOn()
Where the tree should be shown- Returns:
- master, detail or both
-
getAD_Tab_ID
public int getAD_Tab_ID()
Get Tab ID- Returns:
- Tab ID
-
getAD_Table_ID
public int getAD_Table_ID()
Get Table ID- Returns:
- Table ID
-
getAD_Window_ID
public int getAD_Window_ID()
Get Window ID- Returns:
- Window ID
-
getIncluded_Tab_ID
public int getIncluded_Tab_ID()
Deprecated.the functionality related to AD_Tab.Included_Tab_ID was not developedGet Included Tab ID- Returns:
- Included_Tab_ID
-
getTableName
public String getTableName()
Get TableName- Returns:
- Table Name
-
getWhereClause
public String getWhereClause()
Get Tab Where Clause- Returns:
- where clause
-
isSortTab
public boolean isSortTab()
Is Sort Tab- Returns:
- true if sort tab
-
getAD_ColumnSortOrder_ID
public int getAD_ColumnSortOrder_ID()
Get Order column for sort tab- Returns:
- AD_Column_ID
-
getAD_ColumnSortYesNo_ID
public int getAD_ColumnSortYesNo_ID()
Get Yes/No column for sort tab- Returns:
- AD_Column_ID
-
getWhereExtended
public String getWhereExtended()
Get extended Where Clause (parent link)- Returns:
- parent link
-
getTrxInfo
public String getTrxInfo()
Deprecated.use getStatusLine and configure Status Line insteadTransaction support. Depending on Table returns transaction info- Returns:
- info
-
getStatusLine
public String getStatusLine()
Status Line support Depending on Window/Tab returns transaction info- Returns:
- info
-
getStatusLinesWidget
public String getStatusLinesWidget()
Widget support Depending on Window/Tab returns widget lines info- Returns:
- info
-
canHaveAttachment
public boolean canHaveAttachment()
Can this tab have Attachments?.It can have an attachment if it has a key column ending with _ID. The key column is empty, if there is no single identifying key.
- Returns:
- true if record can have attachment
-
hasAttachment
public boolean hasAttachment()
Returns true, if current row has an Attachment- Returns:
- true if record has attachment
-
getAD_AttachmentID
public int getAD_AttachmentID()
Get Attachment_ID for current record.- Returns:
- ID or 0, if not found
-
hasChat
public boolean hasChat()
Returns true, if current row has a Chat- Returns:
- true if record has chat
-
getCM_ChatID
public int getCM_ChatID()
Get Chat_ID for this record.- Returns:
- ID or 0, if not found
-
hasPostIt
public boolean hasPostIt()
-
getAD_PostIt_ID
public int getAD_PostIt_ID()
Get PostItID for this record.- Returns:
- ID or 0, if not found
-
hasTemplate
public boolean hasTemplate()
Returns true, if this tab have templates allowed with current role- Returns:
- true if record has templates
-
loadLocks
public void loadLocks()
Load Locks for Table and User
-
isLocked
public boolean isLocked()
Record Is Locked- Returns:
- true if locked
-
lock
public void lock(Properties ctx, int Record_ID, boolean lock)
Lock Record- Parameters:
ctx
- contextRecord_ID
- idlock
- true if lock, otherwise unlock
-
dataStatusChanged
public void dataStatusChanged(DataStatusEvent e)
Data Status Listener from MTable. - get raw info and add current row information - update the current row - redistribute (fire) Data Status event- Specified by:
dataStatusChanged
in interfaceDataStatusListener
- Parameters:
e
- event
-
updateDataStatusEventProperties
public void updateDataStatusEventProperties(DataStatusEvent e)
updateDataStatusEvent
properties from gridTab- Parameters:
e
-
-
fireDataStatusEEvent
public void fireDataStatusEEvent(String AD_Message, String info, boolean isError)
Create and fire Data Status Error Event- Parameters:
AD_Message
- messageinfo
- infoisError
- if not true, it is a Warning
-
fireDataStatusEEvent
public void fireDataStatusEEvent(ValueNamePair errorLog)
Create and fire Data Status Error Event (from Error Log)- Parameters:
errorLog
- log
-
getCurrentRow
public int getCurrentRow()
Get Current Row- Returns:
- current row
-
getRecord_ID
public int getRecord_ID()
Get Current Table Key ID- Returns:
- Record_ID
-
getKeyID
public int getKeyID(int row)
Get Key ID of row- Parameters:
row
- row number- Returns:
- The Key ID of the row or -1 if not found
-
navigate
public int navigate(int targetRow)
Navigate absolute - goto Row - (zero based). - does nothing, if in current row - saves old row if required- Parameters:
targetRow
- target row- Returns:
- current row
-
navigateRelative
public int navigateRelative(int rowChange)
Navigate relatively - i.e. plus/minus from current position- Parameters:
rowChange
- row change- Returns:
- current row
-
navigateCurrent
public int navigateCurrent()
Navigate to current now (reload)- Returns:
- current row
-
setCurrentRow
public int setCurrentRow(int newCurrentRow, boolean fireEvents)
Set current row and load data into fields. If there is no row - load nulls- Parameters:
newCurrentRow
- new current rowfireEvents
- fire events- Returns:
- current row
-
setCurrentRow
public void setCurrentRow(int row)
Set current row - used for deleteSelection
-
getRowCount
public int getRowCount()
Get RowCount- Returns:
- row count
-
getFieldCount
public int getFieldCount()
Get Column/Field Count- Returns:
- field count
-
getField
public GridField getField(int index)
Get Field by index- Parameters:
index
- index- Returns:
- MField
-
getField
public GridField getField(String columnName)
Get Field by DB column name- Parameters:
columnName
- column name- Returns:
- MField
-
getFields
public GridField[] getFields()
Get all Fields- Returns:
- MFields
-
setValue
public String setValue(String columnName, Object value)
Set New Value and call Callout- Parameters:
columnName
- database column namevalue
- value- Returns:
- error message or ""
-
setValue
public String setValue(GridField field, Object value)
Set New Value and call Callout- Parameters:
field
- fieldvalue
- value- Returns:
- error message or ""
-
isProcessed
public boolean isProcessed()
Is Processed- Returns:
- true if current record is processed
-
isActive
public boolean isActive()
Is the current record active- Returns:
- true if current record is active author Teo Sarca - BF [ 1742159 ]
-
processFieldChange
public String processFieldChange(GridField changedField)
Process Field Change - evaluate Dependencies and process Callouts. called from MTab.setValue or GridController.dataStatusChanged- Parameters:
changedField
- changed field- Returns:
- error message or ""
-
getActiveCallouts
public String[] getActiveCallouts()
- Returns:
- list of active call out for this tab
-
getActiveCalloutInstance
public Callout[] getActiveCalloutInstance()
- Returns:
- list of active call out instance for this tab
-
processCallout
public String processCallout(GridField field)
Process Callout(s).The Callout is in the string of "class.method;class.method;" If there is no class name, i.e. only a method name, the class is regarded as CalloutSystem. The class needs to comply with the Interface Callout. For a limited time, the old notation of Sx_matheod / Ux_menthod is maintained.
- Parameters:
field
- field- Returns:
- error message or ""
- See Also:
Callout
-
getValue
public Object getValue(String columnName)
Get Value of Field with columnName- Parameters:
columnName
- column name- Returns:
- value
-
getValueAsBoolean
public boolean getValueAsBoolean(String columnName)
Get Boolean Value of Field with columnName. If there is no column with the given name, the context for current window will be checked.- Parameters:
columnName
- column name- Returns:
- boolean value or false if the field was not found author Teo Sarca
-
getValue
public Object getValue(GridField field)
Get Value of Field- Parameters:
field
- field- Returns:
- value
-
getValue
public Object getValue(int row, String columnName)
Get Value of Field in row- Parameters:
row
- rowcolumnName
- column name- Returns:
- value
-
toString
public String toString()
toString
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
- Parameters:
l
- listener
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)
- Parameters:
l
- listener
-
removeDataStatusListener
public void removeDataStatusListener(DataStatusListener l)
- Parameters:
l
- listener
-
addDataStatusListener
public void addDataStatusListener(DataStatusListener l)
- Parameters:
l
- listener
-
addStateChangeListener
public void addStateChangeListener(StateChangeListener l)
- Parameters:
l
-
-
removeStateChangeListener
public void removeStateChangeListener(StateChangeListener l)
- Parameters:
l
-
-
setFieldVFormat
public void setFieldVFormat(String identifier, String strNewFormat)
Feature Request [1707462] Enable runtime change of VFormat- Parameters:
identifier
- field indentstrNewFormat
- new mask author fer_luck
-
switchRows
public void switchRows(int from, int to, int sortColumn, boolean ascending)
Switches the line/seqNo of the two rows- Parameters:
from
- row indexto
- row indexsortColumn
- column index of sort columnascending
- sorting modus
-
getIncludedTabs
public List<GridTab> getIncludedTabs()
- Returns:
- list of all tabs included in this tab
-
getParentTab
public GridTab getParentTab()
-
getNumColumns
public int getNumColumns()
-
isNew
public boolean isNew()
-
getAD_Tab_UU
public String getAD_Tab_UU()
-
getAD_Process_UU
public String getAD_Process_UU()
-
isUpdateWindowContext
public boolean isUpdateWindowContext()
-
setUpdateWindowContext
public void setUpdateWindowContext(boolean updateWindowContext)
-
addToSelection
public void addToSelection(int rowIndex)
-
removeFromSelection
public boolean removeFromSelection(int rowIndex)
-
getSelection
public int[] getSelection()
-
isSelected
public boolean isSelected(int rowIndex)
-
clearSelection
public void clearSelection()
-
isQuickForm
public boolean isQuickForm()
-
setQuickForm
public void setQuickForm(boolean isQuickForm)
-
getGridWindow
public GridWindow getGridWindow()
-
getVO
public GridTabVO getVO()
-
getCalloutUI
public ICalloutUI getCalloutUI()
-
setCalloutUI
public void setCalloutUI(ICalloutUI calloutUI)
-
getMaxQueryRecords
public int getMaxQueryRecords()
Get Max Query Records.- Returns:
- If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records
-
isQueryRequire
public boolean isQueryRequire(int noRecords)
Require Query- Parameters:
noRecords
- records- Returns:
- true if query required
-
isQueryMax
public boolean isQueryMax(int noRecords)
Over max Query- Parameters:
noRecords
- records- Returns:
- true if over max query
-
reset
public void reset()
reset to empty
-
-