|
|||||||||||
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.FormSection
com.arsdigita.bebop.form.SearchAndSelect
Search and select Bebop widget. This widget is used to allow a user to search for a particular item over a potentially very large set. Depending on the size of the dataset, the user will either see a search box or a selection box (with all valid items). The search box will then change to a selection box once the user submits the form, allowing them then to choose the items they desire.
The datasource for SearchAndSelect is provided by an implentation of the SearchAndSelectModel interface. SAMPLE IMPLEMENTATION GOES HERE
Field Summary | |
protected boolean |
m_isMultiple
|
protected boolean |
m_isOptional
|
protected boolean |
m_isSearchLocked
|
protected SearchAndSelectListener |
m_listener
|
protected int |
m_maxViewableResults
|
protected String |
m_name
|
protected String |
m_oldValue
|
protected Hidden |
m_oldValueWidget
|
protected Widget |
m_outputSelectWidget
|
protected TextField |
m_outputTextWidget
|
protected String |
m_query
|
protected SearchAndSelectModel |
m_results
|
protected Object |
m_this
|
protected boolean |
m_useCheckboxes
|
protected String |
m_value
|
static String |
versionId
|
Fields inherited from class com.arsdigita.bebop.FormSection |
m_formModel, m_panel |
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 | |
SearchAndSelect(String name)
Create a new SearchAndSelect widget to select a single value. |
|
SearchAndSelect(String name,
boolean isMultiple)
Create a new SearchAndSelect widget with the specified name and SearchAndSelectModel. |
|
SearchAndSelect(String name,
boolean isMultiple,
boolean useCheckboxes)
Create a new SearchAndSelect widget with the specified name and SearchAndSelectModel. |
Method Summary | |
protected void |
generateErrors(PageState state,
Element parent)
Generate the error messages for this widget. |
void |
generateXML(PageState state,
Element parent)
Generates the XML datastructure for this widget. |
String |
getName()
Get the name of the widget. |
String |
getType()
Determine the type of HTML form element to create. |
boolean |
isCompound()
Indicates if the widget is composed of multiple HTML elements. |
boolean |
isMultiple()
Determine if this is a multiple select widget, or single select. |
boolean |
isOptional()
Determine if this is an optional widget |
void |
prepare(PrintEvent e)
Prepare the target component returned by e.getTarget() for output. |
SearchAndSelect |
setOptional(boolean isOptional)
Specify whether or not the widget is optional. |
void |
setSearchAndSelectListener(SearchAndSelectListener listener)
|
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
clone, 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, toString, wait, wait, wait |
Methods inherited from interface com.arsdigita.bebop.Component |
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
Methods inherited from interface com.arsdigita.util.Lockable |
isLocked |
Field Detail |
public static final String versionId
protected String m_name
protected String m_value
protected String m_query
protected int m_maxViewableResults
protected SearchAndSelectModel m_results
protected SearchAndSelectListener m_listener
protected boolean m_isMultiple
protected boolean m_useCheckboxes
protected boolean m_isOptional
protected Object m_this
protected TextField m_outputTextWidget
protected Widget m_outputSelectWidget
protected Hidden m_oldValueWidget
protected String m_oldValue
protected boolean m_isSearchLocked
Constructor Detail |
public SearchAndSelect(String name)
name
- the name of the widgetpublic SearchAndSelect(String name, boolean isMultiple)
name
- the name of the widgetisMultiple
- whether or not the widget accepts multiple valuespublic SearchAndSelect(String name, boolean isMultiple, boolean useCheckboxes)
name
- the name of the widgetisMultiple
- whether or not the widget accepts multiple valuesuseCheckboxes
- use checkboxes or a multiselectMethod Detail |
public void prepare(PrintEvent e)
PrintListener
e.getTarget()
for output. The target component is an unlocked clone
of the source of the event and can be freely modified within this
method.
prepare
in interface PrintListener
e
- Event containing the page state, the source and the target of
the eventPrintEvent
public final void setSearchAndSelectListener(SearchAndSelectListener listener)
public final String getName()
public String getType()
public final boolean isMultiple()
public final boolean isOptional()
public SearchAndSelect setOptional(boolean isOptional)
isOptional
- true for optional, false for requiredpublic boolean isCompound()
public void generateXML(PageState state, Element parent)
generateXML
in interface Component
generateXML
in class FormSection
state
- the state of the pageparent
- the parent widgetprotected void generateErrors(PageState state, Element parent)
state
- the state of the pageparent
- the parent widget
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |