org.richfaces.renderkit.html

## Class ExtDropzoneRendererContributor

- java.lang.Object
- - org.richfaces.renderkit.html.ExtDropzoneRendererContributor

- All Implemented Interfaces:
    org.richfaces.renderkit.RendererContributor, org.richfaces.renderkit.ScriptOptionsContributor

      public class ExtDropzoneRendererContributor
      extends java.lang.Object
      implements org.richfaces.renderkit.RendererContributor

  Renderer contributor for drop support based on `DropzoneRendererContributor`. Used only with `UIExtendedDataTable` component. All functionality from wrapped `DropzoneRendererContributor` are available. Also special methods `buildOptions(FacesContext, UIComponent)` and `ExtDropzoneRendererContributor#getScriptContribution(FacesContext, UIComponent, String, JSFunctionDefinition)` are added.
  Author:
    pawelgo

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.richfaces.renderkit.ScriptOptions` | `buildOptions(javax.faces.context.FacesContext context, javax.faces.component.UIComponent column)` Builds options for DnD.ExtSimpleDropZone JavaScript object.
    `void` | `decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, org.richfaces.renderkit.CompositeRenderer compositeRenderer)`
    `java.lang.Class<?>` | `getAcceptableClass()`
    `static ExtDropzoneRendererContributor` | `getInstance()`
    `java.lang.String` | `getScriptContribution(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
    `java.lang.String` | `getScriptContribution(javax.faces.context.FacesContext context, javax.faces.component.UIComponent column, java.lang.String dropTargetScriptId)` Build JavaScript code for drag'n drop support specialized for change table column order event.
    `java.lang.String` | `getScriptContribution(javax.faces.context.FacesContext context, javax.faces.component.UIComponent column, java.lang.String dropTargetScriptId, org.ajax4jsf.javascript.JSFunction preSendAjaxRequestFunction, org.ajax4jsf.javascript.JSFunctionDefinition onAjaxCompleteFunction)` Build JavaScript code for drag'n drop support specialized for change table column order event.
    `java.lang.String[]` | `getScriptDependencies()`
    `java.lang.String[]` | `getStyleDependencies()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static ExtDropzoneRendererContributor getInstance()

    - #### decode

          public void decode(javax.faces.context.FacesContext context,
                    javax.faces.component.UIComponent component,
                    org.richfaces.renderkit.CompositeRenderer compositeRenderer)

      Specified by:
        `decode` in interface `org.richfaces.renderkit.RendererContributor`

    - #### getAcceptableClass

          public java.lang.Class<?> getAcceptableClass()

      Specified by:
        `getAcceptableClass` in interface `org.richfaces.renderkit.RendererContributor`

    - #### getScriptContribution

          public java.lang.String getScriptContribution(javax.faces.context.FacesContext context,
                                               javax.faces.component.UIComponent component)

      Specified by:
        `getScriptContribution` in interface `org.richfaces.renderkit.RendererContributor`

    - #### getScriptContribution

          public java.lang.String getScriptContribution(javax.faces.context.FacesContext context,
                                               javax.faces.component.UIComponent column,
                                               java.lang.String dropTargetScriptId,
                                               org.ajax4jsf.javascript.JSFunction preSendAjaxRequestFunction,
                                               org.ajax4jsf.javascript.JSFunctionDefinition onAjaxCompleteFunction)

      Build JavaScript code for drag'n drop support specialized for change table column order event.
      Parameters:
        `context` - faces context
        `column` - table column
        `dropTargetScriptId` - id of HTML script element that contains defined DnD.ExtSimpleDropZone object
        `onAjaxCompleteFunction` - JavaScript function to be called on AJAX request complete
      Returns:
        JavaScript code

    - #### getScriptContribution

          public java.lang.String getScriptContribution(javax.faces.context.FacesContext context,
                                               javax.faces.component.UIComponent column,
                                               java.lang.String dropTargetScriptId)

      Build JavaScript code for drag'n drop support specialized for change table column order event.
      Parameters:
        `context` - faces context
        `column` - table column
        `dropTargetScriptId` - id of HTML script element that contains defined DnD.ExtSimpleDropZone object
      Returns:
        JavaScript code

    - #### getScriptDependencies

          public java.lang.String[] getScriptDependencies()

      Specified by:
        `getScriptDependencies` in interface `org.richfaces.renderkit.RendererContributor`

    - #### getStyleDependencies

          public java.lang.String[] getStyleDependencies()

      Specified by:
        `getStyleDependencies` in interface `org.richfaces.renderkit.RendererContributor`

    - #### buildOptions

          public org.richfaces.renderkit.ScriptOptions buildOptions(javax.faces.context.FacesContext context,
                                                           javax.faces.component.UIComponent column)

      Builds options for DnD.ExtSimpleDropZone JavaScript object. These options are specialized for drop target used to end changing table columns order event.
      Specified by:
        `buildOptions` in interface `org.richfaces.renderkit.ScriptOptionsContributor`
      Parameters:
        `context` - faces context
        `column` - table column
      Returns:
        all options needed for drop JavaScript object to work

Copyright © 2013. All Rights Reserved.