Java 拖放richfaces问题

Java 拖放richfaces问题,java,drag-and-drop,richfaces,Java,Drag And Drop,Richfaces,这段代码给我带来了问题(richfaces 3.3.2.GA): 问题是,当我将元素放入放置区域时,不会发生任何操作,但我确信它可以看到这个放置区域,因为我看到绿色或红色,这取决于接受的类型 但是这个概念并没有从容器中删除,也没有添加到放置区域中 当我到达此页面时,我收到以下错误: drop:带有 [form1:j_id640:_form:myPanel]ID为 在DOM树中找不到 元素可能没有客户端ID或 客户端ID尚未写入。DnD's 残废请检查 在JSF控制台中(但只是第一次尝试),使用f

这段代码给我带来了问题(richfaces 3.3.2.GA):

问题是,当我将元素放入放置区域时,不会发生任何操作,但我确信它可以看到这个放置区域,因为我看到绿色或红色,这取决于接受的类型

但是这个概念并没有从容器中删除,也没有添加到放置区域中

当我到达此页面时,我收到以下错误:

drop:带有 [form1:j_id640:_form:myPanel]ID为 在DOM树中找不到

元素可能没有客户端ID或 客户端ID尚未写入。DnD's 残废请检查

在JSF控制台中(但只是第一次尝试),使用firebug进行调试:

未找到节点“代码:”8

有人熟悉这个吗


提前感谢

我认为您对
dropListener
方法的定义不正确。它应该是
dropListener=“#{beanName.dropSuggestion}”
,而不仅仅是我认为的方法名。这可以解释为什么没有执行任何操作。我不确定您会遇到哪些其他错误。

另一个问题与a4j:form及其不兼容有关。@BlancaHdez即使我也面临着同样的问题,您是否找到了解决方案。
<rich:dragIndicator id="indicator"> </rich:dragIndicator>


                     <h:dataTable id="myData" value="#{resultArray}" var="data" >
                         <h:column>
                             <a4j:outputPanel>

                                <rich:dragSupport id="myDrag" dragIndicator="indicator" dragType="sug" dragValue="#{data}" >
                                    <rich:dndParam name="name" value="#{data.name}" >
                                        </rich:dndParam>                              
                                </rich:dragSupport>
                                <h:outputText value="#{data.name}"></h:outputText>



                            </a4j:outputPanel>
                         </h:column>
                     </h:dataTable>

        <rich:panel id="myPanel">
            <f:facet name="header">Drop Zone</f:facet>
                <rich:dropSupport id="dropZone" acceptedTypes="sug" dropListener="#{dropSuggestion}" reRender="box"/>
            </rich:panel>             


        <rich:dataTable  id="box" value="#{nameList}" var="cap2">
            <f:facet name="caption">Concepts chosen</f:facet>
                <h:column>
                    <h:outputText value="#{cap2.name}"/>
                </h:column>
        </rich:dataTable>
public void dropSuggestion(DropEvent event)


             System.out.println("OntologyActions.dropSuggestions");
            FacesContext context = FacesContext.getCurrentInstance();


            OntologyActions dropItem = new OntologyActions();
            String dropItemString=event.getDragValue().toString();

           //Get request items
            dropItem= (OntologyActions) event.getDragValue();

           //Locate the position of the dropped element
           int index = dropItem.resultArray.indexOf(dropItemString);

           System.out.println("String: " + dropItemString + " DropItem: " + dropItem.resultArray.get(index).name + " Index: " + index);

           //Add the element to the selected array
               selectedSuggestionsArray.add(dropItem.resultArray.get(index));
            nameList.add(dropItemString);

           //resultArray.remove(dropItem);
     }