com.arsdigita.kernel.ui
Class PartySearchSelect
java.lang.Object
com.arsdigita.bebop.Completable
com.arsdigita.bebop.CompoundComponent
com.arsdigita.kernel.ui.PartySearchSelect
- All Implemented Interfaces:
- Component, ExcursionComponent, Globalized, Globalized, Lockable
- public class PartySearchSelect
- extends CompoundComponent
- implements ExcursionComponent, Globalized
Find a party in 2 steps: keyword search query followed by selecting
from among the search results.
Use PartySearchSelect.Search if you only want step 1 (the search
functionality) and not step 2 (the select form).
- Author:
- Oumi Mehrota
Nested Class Summary |
static class |
PartySearchSelect.Search
A search form for searching a set of parties by name/email fragment. |
Constructor Summary |
PartySearchSelect()
Construct a search/select component for finding a party among
all the parties in the system. |
PartySearchSelect(RequestLocal basePartyCollection)
Construct a search/select component for finding a party among
those in the specified party collection. |
Methods inherited from class com.arsdigita.bebop.CompoundComponent |
add, add, children, contains, generateXML, get, getClassAttr, getContainer, getIdAttr, getKey, getStyleAttr, indexOf, isEmpty, isLocked, isVisible, lock, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.arsdigita.bebop.Component |
children, generateXML, getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
PartySearchSelect
public PartySearchSelect()
- Construct a search/select component for finding a party among
all the parties in the system.
PartySearchSelect
public PartySearchSelect(RequestLocal basePartyCollection)
- Construct a search/select component for finding a party among
those in the specified party collection.
setBaseQuery
public void setBaseQuery(PageState ps,
PartyCollection parties)
- Specifies the set of parties from which the user will search and select.
Mainly useful in conjunction with addSearchFormSection(FormSection).
getSearchQuery
public PartyCollection getSearchQuery(PageState ps)
- Returns the collection of parties mathing the user's search criteria.
Mainly useful in conjunction with addSearchFormSection(FormSection).
addSearchFormSection
public void addSearchFormSection(FormSection formSection)
- Adds a form section to the search form, used to provide
additional UI for filtering/controlling the search results.
The process listener of the form section can use
getSearchQuery(PageState) in order to get the base search query
and add filters to it. Alternatively, the process listener can
use setSearchQuery(PageState, PartyCollection) to set the base
query from scratch.
getSelectedParty
public Party getSelectedParty(PageState ps)
- Returns which party was selected by the user. This will be null
if the user cancels or does not complete the search-and-select process.
register
public void register(Page p)
- Description copied from interface:
Component
- Registers state parameters for the page with its model.
A simple component with a state parameter
param
would do
the following in the body of this method:
p.addComponent(this);
p.addComponentStateParam(this, param);
You should override this method to set the default visibility
of your component:
public void register(Page p) {
super.register(p);
p.setVisibleDefault(childNotInitiallyShown,false);
p.setVisibleDefault(anotherChild, false);
}
Always call super.register
when you override
register
. Otherwise your component may
malfunction and produce errors like "Widget ... isn't
associated with any Form"
- Specified by:
register
in interface Component
- Overrides:
register
in class CompoundComponent
- See Also:
Component.register( Page )
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC