public class FComboBox extends FInputPanel implements InitialFocusCandidateI, FormElementWithDisplayPropertyI, AsyncRefreshExecutorI
<ComboBox property="TheAttribute" selectOutOf="SomeRelationAttributeOfTheCurrentBO" [format="Bezeichnung' blablabla '(Bemerkung)"] [sortBy="SomeAttribute"]/>All BOs from the "selectOutOf" relation are used as options. They are formatted according to the "format" string and sorted by "sortBy". When an item is selected, the "TheAttribute" property is set to the corresponding BO. The list is automatically updated if the source relation changes.
<ComboBox property="TheAttribute" [selectEntity="SomeAssignableEntity"] whereClause="Name = 'bla' AND NOT Ldel" [format="Bezeichnung' blablabla '(Bemerkung)"] [sortBy="SomeAttribute"]/>The combo box options are populated by executing an Object Query Language (OQL) query on the specified "selectEntity", filtered by the "whereClause". The results are formatted and sorted as specified. The list is re-queried and updated on every refresh.
<ComboBox property="TheAttribute"><choiceScript>// A Groovy script which gets some values and adds them with model.addEntry(value)</choiceScript></ComboBox>A custom Groovy script is evaluated on each refresh to dynamically populate the combo box's options. This provides maximum flexibility for complex data sourcing.
<ComboBox property="TheAttribute" selectOutOf="SomeRelationAttributeOfTheCurrentBO" [format="Bezeichnung' blablabla '(Bemerkung)"] [sortBy="SomeAttribute"]/>Similar to the relation syntax, but the value for "TheAttribute" is set using the string representation of the selected entry, which is then converted to the attribute's type using "TheAttribute.getType().stringToValue(...)".
<ComboBox property="TheAttribute" [selectEntity="SomeEntity"] whereClause="Name = 'bla' AND NOT Ldel" [format="Bezeichnung' blablabla '(Bemerkung)"] [sortBy="SomeAttribute"]/>The options are populated from a database query. The selected entry's string value is converted to the scalar attribute's type.
<ComboBox property="TheAttribute"><choiceScript>// A Groovy script which gets some values and adds them with model.addEntry(value)</choiceScript></ComboBox>A custom Groovy script provides the values. The selected value is then converted to the scalar attribute's type.
nullable: A boolean attribute. If true, a special null entry
     is automatically added to the combo box.
   nullChoiceTitle: A string attribute that sets the label
     for the null entry when "nullable" is true. An empty string is used if not provided.
   autoSelect: A string attribute. If "TheAttribute" is
     initially null, the entry with a value matching this string will be
     automatically selected. The value is a "TheAttribute.getType().stringToValue(...)"
     compatible representation.
   fe: The FormElementI instance for this combo box.
   property: The name of the property as a String.
   bol: The BOLoaderI of the form's context.
   model: The AbstractModel instance used to populate the combo box.
     Use "model.addEntry(value)" to add options.
   myActionsXMLConfigureInfoinhibitFocusChange, SCROLLING_MODE_ANY, SCROLLING_MODE_HORIZONTAL_ONLY, SCROLLING_MODE_VERTICAL_ONLY, TEXTURE_CENTERED, TEXTURE_REPEATTOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTALL_ACTIONS, AVAILABLE_ACTION_KIND, CONTEXTMENU_ACTION_KIND, LOCAL_ACTION_KIND, MENU_ACTION_KIND, NO_LOCAL_ACTION_KIND, NO_TOPMDI_ONLY_ACTION_KIND, NOT_AVAILABLE_ACTION_KIND, REFRESH_FROM_TRANSACTION, REFRESH_FROM_USER, SHORTCUT_ACTION_KIND, TOOLBAR_ACTION_KIND, TOPMDI_ONLY_ACTION_KIND| Constructor and Description | 
|---|
| FComboBox(FormContextI _ftx,
         electric.xml.Element _confroot) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | buildGUI() | 
