public class XdevFormular extends XdevContainer implements Formular, Pageable, Lockable
XdevFormular
is a GUI form container containing
FormularComponent
s and ManyToManyComponent
s.
The XdevFormular
can be used to display a row of a
VirtualTable
. Therefore the XdevFormular
must contain
FormularComponent
s that are mapped to the columns of the
VirtualTable
you want to display. This can be done by the XDEV IDE or
manually.
The XdevFormular
also manages n:m-relations. Therefore
ManyToManyComponent
s can be added into this container.
The XdevFormular
provides methods to:
VirtualTable.VirtualTableRow
s like
setModel(xdev.vt.VirtualTable.VirtualTableRow)
VirtualTable.VirtualTableRow
s like insert(boolean)
VirtualTable.VirtualTableRow
s like
update(boolean)
VirtualTable.VirtualTableRow
s like
delete(boolean)
FormularListener
,
FormularComponent
,
MasterDetailComponent
,
ManyToManyComponent
,
Serialized FormJPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Formular.WorkingState
alpha, alphaColors, alphaCondition, alphaFilter, alphaTolerance, clip, filteredImage, imageBounds, remakeImages, style, useAlphaFilter
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
CLIENT_PROPERTY_KEY, SAVE_STATE_AFTER_MODEL_UPDATE_PROPERTY
DATA_FIELD, FORMULAR_CONDITION_FILTER, FORMULAR_CONDITION_PRECISION, FORMULAR_FILTER_OPERATOR, FORMULAR_SKIP, FORMULAR_VERIFIER, TAG_DATA
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
XdevFormular()
Create a new
XdevFormular with no layout manager. |
XdevFormular(LayoutManager layout)
Create a new
XdevFormular with the specified layout manager. |
Modifier and Type | Method and Description |
---|---|
void |
addFocusListener(FocusListener l) |
void |
addFormularListener(FormularListener l)
Registers a
FormularListener so that it will receive form events. |
Condition |
createCondition(String connector)
Alias for
createCondition(connector,null) . |
Condition |
createCondition(String connector,
Collection paramCollection)
Creates a
Condition depending on the input component's values and
their conditional settings. |
Condition |
createCondition(String connector,
Query query)
Creates a
Condition depending on the input component's values and
their conditional settings. |
QueryInfo |
createQuery(String connector)
Creates a query (SELECT * FROM ..) of the connected
VirtualTable
with a WHERE condition created by the values of the
FormularComponent s of this formular. |
void |
delete()
Alias for
delete(true). |
void |
delete(boolean synchronizeDB)
|
protected void |
fireFormularComponentFocusGained(Component formularComponent,
FocusEvent formularComponentEventObject) |
protected void |
fireFormularComponentFocusLost(Component formularComponent,
FocusEvent formularComponentEventObject) |
protected void |
fireFormularComponentValueChanged(FormularComponent formularComponent,
Object formularComponentEventObject) |
protected void |
fireModelChanged() |
protected void |
fireSavePerformed() |
Iterable<FormularComponent> |
formComponents() |
LockTimeMonitor[] |
getCountdownMonitors()
Returns the set
LockTimeMonitor s which are capable of displaying
the remaining time of a PessimisticLock . |
Map<String,Object> |
getData(boolean withNulls)
|
FocusListener[] |
getFocusListeners() |
FormularListener[] |
getFormularListeners() |
Object |
getHiddenField(String name)
Returns the value of the hidden field with the specified name.
|
Iterable<String> |
getHiddenFieldNames()
Returns all hidden field names of this form.
|
long |
getLockingTime()
Returns the initial duration from start until notification threshold.
|
LockAlreadyInUseIndicator |
getLockInUseNotifier()
Returns the notifier which indicates whether a lock is already in use or
not.
|
LockNotificationStrategy |
getLockNotificationStrategy()
Returns the
LockNotificationStrategy which in charge of notifying
if a specific lock state is active. |
PessimisticLockStrategy |
getLockStrategy()
Returns the set lock strategy which is capable of triggering a lock
instance.
|
long |
getNotificationThreshold()
Returns the time from which the lock is able to be renewed.
|
FormularPageControl |
getPageControl() |
boolean |
getPagingAutoQuery() |
AbstractLockRenewWindow |
getRenewLockWindow()
Returns the interface between remaining lock duration and lock instance.
|
boolean |
getSaveStateAfterModelUpdate()
Determines if the formular saves its state after an update of the model.
|
FormularSupport |
getSupport() |
String |
getURLAdd()
Returns a parameter list consisting of key value pairs containing all
components of this
Formular and their values. |
VirtualTable |
getVirtualTable()
Returns the assigned
VirtualTable of this Formular . |
VirtualTable.VirtualTableRow |
getVirtualTableRow()
Returns the current assigned
VirtualTable.VirtualTableRow . |
Formular.WorkingState |
getWorkingState()
Returns the working state of the form.
|
boolean |
hasStateChanged()
Checks if one of the
FormularComponent 's or
ManyToManyComponent 's state since the last call of
Formular.saveState() has changed. |
void |
insert()
Alias for
insert(true). |
void |
insert(boolean synchronizeDB)
Propagates the values of this
Formular / the mapped components in
the Formular to the set VirtualTable as new row. |
void |
insertRowInVT(VirtualTable vt,
boolean synchronizeDB)
Propagates the values of this
Formular / the mapped components in
the Formular to the set VirtualTable as new row. |
boolean |
isAutoLock()
Indicates whether locking is activated or not.
|
boolean |
isPagingEnabled() |
Iterable<ManyToManyComponent> |
manyToManyComponents() |
void |
putHiddenField(String name,
Object value)
Adds an arbitrary name/value "hidden field" to this form.
|
void |
removeFocusListener(FocusListener l) |
void |
removeFormularListener(FormularListener l)
Removes the listener from the listener list of this form.
|
void |
reset()
|
void |
reset(VirtualTable vt)
Resets this
Formular / the mapped components in the
Formular to the default values of the specified
VirtualTable vt . |
void |
restoreState()
|
void |
save()
Alias for
save(true). |
void |
save(boolean synchronizeDB)
Propagates the values of this
Formular / the mapped components in
the Formular to the set VirtualTable as new row if the
row is new to the VirtualTable , otherwise an update is performed. |
void |
saveState()
Saves the state of all
FormularComponent s in this formular. |
void |
search(String connector,
VirtualTableOwner target)
Updates the model of the
VirtualTableOwner target. |
void |
setAutoLock(boolean autoLock)
Controls whether locking is activated or not.
|
void |
setCountdownMonitors(LockTimeMonitor[] countdownMonitors)
Sets the
LockTimeMonitor s which are capable of displaying the
remaining time of a PessimisticLock . |
void |
setFont(Font font) |
void |
setForeground(Color fg) |
void |
setLockingTime(long lockingTime)
Sets the initial lock duration.
|
void |
setLockInUseNotifier(LockAlreadyInUseIndicator lockInUseDialog)
Notifies about attempting to write a record which is already in
use/locked.
|
void |
setLockNotificationStrategy(LockNotificationStrategy notificationStrategy)
Sets the
LockNotificationStrategy which in charge of notifying if
a specific lock state is active. |
void |
setLockStrategy(PessimisticLockStrategy lockStrategy)
Sets the lock strategy which is capable of triggering a lock instance.
|
void |
setModel(int row,
VirtualTable vt)
Fills this
Formular / the mapped components in the
Formular with the values provided by the specified
row in the VirtualTable vt . |
void |
setModel(VirtualTable.VirtualTableRow virtualTableRow)
|
void |
setModel(VirtualTable vt)
Resets this
Formular / the mapped components in the
Formular to the default values of the specified
VirtualTable vt . |
void |
setModelForPaging(VirtualTable vt) |
void |
setModelForPaging(VirtualTable vt,
SELECT select,
Object... params) |
void |
setNotificationThreshold(long notificationThreshold)
Indicates the time from which the lock is able to be renewed.
|
void |
setPagingAutoQuery(boolean pagingAutoQuery) |
void |
setPagingEnabled(boolean pagingEnabled)
Turns the paging behavior on or off.
|
void |
setRenewLockWindow(AbstractLockRenewWindow renewDialog)
Sets the component which is the interface between remaining lock duration
and lock instance.
|
void |
setSaveStateAfterModelUpdate(boolean saveStateAfterModelUpdate)
Sets if the formular should save its state after an update of the model.
|
void |
submit(String url,
String target)
Submits the contents of this
Formular to the given
url . |
void |
update()
Alias for
update(true) . |
void |
update(boolean synchronizeDB)
Propagates the values of this
Formular / the mapped components in
the Formular to the set VirtualTable / the set
VirtualTable.VirtualTableRow . |
void |
updateRowsInVT(VirtualTable vt,
KeyValues keyValues,
boolean synchronizeDB)
Propagates the values of this
Formular / the mapped components in
the Formular to the specified VirtualTable
vt , to the rows which matches the given KeyValues
pkv . |
protected boolean |
use(FormularComponent formCpn)
Determines of the
FormularComponent formCpn should
be used in this formular's actions. |
Validation |
validateFormularComponents()
Validates all
FormularComponent s of this formular. |
Validation |
validateFormularComponents(Validation validation)
Validates all
FormularComponent s of this formular depending on an
given validation object. |
boolean |
verifyFormularComponents()
Returns
ture if all values of all FormularComponent s
of this Formular could be verified, false otherwise. |
paintImage
checkAlphaUse, createG2D, drawTexture, forcePaint, getAlpha, getAlphaColors, getAlphaCondition, getAlphaTolerance, getBackgroundType, getBorderInsets, getGradientAlign, getGradientColor1, getGradientColor2, getSizeForFilter, getTexture, getTextureOption, getTexturePath, isOpaque, paintBackground, paintComponent, paintComponent, setAlpha, setAlphaColors, setAlphaCondition, setAlphaTolerance, setBackgroundType, setBorderTitle, setGradientAlign, setGradientColor1, setGradientColor2, setTexture, setTextureOption, setTexturePath, toString, update
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClientProperty, putClientProperty
public XdevFormular()
XdevFormular
with no layout manager.
Alias for XdevFormular(null)
XdevFormular(LayoutManager)
public XdevFormular(LayoutManager layout)
XdevFormular
with the specified layout manager.layout
- the LayoutManager to usepublic FormularSupport getSupport()
public void setRenewLockWindow(AbstractLockRenewWindow renewDialog)
setRenewLockWindow
in interface Lockable
renewDialog
- interface the interface between remaining lock duration and
lock instance.public AbstractLockRenewWindow getRenewLockWindow()
getRenewLockWindow
in interface Lockable
public void setNotificationThreshold(long notificationThreshold)
setNotificationThreshold
in interface Lockable
notificationThreshold
- the lock renew notification threshold.public long getNotificationThreshold()
getNotificationThreshold
in interface Lockable
public void setLockInUseNotifier(LockAlreadyInUseIndicator lockInUseDialog)
setLockInUseNotifier
in interface Lockable
lockInUseDialog
- the lock already in use dialog.public LockAlreadyInUseIndicator getLockInUseNotifier()
getLockInUseNotifier
in interface Lockable
public void setLockingTime(long lockingTime)
setLockingTime
in interface Lockable
lockingTime
- the initial duration from start until notification threshold.public long getLockingTime()
getLockingTime
in interface Lockable
public void setCountdownMonitors(LockTimeMonitor[] countdownMonitors)
LockTimeMonitor
s which are capable of displaying the
remaining time of a PessimisticLock
.setCountdownMonitors
in interface Lockable
countdownMonitors
- the monitorCountdown to setpublic LockTimeMonitor[] getCountdownMonitors()
LockTimeMonitor
s which are capable of displaying
the remaining time of a PessimisticLock
.getCountdownMonitors
in interface Lockable
public void setAutoLock(boolean autoLock)
setAutoLock
in interface Lockable
autoLock
- the auto lock indicator.public boolean isAutoLock()
isAutoLock
in interface Lockable
public Iterable<FormularComponent> formComponents()
formComponents
in interface Formular
public Iterable<ManyToManyComponent> manyToManyComponents()
manyToManyComponents
in interface Formular
protected boolean use(FormularComponent formCpn)
FormularComponent
formCpn
should
be used in this formular's actions.formCpn
- the FormularComponent
to checktrue
if formCpn
should be used,
false
otherwisepublic Formular.WorkingState getWorkingState()
getWorkingState
in interface Formular
public void addFormularListener(FormularListener l)
FormularListener
so that it will receive form events.addFormularListener
in interface Formular
l
- the listener to registerpublic void removeFormularListener(FormularListener l)
removeFormularListener
in interface Formular
l
- the listener to removeprotected void fireModelChanged()
protected void fireFormularComponentValueChanged(FormularComponent formularComponent, Object formularComponentEventObject)
protected void fireFormularComponentFocusGained(Component formularComponent, FocusEvent formularComponentEventObject)
protected void fireFormularComponentFocusLost(Component formularComponent, FocusEvent formularComponentEventObject)
protected void fireSavePerformed()
public void setSaveStateAfterModelUpdate(boolean saveStateAfterModelUpdate)
setSaveStateAfterModelUpdate
in interface Formular
saveStateAfterModelUpdate
- true
if the state should be saved,
false
otherwiseFormular.setModel(VirtualTable.VirtualTableRow)
,
Formular.saveState()
public boolean getSaveStateAfterModelUpdate()
getSaveStateAfterModelUpdate
in interface Formular
true
if the state is saved, false
otherwiseFormular.setModel(VirtualTable.VirtualTableRow)
,
Formular.saveState()
public void saveState()
FormularComponent
s in this formular.saveState
in interface Formular
Formular.reset()
,
FormularComponent.saveState()
public void restoreState()
Formular
/ the mapped components in the
Formular
to the default values of the components.
This method is a synonym for Formular.reset()
restoreState
in interface Formular
Formular.saveState()
,
FormularComponent.restoreState()
public void reset()
Formular
/ the mapped components in the
Formular
to the default values of the components.
This method is a synonym for Formular.restoreState()
reset
in interface Formular
Formular.saveState()
,
FormularComponent.restoreState()
public boolean hasStateChanged()
FormularComponent
's or
ManyToManyComponent
's state since the last call of
Formular.saveState()
has changed.hasStateChanged
in interface Formular
true
if one component's state has changed,
false
otherwiseFormularComponent.hasStateChanged()
,
ManyToManyComponent.hasStateChanged()
public void setModel(VirtualTable vt)
Formular
/ the mapped components in the
Formular
to the default values of the specified
VirtualTable
vt
.setModel
in interface Formular
vt
- VirtualTable
to reset on.public void reset(VirtualTable vt)
Formular
/ the mapped components in the
Formular
to the default values of the specified
VirtualTable
vt
.
Alias for setModel(vt.createRow())
reset
in interface Formular
vt
- VirtualTable
to reset on.public void setModel(int row, VirtualTable vt)
Formular
/ the mapped components in the
Formular
with the values provided by the specified
row
in the VirtualTable
vt
.setModel
in interface Formular
row
- the row index of the VirtualTable
vt
- VirtualTable
to take the data from.VirtualTable.VirtualTableRow
,
Formular.setModel(VirtualTable.VirtualTableRow)
public void setModel(VirtualTable.VirtualTableRow virtualTableRow)
Formular
/ the mapped components in the
Formular
with the values provided by the specified
row
.setModel
in interface Formular
virtualTableRow
- VirtualTable.VirtualTableRow
to take the data from.RowAlreadyLockedException
VirtualTable.VirtualTableRow
,
Formular.setModel(int, VirtualTable)
public void putHiddenField(String name, Object value)
If value is null
this method will remove the field.
putHiddenField
in interface Formular
name
- the new hidden field namevalue
- the new hidden field value; if null
this method
will remove the fieldFormular.getHiddenField(String)
,
Formular.getHiddenFieldNames()
public Object getHiddenField(String name)
putHiddenField
will return a non-
null
value.getHiddenField
in interface Formular
name
- the being queriednull
Formular.putHiddenField(String, Object)
,
Formular.getHiddenFieldNames()
public final Iterable<String> getHiddenFieldNames()
getHiddenFieldNames
in interface Formular
Formular.putHiddenField(String, Object)
,
Formular.getHiddenField(String)
public VirtualTable.VirtualTableRow getVirtualTableRow()
VirtualTable.VirtualTableRow
.getVirtualTableRow
in interface Formular
VirtualTable.VirtualTableRow
Formular.setModel(VirtualTable.VirtualTableRow)
public VirtualTable getVirtualTable()
VirtualTable
of this Formular
.getVirtualTable
in interface Formular
VirtualTable
public void save() throws VirtualTableException, DBException
Alias for save(true).
save
in interface Formular
VirtualTableException
- if the new row can't be set to the VirtualTable
.DBException
- if the new row can't be propagated to the underling database.Formular.save(boolean)
public void save(boolean synchronizeDB) throws VirtualTableException, DBException
Propagates the values of this Formular
/ the mapped components in
the Formular
to the set VirtualTable
as new row if the
row is new to the VirtualTable
, otherwise an update is performed.
save
in interface Formular
synchronizeDB
- true
if the new row should be propagated to the
underling database as well; otherwise false
.VirtualTableException
- if the new row can't be set to the VirtualTable
.DBException
- if the new row can't be propagated to the underling database.public void update() throws VirtualTableException, DBException
update(true)
.update
in interface Formular
VirtualTableException
- if the values can't be set to the VirtualTable
.DBException
- if the values can't be propagated to the underling database.Formular.update(boolean)
public void update(boolean synchronizeDB) throws VirtualTableException, DBException
Propagates the values of this Formular
/ the mapped components in
the Formular
to the set VirtualTable
/ the set
VirtualTable.VirtualTableRow
.
Warning: In order to be able to update a row, you need
to set a VirtualTable.VirtualTableRow
for this Formular
. You can do
this by calling Formular.setModel(int, VirtualTable)
or
Formular.setModel(VirtualTable.VirtualTableRow)
.
update
in interface Formular
synchronizeDB
- true
if the changes should be propagated to the
underling database as well; otherwise false
.VirtualTableException
- if the values can't be set to the VirtualTable
.DBException
- if the values can't be propagated to the underling database.Formular.setModel(VirtualTable.VirtualTableRow)
public void updateRowsInVT(VirtualTable vt, KeyValues keyValues, boolean synchronizeDB) throws VirtualTableException, DBException
Propagates the values of this Formular
/ the mapped components in
the Formular
to the specified VirtualTable
vt
, to the rows which matches the given KeyValues
pkv
.
updateRowsInVT
in interface Formular
vt
- VirtualTable
to propagate the changes tokeyValues
- The values which identify the rows to updatesynchronizeDB
- true
if the changes should be propagated to the
underling database as well; otherwise false
.VirtualTableException
- if the values can't be set to the VirtualTable
.DBException
- if the values can't be propagated to the underling database.public void insertRowInVT(VirtualTable vt, boolean synchronizeDB) throws VirtualTableException, DBException
Propagates the values of this Formular
/ the mapped components in
the Formular
to the set VirtualTable
as new row.
insertRowInVT
in interface Formular
vt
- VirtualTable
to propagate the new row tosynchronizeDB
- true
if the changes should be propagated to the
underling database as well; otherwise false
.VirtualTableException
- if the values can't be set to the VirtualTable
.DBException
- if the values can't be propagated to the underling database.public void insert() throws VirtualTableException, DBException
Alias for insert(true).
insert
in interface Formular
VirtualTableException
- if the new row can't be set to VirtualTable
.DBException
- if the new row can't be propagated to underling database.Formular.insert(boolean)
public void insert(boolean synchronizeDB) throws VirtualTableException, DBException
Propagates the values of this Formular
/ the mapped components in
the Formular
to the set VirtualTable
as new row.
insert
in interface Formular
synchronizeDB
- true
if the new row should be propagated to the
underling database as well; otherwise false
.VirtualTableException
- if the new row can't be set to VirtualTable
.DBException
- if the new row can't be propagated to underling database.public void delete() throws VirtualTableException, DBException
Alias for delete(true).
delete
in interface Formular
VirtualTableException
- if row can't be deleted from VirtualTable
.DBException
- if the row can't be deleted from the underling database.Formular.delete(boolean)
public void delete(boolean synchronizeDB) throws VirtualTableException, DBException
Deletes the VirtualTable.VirtualTableRow
represented by this Formular
from the set VirtualTable
.
Warning: In order to be able to delete a row, you need
to set a VirtualTable.VirtualTableRow
for this Formular
. You can do
this by calling Formular.setModel(VirtualTable.VirtualTableRow)
or
Formular.setModel(int, VirtualTable)
.
delete
in interface Formular
synchronizeDB
- true
if the row should also be deleted from the
underling database as well; otherwise false
.VirtualTableException
- if row can't be deleted from VirtualTable
.DBException
- if the row can't be deleted from the underling database.public boolean verifyFormularComponents()
ture
if all values of all FormularComponent
s
of this Formular
could be verified, false
otherwise.
This method shows a message box, if a validation fails.
This is a alternative method forFormular.validateFormularComponents()
,
but this method returns a boolean depending on the validation's result,
not the result itself.verifyFormularComponents
in interface Formular
true
if all values of all FormularComponent
s
of this Formular
could be verified, false
otherwise.public Validation validateFormularComponents()
FormularComponent
s of this formular.
Example:
if(formular.validateFormularComponents().hasError()) { // show message } else { formular.save(); }
validateFormularComponents
in interface Formular
Validation.hasError()
public Validation validateFormularComponents(Validation validation)
FormularComponent
s of this formular depending on an
given validation object.validateFormularComponents
in interface Formular
Validation.hasError()
public void submit(String url, String target) throws IOException
Formular
to the given
url
.submit
in interface Formular
url
- url to send the contents totarget
- HTML target (_blank
, _parent
etc.)IOException
- if the submit failspublic String getURLAdd()
Formular
and their values.
e.g. ?txtFirstname=John&txtLastname=Doepublic QueryInfo createQuery(String connector) throws IllegalStateException, IllegalArgumentException
VirtualTable
with a WHERE
condition created by the values of the
FormularComponent
s of this formular.createQuery
in interface Formular
connector
- "AND" or "OR"VirtualTable
with
a WHERE
condition created by the values of the
FormularComponent
s of this formular.IllegalStateException
- if no data binding is availableIllegalArgumentException
- if connector != "AND" resp. "OR"Formular.createCondition(String, Collection)
,
Formular.search(String, VirtualTableOwner)
public Condition createCondition(String connector) throws IllegalArgumentException
Alias for createCondition(connector,null)
.
createCondition
in interface Formular
connector
- "AND" or "OR"WHERE
condition depending on the input component's
values, or null
if no values are availableIllegalArgumentException
- if connector != "AND" resp. "OR"Formular.createCondition(String, Query)
,
Formular.createCondition(String, Collection)
,
Formular.createQuery(String)
public Condition createCondition(String connector, Query query) throws IllegalArgumentException
Condition
depending on the input component's values and
their conditional settings.createCondition
in interface Formular
connector
- "AND" or "OR"query
- The Query
to create this WHERE
condition for
(optional)WHERE
condition depending on the input component's
values, or null
if no values are availableIllegalArgumentException
- if connector != "AND" resp. "OR"Formular.createCondition(String, Collection)
,
Formular.createQuery(String)
public Condition createCondition(String connector, Collection paramCollection) throws IllegalArgumentException
Condition
depending on the input component's values and
their conditional settings.createCondition
in interface Formular
connector
- "AND" or "OR"paramCollection
- The Collection
to add the WHERE
condition's
parameter to (optional)WHERE
condition depending on the input component's
values, or null
if no values are availableIllegalArgumentException
- if connector != "AND" resp. "OR"Formular.createCondition(String, Query)
,
Formular.createQuery(String)
public void search(String connector, VirtualTableOwner target) throws IllegalArgumentException
VirtualTableOwner
target.
First a Condition
depending on the input component's values and
their conditional settings is created and then handed over to
VirtualTableOwner.updateModel(Condition, Object...)
of
target
.
search
in interface Formular
connector
- "AND" or "OR"target
- the component to updateIllegalArgumentException
- if connector != "AND" resp. "OR"Formular.createCondition(String)
,
Formular.createCondition(String, Collection)
,
Formular.createCondition(String, Query)
,
Formular.createQuery(String)
public void setForeground(Color fg)
setForeground
in class XdevContainer
public void setFont(Font font)
setFont
in class XdevContainer
public boolean isPagingEnabled()
isPagingEnabled
in interface Pageable
true
if the paging behavior is on,
false
otherwisePageable.setPagingEnabled(boolean)
public void setPagingEnabled(boolean pagingEnabled)
Pageable
setPagingEnabled
in interface Pageable
pagingEnabled
- true
if the paging should be controlled via the
Pageable.getPageControl()
Pageable.isPagingEnabled()
public void setPagingAutoQuery(boolean pagingAutoQuery)
public boolean getPagingAutoQuery()
public void setModelForPaging(VirtualTable vt)
public void setModelForPaging(VirtualTable vt, SELECT select, Object... params)
public FormularPageControl getPageControl()
getPageControl
in interface Pageable
public FormularListener[] getFormularListeners()
getFormularListeners
in interface Formular
public void setLockStrategy(PessimisticLockStrategy lockStrategy)
setLockStrategy
in interface Lockable
lockStrategy
- the lock instance trigger.public PessimisticLockStrategy getLockStrategy()
getLockStrategy
in interface Lockable
OnLoadPessimisticLockStrategy
or the set strategy.public void setLockNotificationStrategy(LockNotificationStrategy notificationStrategy)
LockNotificationStrategy
which in charge of notifying if
a specific lock state is active.setLockNotificationStrategy
in interface Lockable
notificationStrategy
- the notification strategy LockNotificationStrategy
to
set.public LockNotificationStrategy getLockNotificationStrategy()
LockNotificationStrategy
which in charge of notifying
if a specific lock state is active.getLockNotificationStrategy
in interface Lockable
DialogLockInUseNotificationStrategy
or the set
LockNotificationStrategy
.public void addFocusListener(FocusListener l)
addFocusListener
in class Component
public void removeFocusListener(FocusListener l)
removeFocusListener
in class Component
public FocusListener[] getFocusListeners()
getFocusListeners
in class Component
Copyright © 2003–2021 XDEV Software. All rights reserved.