Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tonbeller.wcf.tabbed
Class PanelSupport

    java.lang.Object
      com.tonbeller.wcf.tabbed.PanelSupport

All Implemented Interfaces:
  java.util.EventListener, FormListener, NodeHandler, PanelChangeListener

public class PanelSupport
extends java.lang.Object
implements NodeHandler, PanelChangeListener, FormListener

Default implementation of a `NodeHandler` for a panel of a tabbed pane.

PanelSupport provides access to the `FormComponent` that contains the `tabbed` element, access to the `TreeComponent` if one is present and access to the `TabbedHandler` that manages this `panel` DOM element.

Author:
  av

Field Summary
`protected FormComponent` | `formComponent`
`protected org.w3c.dom.Element` | `panelElement`
`protected TabbedHandler` | `tabbedHandler`

Constructor Summary
`PanelSupport()`

Method Summary
`void` | `destroy(javax.servlet.http.HttpSession session)`
`protected TreeHandler` | `findTreeHandler(FormComponent fc)` searches for the firs <xtree ...
`FormComponent` | `getFormComponent()`
`TabbedHandler` | `getTabbedHandler()`
`void` | `initialize(RequestContext context, XmlComponent comp, org.w3c.dom.Element element)` initializes the handler
`boolean` | `isHidden()`
`void` | `panelChanged(PanelChangeEvent event)` called when the user displays another panel
`void` | `render(RequestContext context)` renders itself by changing the DOM Element
`void` | `revert(RequestContext context)` format data for display
`void` | `setHidden(RequestContext context, boolean hidden)`
`boolean` | `validate(RequestContext context)` parse user input

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### formComponent

    protected FormComponent formComponent

### tabbedHandler

    protected TabbedHandler tabbedHandler

### panelElement

    protected org.w3c.dom.Element panelElement

Constructor Detail

### PanelSupport

    public PanelSupport()

Method Detail

### initialize

    public void initialize(RequestContext context,
                           XmlComponent comp,
                           org.w3c.dom.Element element)
                    throws java.lang.Exception

  Description copied from interface: `NodeHandler`
  initializes the handler

  Specified by:
    `initialize` in interface `NodeHandler`
  Parameters:
    `context` - the current request
    `element` - the element that this handler is responsible for
  Throws:
    `java.lang.Exception`

### destroy

    public void destroy(javax.servlet.http.HttpSession session)
                 throws java.lang.Exception

  Specified by:
    `destroy` in interface `NodeHandler`
  Throws:
    `java.lang.Exception`

### findTreeHandler

    protected TreeHandler findTreeHandler(FormComponent fc)
                                   throws org.jaxen.JaxenException

  searches for the firs <xtree ...> element in the DOM and returns the handler associated with it. Derived classes may override this if they know the id of the tree element they want to listen to, e.g. using FormComponent.getHandler(String id)

  Throws:
    `org.jaxen.JaxenException`

### render

    public void render(RequestContext context)
                throws java.lang.Exception

  Description copied from interface: `NodeHandler`
  renders itself by changing the DOM Element

  Specified by:
    `render` in interface `NodeHandler`
  Throws:
    `java.lang.Exception`

### panelChanged

    public void panelChanged(PanelChangeEvent event)

  called when the user displays another panel

  Specified by:
    `panelChanged` in interface `PanelChangeListener`

### validate

    public boolean validate(RequestContext context)

  parse user input

  Specified by:
    `validate` in interface `FormListener`
  Returns:
    true if validation was successful

### revert

    public void revert(RequestContext context)

  format data for display

  Specified by:
    `revert` in interface `FormListener`

### getFormComponent

    public FormComponent getFormComponent()

  Returns:
    Returns the formComponent.

### getTabbedHandler

    public TabbedHandler getTabbedHandler()

  Returns:
    Returns the tabbedHandler.

### isHidden

    public boolean isHidden()

  Returns:
    Returns the hidden.

### setHidden

    public void setHidden(RequestContext context,
                          boolean hidden)

  Parameters:
    `hidden` - The hidden to set.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD