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

## org.richfaces.renderkit.html
Class TableDragDropRenderer

    java.lang.Object
      org.richfaces.renderkit.html.TableDragDropRenderer

All Implemented Interfaces:
  java.io.Serializable

    public class TableDragDropRenderer

extends java.lang.Object
implements java.io.Serializable

Renderer for support drag'n drop for `UIExtendedDataTable` component specialized for changing table columns order event.

Author:
  pawelgo
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `DRAG_SOURCE_SCRIPT_ID`
`static java.lang.String` | `DROP_TARGET_AFTER`
`static java.lang.String` | `DROP_TARGET_BEFORE`
`static java.lang.String` | `DROP_TARGET_SCRIPT_ID`

Method Summary
`void` | `encodeChildScripts(javax.faces.context.FacesContext context, UIDataTable component)` Encodes child scripts.
`protected java.lang.String` | `escapeHtmlEntities(java.lang.CharSequence orig)` Help method for escaping HTML entities.
`static TableDragDropRenderer` | `getInstance(javax.faces.context.FacesContext context)` Creates new instance.
`org.ajax4jsf.javascript.JSFunctionDefinition` | `getOnAjaxCompleteFunctionDef()`
`void` | `renderDragSupport(UIColumn column, java.lang.String dragSourceId, java.lang.String indicatorId, java.lang.String dragLabel)` Renders support for drag operation specialized for changing table columns order event.
`void` | `renderDropSupport(UIColumn column, java.lang.String dropTargetId, boolean before)` Renders support for drop operation specialized for changing table columns order event.
`void` | `setOnAjaxCompleteFunctionDef(org.ajax4jsf.javascript.JSFunctionDefinition onAjaxCompleteFunctionDef)` Set JavaScript function to be called on AJAX request complete.
`void` | `setPreSendAjaxRequestFunction(org.ajax4jsf.javascript.JSFunction preSendAjaxRequestFunction)`

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

Field Detail

### DRAG_SOURCE_SCRIPT_ID

    public static final java.lang.String DRAG_SOURCE_SCRIPT_ID

See Also:
  Constant Field Values

### DROP_TARGET_SCRIPT_ID

    public static final java.lang.String DROP_TARGET_SCRIPT_ID

See Also:
  Constant Field Values

### DROP_TARGET_BEFORE

    public static final java.lang.String DROP_TARGET_BEFORE

See Also:
  Constant Field Values

### DROP_TARGET_AFTER

    public static final java.lang.String DROP_TARGET_AFTER

See Also:
  Constant Field Values

Method Detail

### getInstance

    public static TableDragDropRenderer getInstance(javax.faces.context.FacesContext context)

  Creates new instance.

  Parameters:
    `context` - faces context
  Returns:
    instance object

### encodeChildScripts

    public void encodeChildScripts(javax.faces.context.FacesContext context,
                                   UIDataTable component)
                            throws java.io.IOException

  Encodes child scripts. It uses `DragIndicatorRendererBase` renderer and overwrites marker for DEFAULT drag indicator state. Drag indicator image is the same in DEFAULT and REJECT states.

  Parameters:
    `context` - faces context
    `component` - table component
  Throws:
    `java.io.IOException`

### renderDragSupport

    public void renderDragSupport(UIColumn column,
                                  java.lang.String dragSourceId,
                                  java.lang.String indicatorId,
                                  java.lang.String dragLabel)
                           throws java.io.IOException

  Renders support for drag operation specialized for changing table columns order event.

  Parameters:
    `column` - table column
    `dragSourceId` - drag source HTML element id
    `indicatorId` - drag indicator id
    `dragLabel` - label to be displayed in indicator
  Throws:
    `java.io.IOException`

### renderDropSupport

    public void renderDropSupport(UIColumn column,
                                  java.lang.String dropTargetId,
                                  boolean before)
                           throws java.io.IOException

  Renders support for drop operation specialized for changing table columns order event.

  Parameters:
    `column` - table column
    `dropTargetId` - drop target HTML element id
    `before` - true if target is positioned before column
  Throws:
    `java.io.IOException`

### escapeHtmlEntities

    protected java.lang.String escapeHtmlEntities(java.lang.CharSequence orig)

  Help method for escaping HTML entities.

  Parameters:
    `orig` - string to escape
  Returns:
    string with escaped HTML entities

### getOnAjaxCompleteFunctionDef

    public org.ajax4jsf.javascript.JSFunctionDefinition getOnAjaxCompleteFunctionDef()

### setOnAjaxCompleteFunctionDef

    public void setOnAjaxCompleteFunctionDef(org.ajax4jsf.javascript.JSFunctionDefinition onAjaxCompleteFunctionDef)

  Set JavaScript function to be called on AJAX request complete.

  Parameters:
    `onAjaxCompleteFunction` - JavaScriot function to set

### setPreSendAjaxRequestFunction

    public void setPreSendAjaxRequestFunction(org.ajax4jsf.javascript.JSFunction preSendAjaxRequestFunction)

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

Copyright © 2008. All Rights Reserved.