public interface FormContextI extends BreadcrumbContextI
These contexts can be hierarchically linked together. This allows for the representation of complex data connections. For example, it can be used for true sub-forms within their own windows.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
$0 |
static java.lang.ThreadLocal<DefaultBreadcrumbFinder> |
BREADCRUMB_FINDER_FOR_THREAD |
Modifier and Type | Method and Description |
---|---|
void |
addFormContextListener(FormContextListenerI l) |
void |
addSubContext(FormContextI a) |
void |
afterSave() |
void |
appendThisAndAllSubContexts(java.util.List l) |
void |
beforeSave() |
boolean |
boWasChangedExternally() |
VisibilityI |
cacheVisibility(VisibilityI v) |
void |
clearCachedVisibility() |
void |
clearTransaction() |
void |
close() |
FormContextI |
createSubFormContext() |
void |
disableConflictCheckDuringSave()
Don't ignore conflicts during saving anymore if previously enabled.
|
void |
enableConflictCheckDuringSave()
Registers a default
FormContextSaveHandlerI that doesn't ignore conflicts during saving. |
static DefaultBreadcrumbFinder |
enterBreadcrumb(FormContextI ftx)
Establishes a new breadcrumb context for the current thread and returns the associated finder.
|
static void |
exitBreadcrumb(FormContextI ftx)
Clears the breadcrumb context for the current thread.
|
default FormElementI |
findOnlyFormElement(java.lang.Class<? extends FormElementI> ofType)
Find and return the only form element of the given type in the entire form context.
|
java.util.LinkedHashMap |
getAllActionsOfKind(int kind) |
FormElementI |
getAt(java.lang.String n) |
Transaction.Savepoint |
getBeforeUserChangesSavepoint() |
BO |
getBO() |
BO |
getBO(boolean _synchronized) |
BOLoaderI |
getBOLoader() |
BO[] |
getBOs() |
default BO |
getContextBO()
Gets the associated business object for this specific context, returning the value directly.
|
ClientContextI |
getCtx() |
DBManEventProviderI |
getEventProvider() |
FormElementI |
getFormElement() |
default javax.swing.ImageIcon |
getIcon(java.lang.String name) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.awt.Color color) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.awt.Color color,
boolean allowUnderlay) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.awt.Color color) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.awt.Color color,
boolean allowUnderlay) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.lang.String configuration) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.lang.String configuration,
java.awt.Color color) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.lang.String configuration,
java.awt.Color color,
boolean allowUnderlay) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.lang.String configuration) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.lang.String configuration,
java.awt.Color color) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.lang.String configuration,
java.awt.Color color,
boolean allowUnderlay) |
java.awt.Component |
getIconContextObject() |
javax.swing.JRootPane |
getJRootPane() |
EntityI |
getLowestCommonDenominateEntity() |
FormElementI |
getNamedElement(java.lang.String n) |
FormContextI |
getParent() |
default BreadcrumbContextI |
getParentBreadcrumbContext()
Gets the parent context of the current context, returning the value directly.
|
java.lang.String |
getPath() |
void |
getPath(java.lang.StringBuilder s) |
FormContextI |
getRoot() |
javax.swing.RootPaneContainer |
getRootPaneContainer() |
FormContextSaveHandlerI |
getSaveHandler() |
BeanShellScript |
getScript() |
java.util.Map |
getScriptParameters() |
java.util.List |
getSubContexts() |
java.util.Iterator |
getSubContextsIterator() |
FormContextI[] |
getThisAndAllSubContextsAsArray() |
Transaction |
getTransaction() |
VisibilityI |
getVisibility() |
boolean |
hasCachedVisibility() |
boolean |
hasScript() |
boolean |
hasUnsavedFormData() |
boolean |
hasUnsavedUserData() |
void |
initScript() |
void |
invalidateAllSubContextsCache() |
boolean |
isClosed() |
boolean |
isRoot() |
boolean |
isSyncEventHandlingPaused()
If true, then {link #sync()} calls for this element should be ignored, e.g. because the form is currently saving.
|
void |
mdiActivate(MDIElementI me) |
void |
mdiClose(MDIElementI me) |
void |
mdiDeactivate(MDIElementI me) |
void |
mdiOpen(MDIElementI me) |
boolean |
pauseFiringNewProcs()
Creates a token to pause updating the GUI with changes in the Transaction for a while.
|
void |
refreshBO(FormContextI _realFtx,
java.lang.String _propertyname,
boolean _transactionControl,
boolean _autoCreate,
electric.xml.Element _confRoot) |
void |
refreshForms()
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI.
|
void |
refreshForms(int from)
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI.
|
void |
refreshForms(int from,
long onlyBOId,
long ifNotSince)
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI.
|
void |
refreshFormsFromInitialViewRefresh()
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI in the context of an initial view refresh.
|
void |
refreshView()
Only refreshes the window titles and other 'outside' stuff, not the form itself or parts of it.
|
void |
removeAllFormContextListeners() |
void |
removeFormContextListener(FormContextListenerI l) |
void |
removeSubContext(FormContextI a) |
void |
resetBOWasChangedExternally() |
boolean |
resumeFiringNewProcs()
Resumes updates to the GUI after a previous call of pauseFiringNewProcs(),
unless updates are inh, due to changes in the Transaction for a while.
|
boolean |
saveFormData() |
boolean |
saveFormData(boolean willCloseRightAfter) |
void |
setBeforeUserChangesSavepoint(Transaction.Savepoint _sp) |
boolean |
setBO(BO bo) |
void |
setBOLoader(BOLoaderI bol) |
void |
setEditable(boolean b) |
void |
setEditable(boolean b,
boolean dontRefresh) |
void |
setFormElement(FormElementI j) |
void |
setJRootPane(javax.swing.JRootPane rp) |
void |
setLowestCommonDenominateEntity(EntityI ent) |
void |
setNamedElement(java.lang.String n,
FormElementI e) |
void |
setParent(FormContextI a) |
void |
setRootPaneContainer(javax.swing.RootPaneContainer rpc) |
void |
setSaveHandler(FormContextSaveHandlerI sh) |
void |
setScript(BeanShellScript b) |
void |
setScriptParameters(java.util.Map m) |
void |
setTransaction(Transaction tx) |
void |
setVisibilityTransient() |
void |
startListeningNewProcs()
internal
|
void |
sync()
Synchronize the data of the form and the model
|
void |
toast(java.lang.String text) |
void |
toast(java.lang.String text,
int delay) |
void |
toastError(java.lang.String text) |
void |
toastError(java.lang.String text,
int delay) |
boolean |
tryFocus()
Attempts to set the keyboard focus to an appropriate component within this
form context.
|
findFirstBO, findFirstBOOfType, findFirstBOWhere, findParentBO
static final java.lang.String $0
static final java.lang.ThreadLocal<DefaultBreadcrumbFinder> BREADCRUMB_FINDER_FOR_THREAD
static DefaultBreadcrumbFinder enterBreadcrumb(FormContextI ftx)
This method should be called before a form element's attribute accessor (getter, setter, etc.) is called to enable breadcrumb navigation in the form contexts of the current view/UI.
It retrieves the thread-local finder, initializing a new one if it doesn't exist. It then
sets the provided FormContextI
as the starting context for the finder, but only if
the finder's context is not already set. This prevents overwriting an existing context, which
is crucial for nested accessor calls, as only the initial starting point in the structure
shall be the starting point of the breadcrumb navigation.
Moreover, the ThreadLocal is by choice not an InheritableThreadLocal, as any threads that are spawned off the accessor should be ignorant of the breadcrumb navigation. They may run in parallel or longer than the parent thread, posing the risk of the parent thread being reused for a new accessor call that changes the value of the InheritableThreadLocal for the spawned thread, thus creating a false Breadcrumb navigation for that child thread.
If the context is successfully set, this method also updates the thread-local
finder in the Breadcrumb
convenience class, providing a static entry point
for forms to access the current breadcrumb context finder.
ftx
- The FormContextI
instance associated with the current form element.DefaultBreadcrumbFinder
instance associated with the current thread.static void exitBreadcrumb(FormContextI ftx)
This method should be called after a form element's attribute accessor call has
ended (preferably in a finally
block) to clear the thread-local context. It
retrieves the finder for the current thread and attempts to clear its context, but
only if it matches the provided FormContextI
instance. This prevents
unintended side effects in nested contexts by ensuring only the correct context is
cleared.
ftx
- The FormContextI
instance for which the breadcrumb context for
the current thread is to be cleared.ClientContextI getCtx()
default javax.swing.ImageIcon getIcon(java.lang.String name)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.awt.Color color)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.awt.Color color, boolean allowUnderlay)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.awt.Color color)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.awt.Color color, boolean allowUnderlay)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.lang.String configuration)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.lang.String configuration, java.awt.Color color)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.lang.String configuration, java.awt.Color color, boolean allowUnderlay)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.lang.String configuration)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.lang.String configuration, java.awt.Color color)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.lang.String configuration, java.awt.Color color, boolean allowUnderlay)
java.awt.Component getIconContextObject()
FormContextI getParent()
void setParent(FormContextI a)
boolean isRoot()
FormContextI getRoot()
java.lang.String getPath()
void getPath(java.lang.StringBuilder s)
FormElementI getNamedElement(java.lang.String n)
void setNamedElement(java.lang.String n, FormElementI e)
FormElementI getAt(java.lang.String n)
FormContextI createSubFormContext()
void addSubContext(FormContextI a)
void removeSubContext(FormContextI a)
java.util.List getSubContexts()
java.util.Iterator getSubContextsIterator()
FormContextI[] getThisAndAllSubContextsAsArray()
void appendThisAndAllSubContexts(java.util.List l)
void invalidateAllSubContextsCache()
EntityI getLowestCommonDenominateEntity()
void setLowestCommonDenominateEntity(EntityI ent)
BO getBO()
BO getBO(boolean _synchronized)
boolean setBO(BO bo)
BO[] getBOs()
void setEditable(boolean b)
void setEditable(boolean b, boolean dontRefresh)
javax.swing.JRootPane getJRootPane()
void setJRootPane(javax.swing.JRootPane rp)
void setRootPaneContainer(javax.swing.RootPaneContainer rpc)
javax.swing.RootPaneContainer getRootPaneContainer()
void setFormElement(FormElementI j)
FormElementI getFormElement()
default FormElementI findOnlyFormElement(java.lang.Class<? extends FormElementI> ofType)
ofType
- the type of form element to look fordefault BreadcrumbContextI getParentBreadcrumbContext()
BreadcrumbContextI
getParentBreadcrumbContext
in interface BreadcrumbContextI
null
if there is no parent.default BO getContextBO()
BreadcrumbContextI
getContextBO
in interface BreadcrumbContextI
null
if this context has no business object.VisibilityI cacheVisibility(VisibilityI v)
void setVisibilityTransient()
boolean hasCachedVisibility()
VisibilityI getVisibility()
void clearCachedVisibility()
void mdiOpen(MDIElementI me)
void mdiClose(MDIElementI me)
void mdiActivate(MDIElementI me)
void mdiDeactivate(MDIElementI me)
java.util.LinkedHashMap getAllActionsOfKind(int kind)
void initScript()
void setScript(BeanShellScript b)
BeanShellScript getScript()
boolean hasScript()
void setScriptParameters(java.util.Map m)
java.util.Map getScriptParameters()
void setTransaction(Transaction tx)
Transaction getTransaction()
void clearTransaction()
void setBOLoader(BOLoaderI bol)
BOLoaderI getBOLoader()
boolean pauseFiringNewProcs()
boolean resumeFiringNewProcs()
void startListeningNewProcs()
FormContextSaveHandlerI getSaveHandler()
void setSaveHandler(FormContextSaveHandlerI sh)
boolean hasUnsavedFormData()
boolean hasUnsavedUserData()
boolean boWasChangedExternally()
void resetBOWasChangedExternally()
void sync()
boolean isSyncEventHandlingPaused()
void beforeSave()
void afterSave()
boolean saveFormData(boolean willCloseRightAfter)
boolean saveFormData()
with parameter false
void enableConflictCheckDuringSave()
FormContextSaveHandlerI
that doesn't ignore conflicts during saving. Activate ins forms with [Tabbed]View conflictPolicy="ASK"
void disableConflictCheckDuringSave()
void refreshView()
void refreshForms()
void refreshForms(int from)
from
- An integer representing the source of the refreshForms request.
May be one of FormElementI.REFRESH_FROM_USER
or
FormElementI.REFRESH_FROM_TRANSACTION
.
Defaults to FormElementI.REFRESH_FROM_USER
.void refreshForms(int from, long onlyBOId, long ifNotSince)
from
- An integer representing the source of the refreshForms request.
May be one of FormElementI.REFRESH_FROM_USER
or
FormElementI.REFRESH_FROM_TRANSACTION
.
Defaults to FormElementI.REFRESH_FROM_USER
.onlyBOId
- A long. If specified and positive, the refresh will only be done for
the Business Object (BO) having the given Id.
Defaults to 0, meaning no specific BO ID filter.ifNotSince
- A long specifying a point in time (in milliseconds since epoch).
A refresh will only be performed if the internally stored last refresh
time is earlier (smaller) than this given time.
Defaults to System.currentTimeMillis()
.void refreshFormsFromInitialViewRefresh()
boolean tryFocus()
The specific component that receives focus (if any) and the criteria for success are determined by the implementation. This method might recursively delegate the focus attempt to sub-contexts.
true
if focus was successfully requested by a component
within this context, false
otherwise.void close()
boolean isClosed()
void addFormContextListener(FormContextListenerI l)
void removeFormContextListener(FormContextListenerI l)
void removeAllFormContextListeners()
DBManEventProviderI getEventProvider()
Transaction.Savepoint getBeforeUserChangesSavepoint()
void setBeforeUserChangesSavepoint(Transaction.Savepoint _sp)
void refreshBO(FormContextI _realFtx, java.lang.String _propertyname, boolean _transactionControl, boolean _autoCreate, electric.xml.Element _confRoot)
void toastError(java.lang.String text, int delay)
void toastError(java.lang.String text)
void toast(java.lang.String text, int delay)
void toast(java.lang.String text)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.