|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.mbdev.openstage.Xml
pl.mbdev.openstage.XmlFormItem
pl.mbdev.openstage.IppTextField
public class IppTextField
Can be added to IppForm
and is in appearance similar to IppStringItem
,
but IppTextField can be edited. The value entered by the user can be then sent back to
server.
Copyright 2011 Mateusz Bysiek, mb@mbdev.pl, http://mbdev.pl/ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Nested Class Summary | |
---|---|
static class |
IppTextField.Constraint
Narrows the set of possible characters of the IppTextField , and sometimes
changes the method by which they are entered. |
static class |
IppTextField.DefaultValue
Possible kinds of default values of IppTextField . |
Field Summary | |
---|---|
private IppTextField.Constraint |
constraint
Value from IppTextField.Constraint . |
private IppTextField.DefaultValue |
defaultValue
One of the values from IppTextField.DefaultValue . |
private java.lang.String |
key
Key from the key-value pair, where value is the content of the editable field. |
private java.lang.String |
label
Label of the field, placed in left column. |
private XmlText |
xmlText
Data of the text field must be here due to inheritance restrictions in Java. |
Constructor Summary | |
---|---|
IppTextField(java.lang.String label,
java.lang.String key)
Creates a password field. |
|
IppTextField(java.lang.String label,
java.lang.String text,
int maxSize,
IppTextField.Constraint constraint,
boolean isPassword,
IppTextField.DefaultValue defaultValue,
java.lang.String key,
boolean isUneditable)
Creates IppTextField with all characteristics defined by the user. |
|
IppTextField(java.lang.String label,
java.lang.String text,
java.lang.String key)
Creates IppTextField with default characteristics, therefore the value will not be treated as confidential data. |
|
IppTextField(java.lang.String label,
java.lang.String text,
java.lang.String key,
boolean isUneditable)
Creates an ordinary text field, which may not be editable. |
Method Summary | |
---|---|
protected java.lang.StringBuffer |
attributesToXmlString()
Should be overridden by classes that have some attributes. |
Methods inherited from class pl.mbdev.openstage.XmlFormItem |
---|
add |
Methods inherited from class pl.mbdev.openstage.Xml |
---|
add, add, addAndReturn, attributeToXml, firstAttributesToXmlString, getContents, getLogicalRoot, getParent, getSubNode, getSubNodeIndex, getSubNodes, getXmlHeader, isEmpty, logicalAdd, sendTo, setContents, setParent, subObjectsCount, subObjectsToXmlString, toXmlString, wrapWithIppItem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String label
private IppTextField.Constraint constraint
IppTextField.Constraint
.
private IppTextField.DefaultValue defaultValue
IppTextField.DefaultValue
.
private java.lang.String key
private XmlText xmlText
Constructor Detail |
---|
public IppTextField(java.lang.String label, java.lang.String text, java.lang.String key)
label
- label of the field, placed in left columntext
- initial contents of the fieldkey
- key of the key-value pair sent to the URL specified in IppForm
,
content of the editable text field is the valuepublic IppTextField(java.lang.String label, java.lang.String key)
label
- label of the field, placed in left columnkey
- key of the key-value pair sent to the URL specified in IppForm
,
content of the editable text field is the valuepublic IppTextField(java.lang.String label, java.lang.String text, java.lang.String key, boolean isUneditable)
label
- label of the field, placed in left columntext
- initial contents of the fieldkey
- key of the key-value pair sent to the URL specified in IppForm
,
content of the editable or not editable text field is the valueisUneditable
- field value cannot be edited by the user, if truepublic IppTextField(java.lang.String label, java.lang.String text, int maxSize, IppTextField.Constraint constraint, boolean isPassword, IppTextField.DefaultValue defaultValue, java.lang.String key, boolean isUneditable)
label
- label of the field, placed in left columntext
- used only when defaultValue is set to TEXTmaxSize
- maximum length of the input, ignored if negativeconstraint
- value from IppTextField.Constraint
isPassword
- OpenStage will try to obscure the value of this field whenever possibledefaultValue
- one of the values from IppTextField.DefaultValue
key
- key from the key-value pair, where value is the content of the editable
fieldisUneditable
- field value cannot be edited by the user, if trueMethod Detail |
---|
protected java.lang.StringBuffer attributesToXmlString()
Xml
attributesToXmlString
in class Xml
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |