public class HalfDataComboBox extends MustInputField implements Exemptible
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
additionalTagFragments |
protected DataObject |
contentDataObject |
protected boolean |
enabled |
protected IdentifierTextTable |
identifierTable |
protected java.lang.String |
label |
protected boolean |
required |
protected java.lang.String |
selected |
protected java.lang.String |
visibleColumnName |
protected java.lang.String |
whereCondition |
comment, focus, name, placeholder, toolTipText
Constructor and Description |
---|
HalfDataComboBox(SessionData sessionData,
DataObject contentDataObject,
java.lang.String visibleColumnName)
Creates a dynamically data filled combo box.
|
HalfDataComboBox(SessionData sessionData,
DataObject contentDataObject,
java.lang.String visibleColumnName,
java.lang.String orderByColumnName,
java.lang.String nameForNoChoice)
Creates a dynamically data filled combo box.
|
HalfDataComboBox(SessionData sessionData,
java.lang.String name,
DataObject contentDataObject,
java.lang.String visibleColumnName)
Creates a dynamically data filled combo box.
|
HalfDataComboBox(SessionData sessionData,
java.lang.String name,
DataObject contentDataObject,
java.lang.String visibleColumnName,
java.lang.String orderByColumnName,
java.lang.String nameForNoChoice)
Creates a dynamically data filled combo box.
|
HalfDataComboBox(java.lang.String name,
java.lang.String[] contentArray)
Creates a statically data filled combo box.
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(java.lang.String item,
Identifier identifier)
Adds an item to the combo box.
|
void |
dataChangePerformed(DataChangedEvent e)
Called from data objects when data have been changed.
|
void |
destroy()
Destroys the markupable.
|
void |
fetchYourValueFromRequest(GeneralizedRequest request)
Causes the component to read user input by calling request.getParameter and
update the internal mirrored value.
|
protected void |
finalize() |
void |
free()
Releases external resources.
|
java.lang.String |
getCreationTag()
Returns the tag sequence that's needed to show this object in the user
interface.
|
java.lang.String |
getLabel()
Returns the component's label.
|
Identifier |
getSelectedIdentifier()
Returns the int identifier of the selected entry.
|
java.lang.String |
getSelectedItem()
Returns the current selected item.
|
boolean |
isFilled()
Returns true if the component has a value.
|
boolean |
isRequirementUnfulfilled()
Returns true if the component's value is mandatory but not filled.
|
boolean |
isSpecialChoice()
Returns true if the choosen entry is not equals "no entry" or "any".
|
boolean |
isValid()
Returns true if the component's value is valid.
|
void |
reduceContent(java.lang.String whereCondition)
Reduces the content of the combo box by adding a where condition to the
select statement of the content date object and recall of the
fillFromContentDataObject method.
|
void |
setAdditionalTagFragments(java.lang.String additionalTagFragments)
Sets the component's additional tag fragments.
|
static void |
setDefaultAdditionalTagFragments(java.lang.String newDefaultAdditionalTagFragments)
Sets the component's default additional tag fragments.
|
void |
setEnabled(boolean enabled)
Sets the specified boolean to indicate whether or not this component
is enabled.
|
void |
setRequired(boolean required)
Sets the fact that user input is requested (mandatory)
|
void |
setSelected(java.lang.String stringToSelect)
Selects an item by the visible string
|
void |
setSelectedIdentifier(Identifier selectedIdentifier)
Selects an item by the identifier.
|
getName, setComment, setFocus, setPlaceHolder, setToolTipText, toString
protected java.lang.String additionalTagFragments
protected java.lang.String label
protected boolean required
protected DataObject contentDataObject
protected java.lang.String visibleColumnName
protected java.lang.String whereCondition
protected boolean enabled
protected IdentifierTextTable identifierTable
protected java.lang.String selected
public HalfDataComboBox(java.lang.String name, java.lang.String[] contentArray)
name
- the name of the combo boxcontentArray
- the content of the combo boxpublic HalfDataComboBox(SessionData sessionData, DataObject contentDataObject, java.lang.String visibleColumnName)
sessionData
- the session's public datacontentDataObject
- the data object to fill the contentvisibleColumnName
- the name of the column to be displayedpublic HalfDataComboBox(SessionData sessionData, java.lang.String name, DataObject contentDataObject, java.lang.String visibleColumnName)
sessionData
- the session's public dataname
- the name of the combo boxcontentDataObject
- the data object to fill the contentvisibleColumnName
- the name of the column to be displayedpublic HalfDataComboBox(SessionData sessionData, DataObject contentDataObject, java.lang.String visibleColumnName, java.lang.String orderByColumnName, java.lang.String nameForNoChoice)
sessionData
- the session's public datacontentDataObject
- the data object to fill the contentvisibleColumnName
- the name of the column to be displayedorderByColumnName
- the sorting column name of the content data objectnameForNoChoice
- the expression to be used to indicate "no choice"public HalfDataComboBox(SessionData sessionData, java.lang.String name, DataObject contentDataObject, java.lang.String visibleColumnName, java.lang.String orderByColumnName, java.lang.String nameForNoChoice)
sessionData
- the session's public dataname
- the name of the combo boxcontentDataObject
- the data object to fill the contentvisibleColumnName
- the name of the column to be displayedorderByColumnName
- the sorting column name of the content data objectnameForNoChoice
- the expression to be used to indicate "no choice"public static void setDefaultAdditionalTagFragments(java.lang.String newDefaultAdditionalTagFragments)
newDefaultClassName
- the component's default additional tag fragments.public void setAdditionalTagFragments(java.lang.String additionalTagFragments)
newDefaultClassName
- the component's additional tag fragments.public void reduceContent(java.lang.String whereCondition)
whereCondition
- the where condition to usepublic void addItem(java.lang.String item, Identifier identifier)
item
- the item to addidentifyValueInt
- the identifier of the item to addpublic void setEnabled(boolean enabled)
enabled
- indicates whether or not this component is enabledpublic void setSelected(java.lang.String stringToSelect)
stringToSelect
- the string to selectpublic java.lang.String getSelectedItem()
public void setSelectedIdentifier(Identifier selectedIdentifier)
selectedIdentifier
- the identifier to select an entrypublic Identifier getSelectedIdentifier()
public java.lang.String getLabel()
public void dataChangePerformed(DataChangedEvent e)
e
- the data change event that happend.public java.lang.String getCreationTag()
getCreationTag
in interface Markupable
public void fetchYourValueFromRequest(GeneralizedRequest request)
fetchYourValueFromRequest
in interface ValueFetcher
fetchYourValueFromRequest
in class MustInputField
request
- the current requestpublic boolean isSpecialChoice()
public void setRequired(boolean required)
required
- whether this inuput is mandatory or not.public boolean isFilled()
public boolean isValid()
public boolean isRequirementUnfulfilled()
public final void destroy()
Markupable
destroy
in interface Markupable
destroy
in class MustInputField
public void free()
Exemptible
free
in interface Exemptible
protected final void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de