6.7.6. <rich:dndParam> available since 3.0.0

### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

### 6.7.6. <rich:dndParam> available since 3.0.0

expand all

#### 6.7.6.1. Description

The component is used for passing parameters during drag-and-drop operations.

#### 6.7.6.2. Details of Usage

The <rich:dndParam> is used during drag-and-drop operations for passing parameters to an indicator. To use the component it is necessary to set "type" attribute that specifies what kind of functionality the component will provide: dragging or dropping. Attributes "name" and "value" are also should be defiend. Instead of the "value" attribute definition it is possible to define value of the component using nested contents.

Variants of usage:

- Passing parameters for indicator's drag icon. The <rich:dndParam> can define the indicator's drag icon that will be used during dragging instead of indicator's default icon. For example, a drag icon may be represented with a minimized image of a dragged element. In this case `type="drag"`:

    ...

          <rich:dragSupport ... >

            <rich:dndParam type="drag" name="dragging">

                    <h:graphicImage value="/img/product1_small.png"/>

            </rich:dndParam>

            <h:graphicImage value="product1.png"/>

    </rich:dragSupport>

    ...

- Passing parameters for indicator's informational part. The <rich:dndParam> can transmit it's value into indicator's. In this case `type="drag"`:

    ...

    <rich:dragSupport ... >

            <rich:dndParam type="drag" name="label" value="#{msg.subj}"/>

            ...

    </rich:dragSupport>

    ...

- Passing parameters to a component that supports drop after drop happens. The <rich:dndParam> can pass icons into an indicator, if dragged content of a comp type is above the given drop zone that processes it on the next drop event. In this case `type="drop"`:

    ...

    <rich:dropSupport ... >

            <rich:dndParam type="drop" name="comp" >

                    <h:graphicImage height="16" width="16" value="/images/comp.png"/>

            </rich:dndParam>

            ...

    </rich:dropSupport >

    ...

#### 6.7.6.3. Reference Data

Table of <rich:dndParam> attributes.

Table 6.73. Component Identification Parameters

Name | Value
--- | ---
component-type | org.richfaces.DndParam
component-class | org.richfaces.component.html.HtmlDndParam
tag-class | org.richfaces.taglib.DndParamTag

- Prev6.7.5. < rich:dropSupport > ...
- Top of page
- Front page
- Next6.8. Rich Menu