<?xml version="1.0" encoding="UTF-8"?>
<chapter>
	<chapterinfo>
		<keywordset>
			<keyword>rich:dragListener</keyword>
		</keywordset>
	</chapterinfo>
	<table>
		<title>Component identification parameters</title>
		<tgroup cols="2">
			<thead>
				<row>
					<entry>Name</entry>
					<entry>Value</entry>
				</row>
			</thead>
			<tbody>

				<row>
					<entry>listener-class</entry>
					<entry>org.richfaces.event.DragListener</entry>
				</row>
				<row>
					<entry>event-class</entry>
					<entry>org.richfaces.event.DragEvent</entry>
				</row>

				<row>
					<entry>tag-class</entry>
					<entry>org.richfaces.taglib.DragListenerTag</entry>
				</row>

			</tbody>
		</tgroup>
	</table>


	<section>
		<title>Creating the Component with a Page Tag</title>
		<para>
			To create the simplest variant on a page use the following
			syntax:
		</para>

		<para>
			<emphasis role="bold">Example:</emphasis>
		</para>

		<programlisting role="XML"><![CDATA[...
	<rich:dragListener type="demo.Bean"/>
...
]]></programlisting>
	</section>

	<section>
		<title>Creating the Component Dynamically Using Java</title>
		<para>
			<emphasis role="bold">Example:</emphasis>
		</para>
		<programlisting role="JAVA"><![CDATA[package demo;
	  
public class ImplBean implements org.richfaces.event.DragListener{
	...
}
]]></programlisting>

		<programlisting role="JAVA"><![CDATA[
import demo.ImplBean;
...
ImplBean myDragListener = new ImplBean();
...
]]></programlisting>

	</section>

	<section>
		<title>Details of Usage</title>

		<para>
			The
			<emphasis role="bold">
				<property>&lt;rich:dragListener&gt;</property>
			</emphasis>
			is used as a nested tag with components like
			<emphasis role="bold">
				<property>&lt;rich:dragSupport&gt;</property>
			</emphasis>
			,
			<emphasis role="bold">
				<property>&lt;rich:tree&gt;</property>
			</emphasis>
			and
			<emphasis role="bold">
				<property>&lt;rich:treeNode&gt;</property>
			</emphasis>
			.
		</para>
		<para>
			Attribute
			<emphasis>
				<property>&quot;type&quot;</property>
			</emphasis>
			defines the fully qualified Java class name for a listener.
			This class should implement
			
			<ulink
				url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/apidoc_framework/org/richfaces/event/DropListener.html">
				<code>org.richfaces.event.DropListener</code>
			</ulink>
			interface.
		</para>

		<para>
			<emphasis role="bold">
				The typical variant of using:
			</emphasis>
		</para>

		<programlisting role="XML"><![CDATA[...
<h:panelGrid id="dragPanel">
	<rich:dragSupport dragType="item">
		<rich:dragListener type="demo.ListenerBean"/>	
	</rich:dragSupport>
	<!--Some content to be dragged-->
</h:panelGrid>
...
]]></programlisting>

		<para>
			<emphasis role="bold">Java bean source:</emphasis>
		</para>

		<programlisting role="JAVA"><![CDATA[package demo;

import org.richfaces.event.DragEvent;

public class ListenerBean implements org.richfaces.event.DragListener{
...	
	public void processDrag(DragEvent arg0){
		//Custom Developer Code 
	}
...
}
]]></programlisting>
	</section>

	<section>
		<title>Look-and-Feel Customization</title>

		<para>
			<emphasis role="bold">
				<property>&lt;rich:dragListener&gt;</property>
			</emphasis>
			has no skin parameters and custom
			<property>style classes</property>
			, as the component isn&apos;t visual.
		</para>
	</section>

</chapter>