public class HiddenField extends MustInputField
hiddenField1 = new HiddenField("hidden1")
;
If the JSP form tag includes e.g. name="mainform"
, you may access
the storage of the hidden field by JavaScript via
document.mainform.hidden1.value
.
Of course, you should not forget to call
hiddenField1.fetchYourValueFromRequest(request);
;
Be aware that the butler class is updated via form submit only.
This may be done by the same JavaScript function via
document.mainform.submit();
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
value |
comment, focus, name, placeholder, toolTipText
Constructor and Description |
---|
HiddenField()
Constructs a new hidden field with the check text as specified.
|
HiddenField(java.lang.String name)
Constructs a hidden field with the specified name.
|
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 |
getText()
Return the text of the hidden field.
|
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 |
isValid()
Returns true if the component's value is valid.
|
void |
setRequired(boolean required)
Sets the fact that user input is requested (mandatory)
|
void |
setText(java.lang.String newText)
Sets the text.
|
getName, setComment, setFocus, setPlaceHolder, setToolTipText, toString
public HiddenField()
checkText
- the check box' textpublic HiddenField(java.lang.String name)
name
- the name of the hidden fieldpublic java.lang.String getCreationTag()
public void fetchYourValueFromRequest(GeneralizedRequest request)
fetchYourValueFromRequest
in interface ValueFetcher
fetchYourValueFromRequest
in class MustInputField
request
- the current requestpublic java.lang.String getText()
public void setText(java.lang.String newText)
newText
- the new textpublic 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 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