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.catedit
Class CategoryEditor

    java.lang.Object
      com.tonbeller.wcf.component.ComponentSupport
          com.tonbeller.wcf.component.NestableComponentSupport
              com.tonbeller.wcf.catedit.CategoryEditor

All Implemented Interfaces:
  Bookmarkable, CategoryModelChangeListener, ChangeOrderModel, Component, java.util.EventListener, Form, FormListener, javax.servlet.http.HttpSessionBindingListener, LifeCycle, NestableComponent, Renderable, RequestListener, RoleExprHolder, Visible

public class CategoryEditor
extends NestableComponentSupport
implements ChangeOrderModel, CategoryModelChangeListener

The editor component. Creates a DOM that shows cat-item elements inside cat-category elements.

Author:
  av

Field Summary

Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
`EXTENSIONAL, INTENSIONAL`

Constructor Summary
`CategoryEditor(java.lang.String id, Component parent)`
`CategoryEditor(java.lang.String id, Component parent, CategoryModel model)`

Method Summary
`void` | `categoryModelChanged(CategoryModelChangeEvent event)` invalidates hyperlinks
`CategoryElementRenderer` | `getCategoryRenderer()` Returns the categoryRenderer.
`java.lang.String` | `getChangeCategoryButtonElementName()` Returns the changeCategoryButtonElementName.
`ItemElementRenderer` | `getItemRenderer()` Returns the itemRenderer.
`CategoryModel` | `getModel()` Returns the model.
`java.lang.String` | `getRootElementName()` Returns the rootElementName.
`void` | `initialize(RequestContext context)` initializes the component.
`boolean` | `mayMove(java.lang.Object scope, java.lang.Object item)` returns true, if node may be moved
`void` | `move(java.lang.Object scope, java.lang.Object item, int oldIndex, int newIndex)` implement ChangeOrderModel
`org.w3c.dom.Element` | `render(RequestContext context, org.w3c.dom.Document factory)` returns an Element with ownerDocument == `factory`.
`void` | `setCategoryRenderer(CategoryElementRenderer categoryRenderer)` Sets the categoryRenderer.
`void` | `setChangeCategoryButtonElementName(java.lang.String changeCategoryButtonElementName)` Sets the changeCategoryButtonElementName.
`void` | `setItemRenderer(ItemElementRenderer itemRenderer)` Sets the itemRenderer.
`void` | `setModel(CategoryModel newModel)` Sets the model.
`void` | `setRootElementName(java.lang.String rootElementName)` Sets the rootElementName.

Methods inherited from class com.tonbeller.wcf.component.NestableComponentSupport
`render`

Methods inherited from class com.tonbeller.wcf.component.ComponentSupport
`addFormListener, destroy, getBookmarkState, getDispatcher, getForm, getId, getLocale, getNextView, getParent, getRoleExpr, isAutoValidate, isListeningTo, isVisible, removeFormListener, request, revert, setAutoValidate, setBookmarkState, setId, setNextView, setParent, setRoleExpr, setVisible, validate, valueBound, valueUnbound`

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

Methods inherited from interface com.tonbeller.wcf.component.Component
`getParent, isListeningTo, setNextView`

Methods inherited from interface com.tonbeller.wcf.controller.RequestListener
`request`

Methods inherited from interface com.tonbeller.wcf.component.FormListener
`revert, validate`

Methods inherited from interface com.tonbeller.wcf.component.Visible
`isVisible, setVisible`

Methods inherited from interface com.tonbeller.wcf.component.LifeCycle
`destroy`

Constructor Detail

### CategoryEditor

    public CategoryEditor(java.lang.String id,
                          Component parent)

### CategoryEditor

    public CategoryEditor(java.lang.String id,
                          Component parent,
                          CategoryModel model)

Method Detail

### initialize

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

  Description copied from interface: `LifeCycle`
  initializes the component. Called once after construction.

  Specified by:
    `initialize` in interface `LifeCycle`
  Overrides:
    `initialize` in class `ComponentSupport`
  Throws:
    `java.lang.Exception`
  See Also:
    `ComponentSupport.destroy(javax.servlet.http.HttpSession)`, `ComponentSupport.valueBound(javax.servlet.http.HttpSessionBindingEvent)`, `ComponentTag.doEndTag()`

### render

    public org.w3c.dom.Element render(RequestContext context,
                                      org.w3c.dom.Document factory)
                               throws java.lang.Exception

  Description copied from interface: `NestableComponent`
  returns an Element with ownerDocument == `factory`.

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

### getModel

    public CategoryModel getModel()

  Returns the model.

  Returns:
    CategoryModel

### setModel

    public void setModel(CategoryModel newModel)

  Sets the model.

### categoryModelChanged

    public void categoryModelChanged(CategoryModelChangeEvent event)

  invalidates hyperlinks

  Specified by:
    `categoryModelChanged` in interface `CategoryModelChangeListener`
  Parameters:
    `event` -

### getCategoryRenderer

    public CategoryElementRenderer getCategoryRenderer()

  Returns the categoryRenderer.

  Returns:
    CategoryElementRenderer

### getChangeCategoryButtonElementName

    public java.lang.String getChangeCategoryButtonElementName()

  Returns the changeCategoryButtonElementName.

  Returns:
    String

### getItemRenderer

    public ItemElementRenderer getItemRenderer()

  Returns the itemRenderer.

  Returns:
    ItemElementRenderer

### getRootElementName

    public java.lang.String getRootElementName()

  Returns the rootElementName.

  Returns:
    String

### setCategoryRenderer

    public void setCategoryRenderer(CategoryElementRenderer categoryRenderer)

  Sets the categoryRenderer.

  Parameters:
    `categoryRenderer` - The categoryRenderer to set

### setChangeCategoryButtonElementName

    public void setChangeCategoryButtonElementName(java.lang.String changeCategoryButtonElementName)

  Sets the changeCategoryButtonElementName.

  Parameters:
    `changeCategoryButtonElementName` - The changeCategoryButtonElementName to set

### setItemRenderer

    public void setItemRenderer(ItemElementRenderer itemRenderer)

  Sets the itemRenderer.

  Parameters:
    `itemRenderer` - The itemRenderer to set

### setRootElementName

    public void setRootElementName(java.lang.String rootElementName)

  Sets the rootElementName.

  Parameters:
    `rootElementName` - The rootElementName to set

### mayMove

    public boolean mayMove(java.lang.Object scope,
                           java.lang.Object item)

  Description copied from interface: `ChangeOrderModel`
  returns true, if node may be moved

  Specified by:
    `mayMove` in interface `ChangeOrderModel`
  See Also:
    `com.tonbeller.wcf.changeorder.ChangeOrderModel#mayMove(Object)`

### move

    public void move(java.lang.Object scope,
                     java.lang.Object item,
                     int oldIndex,
                     int newIndex)

  implement ChangeOrderModel

  Specified by:
    `move` in interface `ChangeOrderModel`
  Parameters:
    `scope` - the scope for the node to move (for convenience).
    `item` - the node to move (for convenience), which lives at position oldIndex
    `oldIndex` - the index of `item` before it was moved
    `newIndex` - the index of `item` after it has been moved
  See Also:
    `ChangeOrderUtils`

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