can't get rich:dragIndicator to work on 3.3.0 or 3.2.0
dwichman Feb 24, 2009 2:24 PMI can't seem to get the default dragIndicator or when I specify a facet w/ content to work. If I don't specify a dragIndicator id in my dragSupport I get a default dotted line box (empty) the size of my dragSupport image. If I do specify the dragIndicator id I don't get any sort of drag indicator, and when I drop the item in the dropSupport I see a server request but my dropListener is not invoked. Any ideas?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j"> <style> .cur { cursor: pointer; } .top { vertical-align: top; } </style> <rich:dragIndicator id="characterIndicator"> <f:facet name="single"> <h:graphicImage value="{picture}"/> </f:facet> </rich:dragIndicator> <head> <title>RichFaces</title> </head> <body> <h:form> <rich:contextMenu attached="false" id="menu" submitmode="ajax"> <rich:menuItem ajaxSingle="true" submitMode="ajax" oncomplete="#{rich:component('useredit')}.show()" reRender="userinfo"> Edit <b>{name}</b> <a4j:actionparam assignTo="#{userBean.selectedUserEamil}" value="{email}"/> </rich:menuItem> </rich:contextMenu> <rich:contextMenu attached="false" id="partymenu" submitmode="ajax"> <rich:menuItem ajaxSingle="true" submitMode="ajax" data="{email}" reRender="party"> Remove <b>{name}</b> <a4j:actionparam assignTo="#{userBean.removeUserEmail}" value="{email}"/> </rich:menuItem> </rich:contextMenu> <h:panelGrid columns="2" columnClasses="top, top"> <rich:panel style="width:300px"> <f:facet name="header">Characters</f:facet> <rich:dataTable value="#{userBean.users}" var="user" ajaxKeys="#{userBean.rowsToUpdate}" onRowMouseOver="this.style.backgroundColor='#F8F8F8'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rowClasses="cur" style="width:100%"> <rich:column> <f:facet name="header"> Picture </f:facet> <rich:dragSupport id="dragSource" dragType="character" dragValue="#{user.email}" dragIndicator="characterIndicator"> <rich:dndParam name="picture" value="#{user.picture}"/> </rich:dragSupport> <h:graphicImage value="#{user.picture}"/> </rich:column> <rich:column> <f:facet name="header"> Name </f:facet> <h:outputText id="name" value="#{user.name}"/> </rich:column> <rich:column> <f:facet name="header"> Email </f:facet> <h:outputText id="email" value="#{user.email}"/> </rich:column> <rich:componentControl event="onRowClick" for="menu" operation="show"> <f:param value="#{user.name}" name="name"/> <f:param value="#{user.email}" name="email"/> </rich:componentControl> </rich:dataTable> </rich:panel> <rich:panel style="width:300px;"> <f:facet name="header">Your Party</f:facet> <rich:dropSupport id="dropTarget" acceptedTypes="character" dropListener="#{userBean.characterAdded}" reRender="party"> </rich:dropSupport> <rich:dataTable value="#{userBean.party}" id="party" var="user" onRowMouseOver="this.style.backgroundColor='#F8F8F8'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rowClasses="cur" style="width:100%"> <rich:column> <f:facet name="header"> Picture </f:facet> <h:graphicImage value="#{user.picture}"/> </rich:column> <rich:column> <f:facet name="header"> Name </f:facet> <h:outputText id="name" value="#{user.name}"/> </rich:column> <rich:column> <f:facet name="header"> Email </f:facet> <h:outputText id="email" value="#{user.email}"/> </rich:column> <rich:componentControl event="onRowClick" for="partymenu" operation="show"> <f:param value="#{user.name}" name="name"/> <f:param value="#{user.email}" name="email"/> </rich:componentControl> </rich:dataTable> </rich:panel> </h:panelGrid> </h:form> <rich:modalPanel id="useredit"> <f:facet name="header">User</f:facet> <h:form> <h:panelGrid id="userinfo"> <h:outputLabel for="nameInput" value="Name:"/> <h:inputText id="nameInput" value="#{userBean.selectedUser.name}"/> <h:outputLabel for="emailInput" value="Email:"/> <h:inputText id="emailInput" value="#{userBean.selectedUser.email}"/> <h:panelGrid columns="2"> <a href="#" onclick="#{rich:component('useredit')}.hide();return false">Close</a> <a4j:commandLink actionListener="#{userBean.save}" oncomplete="#{rich:component('useredit')}.hide();return false" reRender="name, email">Save</a4j:commandLink> </h:panelGrid> </h:panelGrid> </h:form> </rich:modalPanel> </body> </html>