com.arsdigita.cms.ui.authoring
Class WizardSelector

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.TextStylable
              extended bycom.arsdigita.bebop.BlockStylable
                  extended bycom.arsdigita.bebop.SimpleContainer
                      extended bycom.arsdigita.cms.ui.authoring.AuthoringKitSelector
                          extended bycom.arsdigita.cms.ui.authoring.WizardSelector
All Implemented Interfaces:
Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, com.arsdigita.util.Lockable, com.arsdigita.bebop.Resettable

public class WizardSelector
extends AuthoringKitSelector
implements com.arsdigita.bebop.Resettable

An invisible component which contains all the possible authoring kits. The kits are loaded from the database at construction time. The selector chooses which kit to display at page rendering time based on the value of the content_type state parameter.

Essentially, this component is a hack which is used to get around the fact that we cannot instantiate stateful components dynamically.


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.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
WizardSelector(ItemSelectionModel model, com.arsdigita.bebop.SingleSelectionModel typeModel)
          Construct a new WizardSelector.
 
Method Summary
 void generateXML(com.arsdigita.bebop.PageState state, com.arsdigita.xml.Element parent)
           
 ItemSelectionModel getSelectionModel()
           
 com.arsdigita.bebop.Component instantiateKitComponent(AuthoringKit kit, ContentType type)
          Instantiate an authoring kit component.
 void reset(com.arsdigita.bebop.PageState state)
          Reset the state of the current wizard
 
Methods inherited from class com.arsdigita.cms.ui.authoring.AuthoringKitSelector
add, add, getComponent, getComponentSelectionModel, processKit
 
Methods inherited from class com.arsdigita.bebop.SimpleContainer
children, contains, generateChildrenXML, generateParent, get, getNamespace, getTag, indexOf, isEmpty, setNamespace, setTag, size
 
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
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, register, respond, 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, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked, lock
 

Field Detail

versionId

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

WizardSelector

public WizardSelector(ItemSelectionModel model,
                      com.arsdigita.bebop.SingleSelectionModel typeModel)
Construct a new WizardSelector. Load all the possible authoring kits from the database and construct wizards for them.

Parameters:
model - the ItemSelectionModel which will supply the wizard with its item
typeModel - the ACSObjectSelectionModel which will supply the default content type
Method Detail

instantiateKitComponent

public com.arsdigita.bebop.Component instantiateKitComponent(AuthoringKit kit,
                                                             ContentType type)
Description copied from class: AuthoringKitSelector
Instantiate an authoring kit component. Child classes should override this to do the right thing. It is permissible for this method to return null.

Specified by:
instantiateKitComponent in class AuthoringKitSelector
Parameters:
kit - for this kit
type - for this type

getSelectionModel

public ItemSelectionModel getSelectionModel()
Returns:
The item selection model used by this wizard

generateXML

public void generateXML(com.arsdigita.bebop.PageState state,
                        com.arsdigita.xml.Element parent)
Specified by:
generateXML in interface com.arsdigita.bebop.Component
Overrides:
generateXML in class AuthoringKitSelector

reset

public void reset(com.arsdigita.bebop.PageState state)
Reset the state of the current wizard

Specified by:
reset in interface com.arsdigita.bebop.Resettable


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