|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.form.Widget
com.arsdigita.bebop.form.Submit
Submit buttons on HTML forms. The button will only do anything
useful if it is contained directly or indirectky in a Form
.
Nested Class Summary |
Nested classes inherited from class com.arsdigita.bebop.form.Widget |
Widget.ValidationGuard |
Field Summary | |
static String |
versionId
|
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Fields inherited from class com.arsdigita.bebop.SimpleComponent |
m_attr |
Fields inherited from interface com.arsdigita.bebop.util.BebopConstants |
BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA |
Fields inherited from interface com.arsdigita.bebop.Component |
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE |
Constructor Summary | |
Submit(GlobalizedMessage label)
Create a new submit button. |
|
Submit(ParameterModel model)
Create a new submit button. |
|
Submit(String name)
Creates a new submit button. |
|
Submit(String name,
GlobalizedMessage label)
Create a new submit button. |
|
Submit(String name,
String label)
Creates a new submit button. |
Method Summary | |
void |
avoidDoubleClick(boolean avoid)
Determine whether or not javascript should be included in the onClick field to try to prevent doubleclicks. |
protected void |
generateWidget(PageState state,
Element parent)
Generates the DOM for this widget |
protected ParameterData |
getParameterData(PageState ps)
|
String |
getType()
Returns a string naming the type of this widget. |
GlobalizedMessage |
getValue()
Return the the buttons label. |
Object |
getValue(PageState ps)
Get the value of the submit button. |
boolean |
isCompound()
Returns true if the widget consists of multiple HTML elements. |
boolean |
isSelected(PageState ps)
Return true if the user clicked on this submit button to
submit the form in which the button is contained. |
void |
lock()
Lock an object. |
void |
register(Form f,
FormModel m)
Registers getName()+".x" and getName()+".y" so that html image submits will work too |
void |
setButtonLabel(GlobalizedMessage buttonLabel)
Sets the text that will be displayed on the actual button. |
void |
setButtonLabel(String buttonLabel)
Sets the text that will be displayed on the actual button. |
void |
setSize(int n)
Set the HTML size attribute of this widget. |
Methods inherited from class com.arsdigita.bebop.form.Widget |
addError, addError, addPrintListener, addValidationListener, clone, createParameterListener, firePrintEvent, fireValidation, generateErrors, generateXML, getDefaultValue, getElementTag, getErrors, getForm, getName, getParameterModel, isPassIn, removePrintListener, removeValidationListener, respond, setDefaultValue, setDisabled, setForm, setHint, setOnBlur, setOnChange, setOnFocus, setOnKeyUp, setOnSelect, setParameterModel, setPassIn, setPrintListener, setReadOnly, setValidateInvisible, setValidationGuard, setValue, toString, validateInvisible |
Methods inherited from class com.arsdigita.bebop.BlockStylable |
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment |
Methods inherited from class com.arsdigita.bebop.TextStylable |
setBackgroundColor, setColor |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
children, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, register, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
Methods inherited from class com.arsdigita.bebop.Completable |
addCompletionListener, fireCompletionEvent |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public Submit(String name)
name
for both its name attribute and as the label displayed to the
user.
name
- the button's name and labelpublic Submit(String name, String label)
name
- the button's namelabel
- the label displayed on the buttonpublic Submit(GlobalizedMessage label)
Create a new submit button.
label
- the label displayed on the buttonpublic Submit(String name, GlobalizedMessage label)
Create a new submit button.
name
- the button's namelabel
- the label displayed on the buttonpublic Submit(ParameterModel model)
model
- a ParameterModel
valueMethod Detail |
public boolean isCompound()
Widget
isCompound
in class Widget
public String getType()
getType
in class Widget
public void avoidDoubleClick(boolean avoid)
avoid
- true to avoid doubleclicks, false otherwise.public void setButtonLabel(String buttonLabel)
Sets the text that will be displayed on the actual button.
buttonLabel
- The label that shows up on the button.public void setButtonLabel(GlobalizedMessage buttonLabel)
Sets the text that will be displayed on the actual button.
buttonLabel
- The label that shows up on the button.public Object getValue(PageState ps)
getValue
does for other widgets, the value returned from this incarnation
of getValue
is either the value that was included in
the current request, or, if there is none, the default value.
Must not be final, because globalized Submit needs to override.
getValue
in class Widget
ps
- describes the request currently being processedpublic GlobalizedMessage getValue()
Return the the buttons label.
protected void generateWidget(PageState state, Element parent)
Generates the DOM for this widget
generateWidget
in class Widget
state
- The current PageState.parent
- This widget's parent.public boolean isSelected(PageState ps)
true
if the user clicked on this submit button to
submit the form in which the button is contained.
true
if the user clicked this button to submit
the enclosing form.public void lock()
Lockable
setXXX
method
should lead to an exception.
Most lockable Bebop classes throw an IllegalStateException
if an attempt is made to modify a
locked instance.
lock
in interface Lockable
lock
in class SimpleComponent
public void setSize(int n)
n
- The size of this widget, in characterspublic void register(Form f, FormModel m)
register
in interface Component
register
in class Widget
protected ParameterData getParameterData(PageState ps)
getParameterData
in class Widget
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |