i want to build an tree with richfaces through the "recursiveTreeNodeAdaptor". And i added the DragAndDrop in it to realize the function of dragging any elements and dropping them anywhere in the same tree. problem: when i drag one elements and drop it in another,the elements can't be removed in the pre-directory.sometimes a NullPointerException will occur with 'drogValue'. here is my jsp
<rich:tree id="tree" style="width:150px" switchType="ajax"> <rich:recursiveTreeNodesAdaptor id="treenodeadaptor" roots="#{treeBean.points}" var="item" nodes="#{item.points}" includedNode="#{item.render=='real'}"> <rich:treeNode id="treenode" ajaxSingle="true" dragIndicator=":indicator" acceptedTypes="#{item.type}" dragType="dir" dragListener="#{treeBean.dragProcess}" dropListener="#{treeBean.dropProcess}" reRender="tree" dragValue="#{item}" dropValue="#{item.id}"> <a4j:commandLink value="#{item.name}" actionListener="#{treeBean.clickProcess}"> <f:param value="#{item.name}" name="name"></f:param> </a4j:commandLink> </rich:treeNode> </rich:recursiveTreeNodesAdaptor> </rich:tree>
the information in tomcat server:
Failed to re-render tree node: form:tree:treenodeadaptor_:6:treenodeadaptor_:0 due to model data unavailability! Maybe parent node should be re-rendered instead?