| java.lang.Object | calculateDisplayValue(AsyncRefreshRequestI r)Calculates a display value for an asynchronous refresh request. | 
| boolean | calculationMightBeExpensive() | 
| void | close() | 
| void | disable()Deprecated.  | 
| void | enable()Deprecated.  | 
| java.util.HashMap | getAttributeMap()Returns the map of attributes supported by this component. | 
| java.lang.String | getAutoSelect() | 
| electric.xml.Element | getChoiceScriptEl() | 
| java.lang.String | getDisplayProperty() | 
| java.util.HashMap | getElementMap()Returns the map of elements supported by this component. | 
| java.lang.String | getFormat() | 
| javax.swing.JComponent | getInitialFocus() | 
| javax.swing.JComponent | getJComponent()Returns the "JComponent" associated with this form element. | 
| java.lang.String | getNullChoiceTitle() | 
| java.awt.Dimension | getPreferredSize() | 
| java.lang.String | getProperty()A private, immutable container for passing the mandatory and enabled state
 of a component's display value between asynchronous operations. | 
| java.lang.String | getSelectEntity() | 
| java.lang.String | getSelectOutOf() | 
| java.lang.String | getSortBy() | 
| java.lang.String | getWhereClause() | 
| void | handleAutoSelectA(electric.xml.Attribute a) | 
| void | handleChoiceScriptE(electric.xml.Element el) | 
| void | handleChooseOnlyA(electric.xml.Attribute a) | 
| void | handleDisplayFormatA(electric.xml.Attribute a) | 
| void | handleDisplayPropertyA(electric.xml.Attribute a) | 
| void | handleFormatA(electric.xml.Attribute a) | 
| void | handleNullableA(electric.xml.Attribute a) | 
| void | handleNullChoiceTitleA(electric.xml.Attribute a) | 
| void | handlePropertyA(electric.xml.Attribute a) | 
| void | handleRelationNameA(electric.xml.Attribute a) | 
| void | handleSelectEntityA(electric.xml.Attribute a) | 
| void | handleSelectOutOfA(electric.xml.Attribute a) | 
| void | handleShowIdA(electric.xml.Attribute a) | 
| void | handleSortByA(electric.xml.Attribute a) | 
| void | handleSuppressDuplicatesInNonRelationModeA(electric.xml.Attribute a) | 
| void | handleWhereClauseA(electric.xml.Attribute a) | 
| boolean | isChooseOnly() | 
| boolean | isShowId() | 
| boolean | isSuppressDuplicatesInNonRelationMode() | 
| void | lockDisplayValue()Locks the UI component that displays the value to prevent concurrent inputs during
 async refresh operations. | 
| void | refresh(int from) | 
| void | renderDisplayValue(AsyncRefreshRequestI r,
                  java.lang.Object value)Renders the calculated value on the UI. | 
