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.table
Class EditableTableComponent

    java.lang.Object
      com.tonbeller.wcf.component.ComponentSupport
          com.tonbeller.wcf.table.EditableTableComponent

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

public class EditableTableComponent
extends ComponentSupport
implements ITableComponent

a component that combines a table and its property form in a single component. The user may switch between them via the edit button.

Author:
  av

Field Summary

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

Constructor Summary
`EditableTableComponent(java.lang.String id, Component parent, TableComponent tableComp, TablePropertiesFormComponent formComp)` creates an editable table component.

Method Summary
`void` | `destroy(javax.servlet.http.HttpSession session)` finalizes the component.
`java.lang.String` | `getBorder()` gets the border attribute of the generated table.
`int` | `getCurrentPage()`
`TableModel` | `getModel()` the underlying data model w/o sort/paging decorators
`int` | `getPageCount()`
`int` | `getPageSize()`
`java.lang.String` | `getRenderId()` gets the renderId attribute of the generated table.
`com.tonbeller.wcf.table.RowComparator` | `getRowComparator()`
`SelectionModel` | `getSelectionModel()` the current selection
`TableComponent` | `getTableComp()`
`void` | `initialize(RequestContext context)` initializes the component.
`static EditableTableComponent` | `instance(RequestContext context, java.lang.String id, TableComponent table)`
`boolean` | `isClosable()` shall this table have a close button?
`boolean` | `isEditable()`
`boolean` | `isEditFormVisible()`
`boolean` | `isPageable()` allows to enable/disable paging of rows
`boolean` | `isReadOnly()` user may view data but not change the selection
`boolean` | `isSortable()` allows to enable/disable sorting of columns
`boolean` | `isVisible()` true, if this component should be rendered
`org.w3c.dom.Document` | `render(RequestContext context)` renders the component
`void` | `setBorder(java.lang.String border)` sets the border attribute of the generated table.
`void` | `setClosable(boolean b)` shall this table have a close button?
`void` | `setCurrentPage(int newCurrentPage)`
`void` | `setEditable(boolean b)`
`void` | `setError(java.lang.String message)` sets the error message to display
`void` | `setModel(TableModel newModel)` set the data model and initializes everything
`void` | `setPageable(boolean newPageable)` allows to enable/disable paging of rows
`void` | `setPageSize(int newPageSize)`
`void` | `setReadOnly(boolean readOnly)` user may view data but not change the selection
`void` | `setRenderId(java.lang.String renderId)` sets the renderId attribute of the generated table.
`void` | `setSelectionModel(SelectionModel selectionModel)` the current selection
`void` | `setSortable(boolean newSortable)` allows to enable/disable sorting of columns
`void` | `setSortColumnIndex(int index)` set the current sort column
`void` | `setVisible(boolean b)` true, if this component should be rendered

Methods inherited from class com.tonbeller.wcf.component.ComponentSupport
`addFormListener, getBookmarkState, getDispatcher, getForm, getId, getLocale, getNextView, getParent, getRoleExpr, isAutoValidate, isListeningTo, removeFormListener, request, revert, setAutoValidate, setBookmarkState, setId, setNextView, setParent, setRoleExpr, 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`

Constructor Detail

### EditableTableComponent

    public EditableTableComponent(java.lang.String id,
                                  Component parent,
                                  TableComponent tableComp,
                                  TablePropertiesFormComponent formComp)

  creates an editable table component.

Parameters:
  `id` -
  `tableComp` -
  `formComp` - - form for editing the table properties

Method Detail

### instance

    public static EditableTableComponent instance(RequestContext context,
                                                  java.lang.String id,
                                                  TableComponent table)

### 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()`

### destroy

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

  Description copied from interface: `LifeCycle`
  finalizes the component. Called once on session timeout

  Specified by:
    `destroy` in interface `LifeCycle`
  Overrides:
    `destroy` in class `ComponentSupport`
  Throws:
    `java.lang.Exception`
  See Also:
    `ComponentSupport.initialize(com.tonbeller.wcf.controller.RequestContext)`, `ComponentSupport.valueUnbound(javax.servlet.http.HttpSessionBindingEvent)`

### render

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

  Description copied from interface: `Renderable`
  renders the component

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

### isVisible

    public boolean isVisible()

  Description copied from class: `ComponentSupport`
  true, if this component should be rendered

  Specified by:
    `isVisible` in interface `Visible`
  Overrides:
    `isVisible` in class `ComponentSupport`
  Returns:
    boolean

### setVisible

    public void setVisible(boolean b)

  Description copied from class: `ComponentSupport`
  true, if this component should be rendered

  Specified by:
    `setVisible` in interface `Visible`
  Overrides:
    `setVisible` in class `ComponentSupport`
  Parameters:
    `b` -

### isEditable

    public boolean isEditable()

### setEditable

    public void setEditable(boolean b)

### isEditFormVisible

    public boolean isEditFormVisible()

### getBorder

    public java.lang.String getBorder()

  Description copied from interface: `ITableComponent`
  gets the border attribute of the generated table. Overrides the global stylesheet parameter "border".

  Specified by:
    `getBorder` in interface `ITableComponent`
  Returns:

### getCurrentPage

    public int getCurrentPage()

  Specified by:
    `getCurrentPage` in interface `ITableComponent`
  Returns:

### getModel

    public TableModel getModel()

  Description copied from interface: `ITableComponent`
  the underlying data model w/o sort/paging decorators

  Specified by:
    `getModel` in interface `ITableComponent`
  Returns:

### getPageCount

    public int getPageCount()

  Specified by:
    `getPageCount` in interface `ITableComponent`
  Returns:

### getPageSize

    public int getPageSize()

  Specified by:
    `getPageSize` in interface `ITableComponent`
  Returns:

### getRenderId

    public java.lang.String getRenderId()

  Description copied from interface: `ITableComponent`
  gets the renderId attribute of the generated table. Overrides the global stylesheet parameter "renderId".

  Specified by:
    `getRenderId` in interface `ITableComponent`
  Returns:

### getRowComparator

    public com.tonbeller.wcf.table.RowComparator getRowComparator()

  Specified by:
    `getRowComparator` in interface `ITableComponent`
  Returns:

### getSelectionModel

    public SelectionModel getSelectionModel()

  Description copied from interface: `ITableComponent`
  the current selection

  Specified by:
    `getSelectionModel` in interface `ITableComponent`
  Returns:

### isClosable

    public boolean isClosable()

  Description copied from interface: `ITableComponent`
  shall this table have a close button?

  Specified by:
    `isClosable` in interface `ITableComponent`
  Returns:

### isPageable

    public boolean isPageable()

  Description copied from interface: `ITableComponent`
  allows to enable/disable paging of rows

  Specified by:
    `isPageable` in interface `ITableComponent`
  Returns:

### isSortable

    public boolean isSortable()

  Description copied from interface: `ITableComponent`
  allows to enable/disable sorting of columns

  Specified by:
    `isSortable` in interface `ITableComponent`
  Returns:

### setBorder

    public void setBorder(java.lang.String border)

  Description copied from interface: `ITableComponent`
  sets the border attribute of the generated table. Overrides the global stylesheet parameter "border".

  Specified by:
    `setBorder` in interface `ITableComponent`
  Parameters:
    `border` -

### setClosable

    public void setClosable(boolean b)

  Description copied from interface: `ITableComponent`
  shall this table have a close button?

  Specified by:
    `setClosable` in interface `ITableComponent`
  Parameters:
    `b` -

### setCurrentPage

    public void setCurrentPage(int newCurrentPage)

  Specified by:
    `setCurrentPage` in interface `ITableComponent`
  Parameters:
    `newCurrentPage` -

### setError

    public void setError(java.lang.String message)

  Description copied from interface: `ITableComponent`
  sets the error message to display

  Specified by:
    `setError` in interface `ITableComponent`
  Parameters:
    `message` -

### setModel

    public void setModel(TableModel newModel)

  Description copied from interface: `ITableComponent`
  set the data model and initializes everything

  Specified by:
    `setModel` in interface `ITableComponent`
  Parameters:
    `newModel` -

### setPageable

    public void setPageable(boolean newPageable)

  Description copied from interface: `ITableComponent`
  allows to enable/disable paging of rows

  Specified by:
    `setPageable` in interface `ITableComponent`
  Parameters:
    `newPageable` -

### setPageSize

    public void setPageSize(int newPageSize)

  Specified by:
    `setPageSize` in interface `ITableComponent`
  Parameters:
    `newPageSize` -

### setRenderId

    public void setRenderId(java.lang.String renderId)

  Description copied from interface: `ITableComponent`
  sets the renderId attribute of the generated table. Overrides the global stylesheet parameter "renderId".

  Specified by:
    `setRenderId` in interface `ITableComponent`
  Parameters:
    `renderId` -

### setSelectionModel

    public void setSelectionModel(SelectionModel selectionModel)

  Description copied from interface: `ITableComponent`
  the current selection

  Specified by:
    `setSelectionModel` in interface `ITableComponent`
  Parameters:
    `selectionModel` -

### setSortable

    public void setSortable(boolean newSortable)

  Description copied from interface: `ITableComponent`
  allows to enable/disable sorting of columns

  Specified by:
    `setSortable` in interface `ITableComponent`
  Parameters:
    `newSortable` -

### setSortColumnIndex

    public void setSortColumnIndex(int index)

  Description copied from interface: `ITableComponent`
  set the current sort column

  Specified by:
    `setSortColumnIndex` in interface `ITableComponent`
  Parameters:
    `index` -

### getTableComp

    public TableComponent getTableComp()

  Returns:
    Returns the tableComp.

### isReadOnly

    public boolean isReadOnly()

  Description copied from interface: `ITableComponent`
  user may view data but not change the selection

  Specified by:
    `isReadOnly` in interface `ITableComponent`

### setReadOnly

    public void setReadOnly(boolean readOnly)

  Description copied from interface: `ITableComponent`
  user may view data but not change the selection

  Specified by:
    `setReadOnly` in interface `ITableComponent`

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