Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-24

NPE from Drag/Drop Support classes if a component is added, then removed from a UIComponent children collection

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      Using Myfaces 1.1.5, RichFaces 3.0.0, Ajax4JSF 1.1.0

      Description

      When adding drag/drop support programmatically to some HtmlPanelGrids I had a situation where DragSupport was added to a panelGrid, but later on in the code the panelGrid's children were cleared and replaced with other components. When this happens with either HtmlDragSupport or HtmlDropSupport a NullPointerException is thrown from

      org.richfaces.component.UIDragSupport.getEventHandler(UIDragSupport.java:110)

      I've attached a WAR file with source that demonstrates this problem. I was able to work around it once I figured out what was going on, but it should be a valid thing to do without the NPE.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                afrancuzov Alexander Francuzov
                Reporter:
                byarger Brian Yarger
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: