public class HTMLHalfDataComboBox
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 |
Constructor and Description |
---|
HTMLHalfDataComboBox(SessionData sessionData,
DataObject contentDataObject,
java.lang.String visibleColumnName)
Creates a dynamically data filled combo box.
|
HTMLHalfDataComboBox(SessionData sessionData,
DataObject contentDataObject,
java.lang.String visibleColumnName,
java.lang.String orderByColumnName,
java.lang.String nameForNoChoice)
Creates a dynamically data filled combo box.
|
HTMLHalfDataComboBox(SessionData sessionData,
java.lang.String name,
DataObject contentDataObject,
java.lang.String visibleColumnName)
Creates a dynamically data filled combo box.
|
HTMLHalfDataComboBox(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.
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(java.lang.String item,
Identifier identifier)
Adds an item to the combo box.
|
void |
fetchYourValueFromRequest(GeneralizedRequest request)
Causes the component to read user input by calling request.getParameter and
update the internal mirrored value.
|
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 chosen 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 |
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.
|
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 HTMLHalfDataComboBox(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 HTMLHalfDataComboBox(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 HTMLHalfDataComboBox(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 HTMLHalfDataComboBox(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 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 java.lang.String getCreationTag()
public void fetchYourValueFromRequest(GeneralizedRequest request)
request
- the current requestpublic boolean isSpecialChoice()
public void setRequired(boolean required)
required
- whether this input is mandatory or not.public boolean isFilled()
public boolean isValid()
public boolean isRequirementUnfulfilled()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de