public class Select extends Input
Repeat
control having only a Select1
as
child.Modifier and Type | Field and Description |
---|---|
static String |
MY_URI |
static String |
PROP_CHOICES
The list of choices in a select control.
|
PROP_INPUT_ALERT, PROP_IS_MANDATORY
PROP_CONTROL_LABEL, PROP_HELP, PROP_HINT, PROP_PARENT_CONTROL, PROP_REFERENCED_PPATH, PROP_VALUE_RESTRICTION
PROP_APPEARANCE
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, NAMESPACE_PREFIX, ns_delim_index, PROP_INVOLVED_HUMAN_USER, PROP_RDF_FIRST, PROP_RDF_REST, PROP_RDF_TYPE, PROP_RDFS_COMMENT, PROP_RDFS_LABEL, PROP_SERIALIZATION_FULL, PROP_SERIALIZATION_OPTIONAL, PROP_SERIALIZATION_REDUCED, PROP_SERIALIZATION_UNDEFINED, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, SERVICE_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uri, VOCABULARY_NAMESPACE
Modifier | Constructor and Description |
---|---|
|
Select()
Just for use by de-serializers.
|
|
Select(Group parent,
Label label,
PropertyPath ref,
MergedRestriction valueRestriction,
Object initialValue)
For use by applications.
|
protected |
Select(String typeURI,
Group parent,
Label label,
PropertyPath ref,
MergedRestriction valueRestriction,
Object initialValue) |
Modifier and Type | Method and Description |
---|---|
void |
addChoiceItem(ChoiceItem item)
Adds the given choice item to the list of choices in this select control.
|
void |
addChoiceList(ChoiceList list)
Adds the given choice list as a sublist to the list of choices in this
select control.
|
boolean |
generateChoices()
If the restrictions defined or derivable for this select control can be
determined and a certain list of allowed values can be derived from those
restriction, those values will be passed to
generateChoices(Object[]) to construct the list of choices. |
boolean |
generateChoices(Object[] elems)
Having the actual values that the user should select from among them,
this method automatically generates the list of choices for this select
by trying to derive a label for them.
|
Label[] |
getChoices()
Returns the list of choices in this select control.
|
int |
getMaxCardinality()
Returns the maximum number of values that can be selected in the context
of this select control.
|
int |
getMaxLength()
Overrides
FormControl.getMaxLength() by only considering the
labels of the choices currently associated with this select control. |
int |
getMinCardinality()
Returns the minimum number of values that must be associated with this
select control as selected values.
|
boolean |
isMultilevel()
Checks if any sublist is contained in the list of choices in this select
control.
|
boolean |
setProperty(String propURI,
Object value)
Just for use by de-serializers.
|
boolean |
storeUserInputByLabelString(String selectedLabelString)
Tries to find the hidden value associated with a choice item whose label
has been given as input and then store that value as user input by
calling
Input.storeUserInput(Object) . |
getAlertString, isMandatory, setAlertString, storeUserInput
getAncestorRepeat, getFormObject, getHelpString, getHintString, getLabel, getParentGroup, getParentRepeat, getReferencedPPath, getRestrictions, getSuperGroups, getTypeURI, getValue, hasFocus, hasValue, isOfBooleanType, isOfPrimitiveType, isRepeatable, setHelpString, setHintString, toString
addAppearanceRecommendation, getAppearanceRecommendations
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getOrConstructLabel, getPropSerializationType, getResource, getResourceComment, getResourceLabel, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, isWellFormed, literal, representsQualifiedURI, serializesAsXMLLiteral, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toStringRecursive, toStringRecursive, unliteral
public static final String MY_URI
public static final String PROP_CHOICES
ChoiceItem
or ChoiceList
.public Select()
public Select(Group parent, Label label, PropertyPath ref, MergedRestriction valueRestriction, Object initialValue)
parent
- The group to contain this select object.label
- The label.ref
- mandatory property path within the form data to which this
select object refers.valueRestriction
- Optional local restrictions on the value of this select
object.initialValue
- Optional initial / default value that will be made available
in the form data.protected Select(String typeURI, Group parent, Label label, PropertyPath ref, MergedRestriction valueRestriction, Object initialValue)
public void addChoiceItem(ChoiceItem item)
public void addChoiceList(ChoiceList list)
public boolean generateChoices(Object[] elems)
public boolean generateChoices()
generateChoices(Object[])
to construct the list of choices.public Label[] getChoices()
ChoiceItem
or ChoiceList
.public int getMaxCardinality()
public int getMaxLength()
FormControl.getMaxLength()
by only considering the
labels of the choices currently associated with this select control.getMaxLength
in class FormControl
public int getMinCardinality()
public boolean isMultilevel()
public boolean setProperty(String propURI, Object value)
setProperty
in class Input
Resource.setProperty(String, Object)
public boolean storeUserInputByLabelString(String selectedLabelString)
Input.storeUserInput(Object)
. If no hidden value was found,
the label itself will be used as user input.
Note: for use by UI handlers that can not handle the association between
labels and values internally.Copyright © 2018 universAAL Consortium. All rights reserved.