I'm trying to use drag and drop with a rich:scrollableDataTable. I frequently get this message when I try to drag a row from the table:
java.io.NotSerializableException: org.richfaces.model.selection.SelectionRange
This only happens if I select the row by clicking it then try to drag it. I think that the DND is trying to drag a SelectionRange instead of the actual component in the row.
How do I prevent this error?
Rob
Here is the table code:
<rich:scrollableDataTable id="available" value="#{selector.available}" var='av' sortMode='multi' rows='10' height='100px' frozenColCount='1'> <rich:column> <f:facet name='header'> <h:outputText value='Available' /> </f:facet> <a4j:outputPanel> <rich:dragSupport dragIndicator=":indicator" dragType="AVAILABLE" dragValue="#{av}"> <rich:dndParam name="label" value="#{av.english}" /> </rich:dragSupport> <h:outputText value="#{av.english}" /> </a4j:outputPanel> </rich:column> </rich:scrollableDataTable>
<rich:dropSupport acceptedTypes='AVAILABLE' dropValue='AVAILABLE' dropListener='#{selector.selectedDropListener}' reRender='available,selected' />