Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

6.48.  < rich:dragListener >

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

Table 6.194. rich : dragListener attributes

Attribute NameDescription
bindingThe attribute takes a value-binding expression for a component property of a backing bean

Table 6.195. Component identification parameters

NameValue
listener-classorg.richfaces.event.DragListener
event-classorg.richfaces.event.DragEvent
tag-classorg.richfaces.taglib.DragListenerTag

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

Example:


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

Example:

package demo;

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


import demo.ImplBean;
...
ImplBean myDragListener = new ImplBean();
...

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 
    }
...
}

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