public class MustCheckBox extends MustInputField
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
additionalTagFragments |
protected java.lang.String |
checkText |
protected boolean |
editable |
protected boolean |
enabled |
comment, focus, name, placeholder, toolTipText
Constructor and Description |
---|
MustCheckBox(java.lang.String checkText)
Constructs a new check box with the check text as specified.
|
MustCheckBox(java.lang.String name,
java.lang.String checkText)
Constructs a new check box with the specified name and check text.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String |
getCreationTag()
Returns the tag sequence that's needed to show this object in the user
interface.
|
java.lang.String |
getSelectedYN()
Returns Y if the checkbox is selected and N if not.
|
boolean |
isFilled()
Returns true if the component has a value.
|
boolean |
isModified()
Returns true if the component's value differs from its initial value.
|
boolean |
isRequired()
Returns always false.
|
boolean |
isRequirementUnfulfilled()
Returns false if mandatory input Field is not filled.
|
boolean |
isSelected()
Returns true if the checkbox is selected.
|
boolean |
isValid()
Returns true if the component's value is valid.
|
void |
resetModifiedStatus()
Resets the modified status by setting the editBeginValue to the current value.
|
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 |
setEditable(boolean editable)
Sets the specified boolean to indicate whether or not this component
should be editable.
|
void |
setEnabled(boolean enabled)
Sets the specified boolean to indicate whether or not this component
is enabled.
|
void |
setOnClickScript(java.lang.String newOnClickScript)
Sets the component's javascript function for the onClick event.
|
void |
setRequired(boolean required)
Sets the fact that user input is requested (mandatory)
|
void |
setSelected(boolean selected)
Sets the checkbox state as specified.
|
void |
setSelected(java.lang.String yn)
Sets the checkbox state as specified.
|
getName, setComment, setFocus, setPlaceHolder, setToolTipText, toString
protected java.lang.String checkText
protected java.lang.String additionalTagFragments
protected boolean editable
protected boolean enabled
public MustCheckBox(java.lang.String checkText)
checkText
- the check box' textpublic MustCheckBox(java.lang.String name, java.lang.String checkText)
name
- the name of the check boxcheckText
- the check box' textpublic void setOnClickScript(java.lang.String newOnClickScript)
newOnClick
- the component's javascript function for the onClick eventpublic 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 setEditable(boolean editable)
editable
- indicates whether or not this component is editablepublic void setEnabled(boolean enabled)
enabled
- indicates whether or not this component is enabledpublic java.lang.String getCreationTag()
public void fetchYourValueFromRequest(GeneralizedRequest request)
fetchYourValueFromRequest
in interface ValueFetcher
fetchYourValueFromRequest
in class MustInputField
request
- the current requestpublic boolean isSelected()
public void setSelected(java.lang.String yn)
yn
- indicates via "Y" or "N" whether the check box is to be selected.public void setSelected(boolean selected)
selected
- indicates whether the check box is to be selected.public java.lang.String getSelectedYN()
public void setRequired(boolean required)
required
- whether this inuput is mandatory or not.public boolean isRequired()
public boolean isFilled()
public boolean isValid()
public boolean isRequirementUnfulfilled()
public boolean isModified()
public void resetModifiedStatus()
public void destroy()
Markupable
destroy
in interface Markupable
destroy
in class MustInputField
Markupable.destroy()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de