com.arsdigita.ui
Class SimplePage

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.Page
                      extended bycom.arsdigita.bebop.BasePage
                          extended bycom.arsdigita.ui.SimplePage
All Implemented Interfaces:
Cloneable, Component, Container, Lockable

public class SimplePage
extends BasePage

SimplePage is a subclass of ApplicationPage providing a simple page which can have custom, application independant widgets added to it. The default styling for this component provides a border layout with panels for the top, bottom, left & right margins of the page.

Configuration

The components to be added to a page are configured in the enterprise.init file using two parameters. The first, defaultLayout, specifies the site wide components, the second, applicationLayouts allows individual applications to be given a custom set of components.

The defaultLayout parameter is a list of components & their associated layout tags. The values specified for the layout tags are handled opaquely by the Java code, passing them straight through to the output XML. Thus the exact values you can specify are determined by the XSLT used for styling. For the default styling rules, the allowable tags are 'top', 'bottom', 'left' & 'right'.

Generated XML

To allow XSLT to easily distinguish the generic components for the page borders from the application specific content, all components added to the page are placed within one of two trivial containers.

All the application specific components (as added by the add method) are placed within a single ui:simplePageContent tag. The components for each position tag are placed within a ui:simplePagePanel tag, with the position attribute set accordingly.


Field Summary
 
Fields inherited from class com.arsdigita.bebop.Page
m_invisible, m_panel, 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
SimplePage(String application, Label title, String id)
          Creates a new SimplePage object.
 
Method Summary
 void add(Component child)
          Adds a component to the body of the page.
 void add(Component child, int constraints)
          Adds a component to the body of the page.
 
Methods inherited from class com.arsdigita.bebop.Page
addActionListener, addClientStylesheet, addComponent, addComponentStateParam, addGlobalStateParam, addRequestListener, buildDocument, children, contains, fireActionEvent, fireRequestEvent, generateXML, generateXML, generateXMLHelper, get, getComponent, getComponentParameters, getErrorDisplay, getPanel, getParameters, getStateModel, getTitle, getTitle, indexOf, isEmpty, isUsingHttpSession, isVisibleDefault, lock, parameterName, parameterName, prepare, process, process, removeActionListener, removeRequestListener, respond, setErrorDisplay, setPanel, setStyleSheet, setTitle, setTitle, setUsingHttpSession, setVisibleDefault, size, stateContains, stateIndex, stateSize
 
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, register, 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, register, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked
 

Constructor Detail

SimplePage

public SimplePage(String application,
                  Label title,
                  String id)
Creates a new SimplePage object. This constructor is only intended for subclasses & PageFactory. Applications should call PageFactory.buildPage to obtain a suitable instance of the com.arsdigita.bebop.Page class.

Parameters:
application - the application name
title - label for the page title
id - (optionally null) unique id for the page
Method Detail

add

public void add(Component child)
Adds a component to the body of the page. To add a component to header / footer / etc, set its classname in one of the page layouts.

Specified by:
add in interface Container
Overrides:
add in class Page
Parameters:
child - the component to add to the body

add

public void add(Component child,
                int constraints)
Adds a component to the body of the page. To add a component to header / footer / etc, set its classname in one of the page layouts.

Specified by:
add in interface Container
Overrides:
add in class Page
Parameters:
child - the component to add to the body
constraints - layout constraints (a bitwise OR of static ints in the particular layout)


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