com.arsdigita.cms.contenttypes.ui
Class LinkPropertyForm

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.FormSection
              extended bycom.arsdigita.cms.contenttypes.ui.LinkPropertyForm
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.FormSubmissionListener, com.arsdigita.bebop.event.FormValidationListener, com.arsdigita.util.Lockable

public class LinkPropertyForm
extends com.arsdigita.bebop.FormSection
implements com.arsdigita.bebop.event.FormInitListener, com.arsdigita.bebop.event.FormProcessListener, com.arsdigita.bebop.event.FormValidationListener, com.arsdigita.bebop.event.FormSubmissionListener

Form to edit the basic properties of an Link. This form can be extended to create forms for Link subclasses.

Version:
$Revision: #4 $ $Date: 2004/04/07 $
Author:
Nobuko Asakai (nasakai@redhat.com)

Field Summary
static String HTTP_PROTOCOL
           
static String ID
          Name of this form
static String SSL_PROTOCOL
           
 
Fields inherited from class com.arsdigita.bebop.FormSection
m_formModel, m_panel, versionId
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.event.FormInitListener
versionId
 
Fields inherited from interface com.arsdigita.bebop.event.FormProcessListener
versionId
 
Fields inherited from interface com.arsdigita.bebop.event.FormValidationListener
versionId
 
Fields inherited from interface com.arsdigita.bebop.event.FormSubmissionListener
versionId
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ON_CLICK, STYLE
 
Constructor Summary
LinkPropertyForm(ItemSelectionModel itemModel, LinkSelectionModel link)
          Creates a new form to edit the Link object specified by the item selection model passed in.
 
Method Summary
 void addSaveCancelSection()
          Adds the saveCancelSection
protected  void addWidgets()
          Adds widgets to the form.
protected  Link createLink(com.arsdigita.bebop.PageState s)
          Take care of basic Link creation steps
protected  ContentItem getContentItem(com.arsdigita.bebop.PageState s)
          Get the current ContentItem
protected  LinkSelectionModel getLinkSelectionModel()
          return selection model for Link that we are dealing with.
 com.arsdigita.bebop.SaveCancelSection getSaveCancelSection()
          Retrieves the saveCancelSection
 void init(com.arsdigita.bebop.event.FormSectionEvent fse)
          Init listener.
 void process(com.arsdigita.bebop.event.FormSectionEvent fse)
          Process listener.
protected  void setLinkProperties(Link link, com.arsdigita.bebop.event.FormSectionEvent fse)
          Set various properties of the Link.Child clases can over-ride this method to add additional properties to Link.
 void submitted(com.arsdigita.bebop.event.FormSectionEvent e)
          Submission listener.
 void validate(com.arsdigita.bebop.event.FormSectionEvent event)
          Validation listener.
 
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, generateXML, 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, 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

ID

public static final String ID
Name of this form

See Also:
Constant Field Values

SSL_PROTOCOL

public static final String SSL_PROTOCOL
See Also:
Constant Field Values

HTTP_PROTOCOL

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

LinkPropertyForm

public LinkPropertyForm(ItemSelectionModel itemModel,
                        LinkSelectionModel link)
Creates a new form to edit the Link object specified by the item selection model passed in.

Parameters:
itemModel - The ItemSelectionModel to use to obtain the ContentItem to which this link is (or will be) attached
link - The LinkSelectionModel to use to obtain the Link to work on
Method Detail

addWidgets

protected void addWidgets()
Adds widgets to the form.


addSaveCancelSection

public void addSaveCancelSection()
Adds the saveCancelSection


getSaveCancelSection

public com.arsdigita.bebop.SaveCancelSection getSaveCancelSection()
Retrieves the saveCancelSection


getLinkSelectionModel

protected LinkSelectionModel getLinkSelectionModel()
return selection model for Link that we are dealing with.


submitted

public void submitted(com.arsdigita.bebop.event.FormSectionEvent e)
               throws com.arsdigita.bebop.FormProcessException
Submission listener. Handles cancel events.

Specified by:
submitted in interface com.arsdigita.bebop.event.FormSubmissionListener
Parameters:
e - the FormSectionEvent
Throws:
com.arsdigita.bebop.FormProcessException

validate

public void validate(com.arsdigita.bebop.event.FormSectionEvent event)
              throws com.arsdigita.bebop.FormProcessException
Validation listener. Ensures consistency of internal vs. external link data

Specified by:
validate in interface com.arsdigita.bebop.event.FormValidationListener
Parameters:
event - the FormSectionEvent
Throws:
com.arsdigita.bebop.FormProcessException

getContentItem

protected ContentItem getContentItem(com.arsdigita.bebop.PageState s)
Get the current ContentItem

Parameters:
s - the PageState
Returns:
the ContentItem

createLink

protected Link createLink(com.arsdigita.bebop.PageState s)
Take care of basic Link creation steps

Parameters:
s - the PageState
Returns:
the newly-created Link

init

public void init(com.arsdigita.bebop.event.FormSectionEvent fse)
          throws com.arsdigita.bebop.FormProcessException
Init listener. For edit actions, fills the form with current data

Specified by:
init in interface com.arsdigita.bebop.event.FormInitListener
Parameters:
fse - the FormSectionEvent
Throws:
com.arsdigita.bebop.FormProcessException

process

public void process(com.arsdigita.bebop.event.FormSectionEvent fse)
             throws com.arsdigita.bebop.FormProcessException
Process listener. Saves/creates the new or modified Link

Specified by:
process in interface com.arsdigita.bebop.event.FormProcessListener
Parameters:
fse - the FormSectionEvent
Throws:
com.arsdigita.bebop.FormProcessException

setLinkProperties

protected void setLinkProperties(Link link,
                                 com.arsdigita.bebop.event.FormSectionEvent fse)
Set various properties of the Link.Child clases can over-ride this method to add additional properties to Link.



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