Send your remarks, comments or wishes to doc team
Subject:
Message:
Your name:
Your email:

JBoss.org Community Documentation

- Prev
- Next

## 6.49. < rich:dropListener >

### 6.49.1. Description

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

### 6.49.2. Key Features

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

Table 6.195. rich : dropListener attributes

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

Table 6.196. Component identification parameters

Name | Value
--- | ---
listener-class | org.richfaces.event.DropListener
event-class | org.richfaces.event.DropEvent
tag-class | org.richfaces.taglib.DropListenerTag

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

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

Example:

    ...

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

    ...

### 6.49.4. Creating the Component Dynamically Using Java

Example:

    package demo;

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

        ...

    }

    import demo.ImplBean;

    ...

    ImplBean myListener = new ImplBean();

    ...

### 6.49.5. Details of Usage

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

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

The typical variant of using:

    ...

    <rich:panel style="width:100px;height:100px;">

        <f:facet name="header">Drop Zone</f:facet>

        <rich:dropSupport acceptedTypes="text">

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

        </rich:dropSupport>

    </rich:panel>

    ...

Java bean source:

    package demo;

    import org.richfaces.event.DropEvent;

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

    ...

        public void processDrop(DropEvent arg0){

            //Custom Developer Code

        }

    ...

    }

### 6.49.6. Look-and-Feel Customization

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

- Prev6.48. < rich:dragListener >
- Top of page
- Front page
- Next6.50. < rich:dropDownMenu >