com.arsdigita.cms.ui.folder
Class FolderForm

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.FormSection
              extended bycom.arsdigita.cms.ui.authoring.BasicItemForm
                  extended bycom.arsdigita.cms.ui.folder.FolderForm
All Implemented Interfaces:
Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, EventListener, com.arsdigita.bebop.event.FormInitListener, com.arsdigita.bebop.event.FormProcessListener, com.arsdigita.bebop.event.FormValidationListener, com.arsdigita.util.Lockable
Direct Known Subclasses:
FolderCreator, FolderEditor

public abstract class FolderForm
extends BasicItemForm

Class FolderForm implements the basic form for creating or renaming folders.

Version:
$Revision #1 $DateTime: 2004/04/07 16:07:11 $
Author:
Jon Orris (jorris@arsdigita.com)

Field Summary
static String versionId
           
 
Fields inherited from class com.arsdigita.cms.ui.authoring.BasicItemForm
LANGUAGE, NAME, TITLE
 
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.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
FolderForm(String name, FolderSelectionModel folder)
          Create a new folder form.
 
Method Summary
protected  Folder getCurrentFolder(com.arsdigita.bebop.PageState state)
          Returns the current folder being operated on.
 boolean isCancelled(com.arsdigita.bebop.PageState s)
          Returns true if the form submission was cancelled.
 void register(com.arsdigita.bebop.Page p)
           
protected  void updateFolder(Folder folder, Folder parent, String name, String label)
          Updates a folder with a new parent, name, and label.
protected  void updateFolder(Folder folder, String name, String label)
          Updates a folder with a new name and label.
 void validate(com.arsdigita.bebop.event.FormSectionEvent e)
          Validates the form.
 
Methods inherited from class com.arsdigita.cms.ui.authoring.BasicItemForm
add, add, addSaveCancelSection, addWidgets, generateXML, getAllVersionIDs, getItemSelectionModel, getSaveCancelSection, init, process, validateNameUniqueness, validateNameUniquenessWithinCategory
 
Methods inherited from class com.arsdigita.bebop.FormSection
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, process, register, removeCancelListener, removeInitListener, removeProcessListener, removeSubmissionListener, removeValidationListener, respond, 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, toString, 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

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

FolderForm

public FolderForm(String name,
                  FolderSelectionModel folder)
Create a new folder form.

Parameters:
name - Name of the form
folder - SelectionModel containing the current folder being operated on.
Method Detail

register

public void register(com.arsdigita.bebop.Page p)

isCancelled

public boolean isCancelled(com.arsdigita.bebop.PageState s)
Returns true if the form submission was cancelled.


validate

public void validate(com.arsdigita.bebop.event.FormSectionEvent e)
              throws com.arsdigita.bebop.FormProcessException
Validates the form. Checks for name uniqueness.

Specified by:
validate in interface com.arsdigita.bebop.event.FormValidationListener
Overrides:
validate in class BasicItemForm
Throws:
com.arsdigita.bebop.FormProcessException

updateFolder

protected final void updateFolder(Folder folder,
                                  Folder parent,
                                  String name,
                                  String label)
Updates a folder with a new parent, name, and label.

Parameters:
folder - The folder to update
parent - The new parent folder. May be null.
name - The new name of the folder
label - The new label for the folder

updateFolder

protected final void updateFolder(Folder folder,
                                  String name,
                                  String label)
Updates a folder with a new name and label.

Parameters:
folder - The folder to update
name - The new name of the folder
label - The new label for the folder

getCurrentFolder

protected final Folder getCurrentFolder(com.arsdigita.bebop.PageState state)
Returns the current folder being operated on.

Returns:
The current folder


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2352 UTC