|
|||||||||||
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
com.arsdigita.cms.ui.CategoryForm
This is an abstract class which displays the category assignment UI. Displays two listboxes for assigning categories to items, with two submit buttons to move categories back and forth. The left listbox displays all available categories which have not been assigned to the current item. The right listbox displays all categories assigned to the current item.
Nested Class Summary | |
protected static class |
CategoryForm.CategoryMap
A convenience method that abstracts SequentialMap to deal with categories |
Field Summary | |
static String |
ASSIGN
|
static String |
ASSIGNED
|
static String |
FILLER_OPTION
|
static String |
FREE
|
static String |
REMOVE
|
static int |
SELECT_HEIGHT
|
static int |
SELECT_WIDTH
|
static String |
versionId
|
Fields inherited from class com.arsdigita.bebop.Form |
GET, POST |
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 | |
CategoryForm(String name)
Construct a new CategoryForm component |
Method Summary | |
protected void |
addAssignButton(com.arsdigita.bebop.Container c)
|
protected void |
addRemoveButton(com.arsdigita.bebop.Container c)
|
protected void |
addSubmitButtons(com.arsdigita.bebop.Container c)
|
protected abstract void |
assignCategory(com.arsdigita.bebop.PageState s,
com.arsdigita.categorization.Category cat)
Assign a category, moving it from the list on the left to the list on the right |
CategoryForm.CategoryMap |
getAssignedCategories(com.arsdigita.bebop.PageState s)
|
static String |
getCategoryPath(com.arsdigita.categorization.Category c)
|
protected com.arsdigita.categorization.Category |
getExcludedCategory(com.arsdigita.bebop.PageState s)
Return a category which should be excluded from the list of free categories. |
protected abstract String |
getItemURL(com.arsdigita.bebop.PageState state)
This method returns the URL for the givne item to make sure that the item it is not possible to have two objects in the same category with the same URL. |
protected abstract com.arsdigita.kernel.ACSObject |
getObject(com.arsdigita.bebop.PageState state)
This allows the validation code to validate the properties of the object |
com.arsdigita.categorization.Category |
getRootCategory(com.arsdigita.bebop.PageState state)
Get the category which will act as the root for the lists of assigned and unassigned categories. |
protected abstract void |
initAssignedCategories(com.arsdigita.bebop.PageState state,
CategoryForm.CategoryMap map)
Populate a CategoryForm.CategoryMap with all categories which are assigned to
the item. |
void |
process(com.arsdigita.bebop.event.FormSectionEvent e)
|
void |
setAssignedCaption(String caption)
Set the caption of the assigned categories label |
void |
setUnassignedCaption(String caption)
Set the caption of the unassigned categories label |
protected abstract void |
unassignCategory(com.arsdigita.bebop.PageState s,
com.arsdigita.categorization.Category cat)
Unassign a category, moving it from the list on the right to the list on the left |
void |
validate(com.arsdigita.bebop.event.FormSectionEvent e)
|
Methods inherited from class com.arsdigita.bebop.Form |
addMagicTag, excludeParameterFromExport, generateErrors, generateXML, generateXMLSansState, getAction, getFormData, getName, getProcessInvisible, isRedirecting, process, register, respond, setAction, setEncType, setFormData, setMethod, setName, setOnReset, setOnSubmit, setProcessInvisible, setRedirecting, toString, traverse |
Methods inherited from class com.arsdigita.bebop.FormSection |
add, add, addCancelListener, addInitListener, addProcessListener, addSubmissionListener, addValidationListener, children, contains, createInitListener, createProcessListener, createSubmissionListener, createValidationListener, fireCancel, fireInit, fireProcess, fireSubmitted, fireValidate, forwardInit, forwardProcess, forwardSubmission, forwardValidation, get, getModel, getPanel, indexOf, isEmpty, lock, register, removeCancelListener, removeInitListener, removeProcessListener, removeSubmissionListener, removeValidationListener, size |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, 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 |
Methods inherited from interface com.arsdigita.bebop.Component |
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
Methods inherited from interface com.arsdigita.util.Lockable |
isLocked |
Field Detail |
public static final String versionId
public static final String FREE
public static final String ASSIGNED
public static final String ASSIGN
public static final String REMOVE
public static final int SELECT_WIDTH
public static final int SELECT_HEIGHT
public static final String FILLER_OPTION
Constructor Detail |
public CategoryForm(String name)
name
- the name of the formMethod Detail |
protected void addSubmitButtons(com.arsdigita.bebop.Container c)
protected void addAssignButton(com.arsdigita.bebop.Container c)
protected void addRemoveButton(com.arsdigita.bebop.Container c)
public void setUnassignedCaption(String caption)
caption
- the new captionpublic void setAssignedCaption(String caption)
caption
- the new captionpublic CategoryForm.CategoryMap getAssignedCategories(com.arsdigita.bebop.PageState s)
s
- the page state
CategoryForm.CategoryMap
of all assigned categoriesprotected abstract void initAssignedCategories(com.arsdigita.bebop.PageState state, CategoryForm.CategoryMap map)
CategoryForm.CategoryMap
with all categories which are assigned to
the item. Child classes should override this method to do the right thing.
map
- The sequential map of all categories which are assigned to
the current item. Overridden method should repeatedly
call map.addCategory(someCategory);
state
- The page stateprotected abstract void assignCategory(com.arsdigita.bebop.PageState s, com.arsdigita.categorization.Category cat)
s
- the page statecat
- the category to assignprotected abstract void unassignCategory(com.arsdigita.bebop.PageState s, com.arsdigita.categorization.Category cat)
s
- the page statecat
- the category to unassignprotected abstract String getItemURL(com.arsdigita.bebop.PageState state)
state
- The Page Stateprotected abstract com.arsdigita.kernel.ACSObject getObject(com.arsdigita.bebop.PageState state)
public com.arsdigita.categorization.Category getRootCategory(com.arsdigita.bebop.PageState state)
state
- the page state
protected com.arsdigita.categorization.Category getExcludedCategory(com.arsdigita.bebop.PageState s)
s
- the page state
public void process(com.arsdigita.bebop.event.FormSectionEvent e) throws com.arsdigita.bebop.FormProcessException
process
in interface com.arsdigita.bebop.event.FormProcessListener
com.arsdigita.bebop.FormProcessException
public void validate(com.arsdigita.bebop.event.FormSectionEvent e) throws com.arsdigita.bebop.FormProcessException
validate
in interface com.arsdigita.bebop.event.FormValidationListener
com.arsdigita.bebop.FormProcessException
public static String getCategoryPath(com.arsdigita.categorization.Category c)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |