public abstract class ChoicesFacetFromBoundedAbstract extends FacetAbstract implements ChoicesFacet, DisablingInteractionAdvisor, ValidatingInteractionAdvisor
Typically viewers will interpret this information by displaying all instances of the class in a drop-down list box or similar widget.
In the standard Apache Isis Programming Model, corresponds to annotating the
member with Bounded annotation
or implementing the Bounded marker interface.
FacetAbstract.Derivation, FacetAbstract.Disabling, FacetAbstract.Hiding, FacetAbstract.ValidatingChoicesFacet.UtilNOOP| Constructor and Description |
|---|
ChoicesFacetFromBoundedAbstract(FacetHolder holder,
QuerySubmitter querySubmitter) |
| Modifier and Type | Method and Description |
|---|---|
String |
disabledReason(ObjectAdapter inObject)
Optional hook method for subclasses to override.
|
String |
disables(UsabilityContext<? extends org.apache.isis.applib.events.UsabilityEvent> context)
Whether the rule represented by this facet disables the member to which
it applies.
|
Object[] |
getChoices(ObjectAdapter adapter)
Gets a set of choices for this object.
|
protected QuerySubmitter |
getQuerySubmitter() |
String |
invalidates(ValidityContext<? extends org.apache.isis.applib.events.ValidityEvent> context)
Whether the validation represented by this facet passes or fails.
|
static Class<? extends Facet> |
type() |
alwaysReplace, facetType, getFacetHolder, getIdentified, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet, toString, toStringValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitalwaysReplace, facetType, getFacetHolder, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacetpublic ChoicesFacetFromBoundedAbstract(FacetHolder holder, QuerySubmitter querySubmitter)
protected QuerySubmitter getQuerySubmitter()
public String invalidates(ValidityContext<? extends org.apache.isis.applib.events.ValidityEvent> context)
ValidatingInteractionAdvisor
Implementations should use the provided ValidityContext to
determine whether they declare the interaction invalid. They must however
guard against a null target
and session - neither are guaranteed
to be populated.
invalidates in interface ValidatingInteractionAdvisorpublic String disables(UsabilityContext<? extends org.apache.isis.applib.events.UsabilityEvent> context)
DisablingInteractionAdvisor
Implementations should use the provided InteractionContext to
determine whether they disable the member from being modified or used.
They must however guard against a null
target and
session - neither are guaranteed
to be populated.
disables in interface DisablingInteractionAdvisorpublic String disabledReason(ObjectAdapter inObject)
public Object[] getChoices(ObjectAdapter adapter)
ChoicesFacetgetChoices in interface ChoicesFacetCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.