JBoss.orgCommunity Documentation
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 >
...
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 |