| void | restoreLockstateOfDisplayValue()Unlocks the UI component that displays the value again. | 
| void | setAutoSelect(java.lang.String $6) | 
| void | setChoiceScriptEl(electric.xml.Element $11) | 
| void | setChooseOnly(boolean $12) | 
| boolean | setEditable(boolean b) | 
| void | setEnabled() | 
| void | setEnabled(boolean b) | 
| void | setFormat(java.lang.String $4) | 
| void | setNullChoiceTitle(java.lang.String $9) | 
| void | setProperty(java.lang.String $3) | 
| void | setSelectedItem(java.lang.Object _obj) | 
| void | setSelectEntity(java.lang.String $10) | 
| void | setSelectOutOf(java.lang.String $7) | 
| void | setShowId(boolean $13) | 
| void | setSortBy(java.lang.String $8) | 
| void | setSuppressDuplicatesInNonRelationMode(boolean $14) | 
| void | setWhereClause(java.lang.String $5) | 
| void | syncImpl() | 
calculateMandatory, getAlsoMandatoryIf, getBaseline, getDefaultActionMap, handleAlsoMandatoryIfE_refreshActions, action_editForm_available, action_editForm_enabled, action_editForm, action_refreshView_available, action_refreshView, action_reopenView_available, action_reopenView_enabled, action_reopenView, addBeanA, addFormElementListener, addHandleA, addHandleE, afterSave, afterSetValue, assureTransferHandler, beforeSave, beforeSetValue, callLog, cancelPendingRefreshRequests, checkEditable, checkVisible, evalScript, evalScript, evalScript, evalScript, evalScript, fhide, focusNextComponent, focusPreviousComponent, fshow, getActions, getActionsOfKind, getActionsOfKind, getBO, getConfRoot, getCtx, getDebugName, getFormActions, getFtx, getInstrumentedSchema, getLastRefreshRequest, getMaximumSize, getMinimumSize, getMissingPropertiesPolicy, getRefreshRequestsPending, getSchema, handleActionE, handleAttributes, handleDropAllowedIfE, handleEditableA, handleEditableIfE, handleElement, handleElements, handleElements, handleElements, handleImpliedA, handleMaximumSizeA, handleMaxSizeA, handleMinimumSizeA, handleMinSizeA, handleMissingPropertiesPolicyA, handleNameA, handleNewElement, handleNewElement, handleNewElement, handleOnAfterSaveE, handleOnAfterSetValueE, handleOnBeforeSaveE, handleOnBeforeSetValueE, handleOnConstructionE, handleOnDropE, handleOnFocusGainedE, handleOnFocusLostE, handleOnMDIActivateE, handleOnMDICloseE, handleOnMDIDeactivateE, handleOnMDIOpenE, handleOnRefreshE, handleOnSyncE, handlePreferredSizeA, handlePrefSizeA, handleScriptE, handleVirtualPropertyE, handleVisibleIfE, hasPreferredSizeOverride, invokeAction, invokeAction, isClosed, isDebug, isDefinedEditable, isEditable, isExplicitEditable, isGUIBuilt, isImpliedElement, isInputPossible, isShown, mdiActivate, mdiClose, mdiDeactivate, mdiOpen, postConstructor, postInit, postRefresh, postRefresh, postRefresh, processFocusVeto, processFocusVeto, queueDelayedRefresh, queueDelayedRefresh, reallyHandleVirtualPropertyE, refresh, refreshActions, refreshActions, registerActionImpl, registerFormAction, removeFormElementListener, requestFocus, requestFocusInWindow, requestFocusInWindow, runAndDeclare, runAndDeclare, setConfRoot, setDebug, setFtx, setGUIBuilt, setMissingPropertiesPolicy, setShown, shouldShow, sync, waitForAsyncRefreshes, willCareForChildActions, willCareForChildRefreshgetPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollingMode, grabFocus, init, init, init, paintComponent, setScrollingMode, setTexturegetAccessibleContext, getUI, getUIClassID, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, 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, remove, removeComponentListener, removeFocusListener, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycleequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddFormElementListener, afterSave, afterSetValue, beforeSave, beforeSetValue, getActions, getActionsOfKind, getConfRoot, getCtx, getDebugName, getFtx, getName, getSchema, handleAttributes, handleElement, handleElements, handleNewElement, isClosed, isDebug, isEditable, isGUIBuilt, isInputPossible, isShown, mdiActivate, mdiClose, mdiDeactivate, mdiOpen, postInit, postRefresh, refresh, removeFormElementListener, requestFocus, sync, toDebugName, willCareForChildActions, willCareForChildRefreshpublic FComboBox(FormContextI _ftx, electric.xml.Element _confroot)
public void close()
close in interface FormElementIclose in class FPanelpublic void buildGUI()
public void handleRelationNameA(electric.xml.Attribute a)
public void handlePropertyA(electric.xml.Attribute a)
public void handleDisplayPropertyA(electric.xml.Attribute a)
public void handleDisplayFormatA(electric.xml.Attribute a)
public void handleFormatA(electric.xml.Attribute a)
public void handleWhereClauseA(electric.xml.Attribute a)
public void handleAutoSelectA(electric.xml.Attribute a)
public void handleSelectOutOfA(electric.xml.Attribute a)
public void handleNullableA(electric.xml.Attribute a)
public void handleSortByA(electric.xml.Attribute a)
public void handleChooseOnlyA(electric.xml.Attribute a)
public void handleShowIdA(electric.xml.Attribute a)
public void handleSuppressDuplicatesInNonRelationModeA(electric.xml.Attribute a)
public void handleNullChoiceTitleA(electric.xml.Attribute a)
public void handleSelectEntityA(electric.xml.Attribute a)
public void handleChoiceScriptE(electric.xml.Element el)
public java.util.HashMap getAttributeMap()
FInputPanelgetAttributeMap in interface FormElementIgetAttributeMap in class FInputPanelpublic java.util.HashMap getElementMap()
FInputPanelgetElementMap in interface FormElementIgetElementMap in class FInputPanelpublic boolean calculationMightBeExpensive()
calculationMightBeExpensive in class FPanelpublic void refresh(int from)
refresh in interface FormElementIrefresh in class FPanelpublic java.lang.Object calculateDisplayValue(AsyncRefreshRequestI r)
AsyncRefreshExecutorIcalculateDisplayValue in interface AsyncRefreshExecutorIr - The refresh request containing all necessary
                            context and data for the calculation.public void renderDisplayValue(AsyncRefreshRequestI r, java.lang.Object value)
