### 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.49. < rich:dragListener >

### 6.49.1. Description

The <rich:dragListener> represents an action listener method that is notified after a drag operation.

### 6.49.2. Key Features

- Allows to define some drag listeners for the components with "Drag and Drop" support

Table 6.210. rich : dragListener attributes

Attribute Name | Description
--- | ---
binding | The attribute takes a value-binding expression for a component property of a backing bean

Table 6.211. Component identification parameters

Name | Value
--- | ---
listener-class | org.richfaces.event.DragListener
event-class | org.richfaces.event.DragEvent
tag-class | org.richfaces.taglib.DragListenerTag

### 6.49.3. Creating the Component with a Page Tag

To create the simplest variant on a page use the following syntax:

Example:

    ...

        <rich:dragListener type="demo.Bean"/>

    ...

### 6.49.4. Creating the Component Dynamically Using Java

Example:

    package demo;

    public class ImplBean implements org.richfaces.event.DragListener{

        ...

    }

    import demo.ImplBean;

    ...

    ImplBean myDragListener = new ImplBean();

    ...

### 6.49.5. Details of Usage

The <rich:dragListener> is used as a nested tag with components like <rich:dragSupport> , <rich:tree> and <rich:treeNode> .

Attribute "type" defines the fully qualified Java class name for a listener. This class should implement `org.richfaces.event.DropListener` interface .

The typical variant of using:

    ...

    <h:panelGrid id="dragPanel">

        <rich:dragSupport dragType="item">

            <rich:dragListener type="demo.ListenerBean"/>

        </rich:dragSupport>

        <!--Some content to be dragged-->

    </h:panelGrid>

    ...

Java bean source:

    package demo;

    import org.richfaces.event.DragEvent;

    public class ListenerBean implements org.richfaces.event.DragListener{

    ...

        public void processDrag(DragEvent arg0){

            //Custom Developer Code

        }

    ...

    }

### 6.49.6. Look-and-Feel Customization

<rich:dragListener> has no skin parameters and custom style classes , as the component isn't visual.

- Prev6.48. < rich:dropSupport >
- Top of page
- Front page
- Next6.50. < rich:dropListener >