uk.co.weft.htform
Class BooleanWidget
java.lang.Object
uk.co.weft.htform.ResourceConsumerImpl
uk.co.weft.domutil.NodeGeneratorImpl
uk.co.weft.htform.Widget
uk.co.weft.htform.BooleanWidget
- All Implemented Interfaces:
- java.lang.Cloneable, NodeGenerator, ResourceConsumer
- public class BooleanWidget
- extends Widget
A Boolean Widget for a hypertext form, by default implemented as a
checkbox.
- Version:
- $Revision: 1.12.4.4 $ This revision: $Author: simon $
- Author:
- Simon Brooke
| Fields inherited from class uk.co.weft.htform.Widget |
ACTIONCSSCLASS, akprompt, attrs, CONTEXTATTRIBUTESSUFFIX, cssClass, DANGEROUSCSSCLASS, debug, DEFAULTTOKEN, dflt, form, generateAs, GENERATEASHTML, GENERATEASXFORM, GENERATEASXML, help, HELPTOKEN, immutable, ISIMMUTABLETOKEN, ISMANDATORYTOKEN, mandatory, MANDATORYCSSCLASS, maxVisibleSize, name, NAMETOKEN, OPTIONALCSSCLASS, PREVIOUSVALUESUFFIX, prompt, PROMPTTOKEN, size, SIZETOKEN, type, TYPETOKEN |
|
Constructor Summary |
BooleanWidget()
If you use this constructor, you are very much on your own and are
responsible for setting up all the things the Widget needs to operate
yourself. |
BooleanWidget(java.lang.String name)
you can initialise a BooleanWidget with just a name... |
BooleanWidget(java.lang.String name,
java.lang.String prompt)
name and prompt is better |
BooleanWidget(java.lang.String name,
java.lang.String prompt,
java.lang.String help)
name, prompt and helptext is better still. |
|
Method Summary |
void |
layout(Context context,
int tabIndex)
layout just the widget, without prompt, help, or surrounding context,
coercing it to this type |
protected void |
preProcess(Context context)
If anything at all comes back in my name, then I'm true; otherwise, I'm
false |
| Methods inherited from class uk.co.weft.htform.Widget |
clone, generate, generateAttributes, generateAttributes, generateHTML, generateHTMLPrompt, generateInnerHTML, generateValue, generateXML, getContextAttribute, getCssClass, getHeight, getHelp, getName, getPrompt, getTabPlaces, getType, getWidth, init, layout, layout, layout, layoutAttribute, layoutAttributes, layoutValue, makeReady, maybeLayout, maybeLayout, onloadRequest, onloadRequest, postProcess, scriptRequest, scriptRequest, setAttribute, setContextAttribute, setCssClass, setDebug, setDefault, setHelp, setImmutable, setMandatory, setMandatory, setName, setPrompt, setSize, setType |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BooleanWidget
public BooleanWidget()
- If you use this constructor, you are very much on your own and are
responsible for setting up all the things the Widget needs to operate
yourself. Our recommendation is you don't.
BooleanWidget
public BooleanWidget(java.lang.String name)
- you can initialise a BooleanWidget with just a name... all
BooleanWidgets have size = 1 to help layout
BooleanWidget
public BooleanWidget(java.lang.String name,
java.lang.String prompt)
- name and prompt is better
BooleanWidget
public BooleanWidget(java.lang.String name,
java.lang.String prompt,
java.lang.String help)
- name, prompt and helptext is better still.
layout
public void layout(Context context,
int tabIndex)
throws DataFormatException,
javax.servlet.ServletException,
java.io.IOException
- layout just the widget, without prompt, help, or surrounding context,
coercing it to this type
- Overrides:
layout in class Widget
- Parameters:
context - the service contexttabIndex - the tabindex to use, ot the tab index of my first
sub-widget if I have more than one
- Throws:
DataStoreException - I don't, but things which specialise me may
javax.servlet.ServletException - I don't, but things which specialise me may
java.io.IOException - if can't write to the output stream
DataFormatException
preProcess
protected void preProcess(Context context)
throws javax.servlet.ServletException,
DataStoreException
- If anything at all comes back in my name, then I'm true; otherwise, I'm
false
- Overrides:
preProcess in class Widget
- Parameters:
context - the Context of the service in which I'm called
- Throws:
javax.servlet.ServletException - if the thing itself breaks
DataStoreException