AsyncRefreshExecutorIrenderDisplayValue in interface AsyncRefreshExecutorIr - The original refresh request.value - The raw Object value returned by the calculateDisplayValue method,
                            or a caught Exception.public void lockDisplayValue()
AsyncRefreshExecutorIlockDisplayValue in interface AsyncRefreshExecutorIpublic void restoreLockstateOfDisplayValue()
AsyncRefreshExecutorIrestoreLockstateOfDisplayValue in interface AsyncRefreshExecutorIpublic java.lang.String getDisplayProperty()
getDisplayProperty in interface FormElementWithDisplayPropertyIpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class FPanelpublic boolean setEditable(boolean b)
setEditable in interface FormElementIsetEditable in class FPanelpublic void setEnabled()
public void setEnabled(boolean b)
setEnabled in class javax.swing.JComponent@Deprecated public void disable()
disable in class javax.swing.JComponent@Deprecated public void enable()
enable in class javax.swing.JComponentpublic javax.swing.JComponent getInitialFocus()
getInitialFocus in interface InitialFocusCandidateIpublic javax.swing.JComponent getJComponent()
FInputPanelgetJComponent in class FInputPanelpublic void setSelectedItem(java.lang.Object _obj)
public java.lang.String getProperty()
public void setProperty(java.lang.String $3)
public java.lang.String getFormat()
public void setFormat(java.lang.String $4)
public java.lang.String getWhereClause()
public void setWhereClause(java.lang.String $5)
public java.lang.String getAutoSelect()
public void setAutoSelect(java.lang.String $6)
public java.lang.String getSelectOutOf()
public void setSelectOutOf(java.lang.String $7)
public java.lang.String getSortBy()
public void setSortBy(java.lang.String $8)
public java.lang.String getNullChoiceTitle()
public void setNullChoiceTitle(java.lang.String $9)
public java.lang.String getSelectEntity()
public void setSelectEntity(java.lang.String $10)
public electric.xml.Element getChoiceScriptEl()
public void setChoiceScriptEl(electric.xml.Element $11)
public boolean isChooseOnly()
public void setChooseOnly(boolean $12)
public boolean isShowId()
public void setShowId(boolean $13)
public boolean isSuppressDuplicatesInNonRelationMode()
public void setSuppressDuplicatesInNonRelationMode(boolean $14)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.