ICEfaces
  1. ICEfaces
  2. ICE-2680

dragEvent.getTargetDragValue() always null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7DR#3
    • Fix Version/s: 1.7RC1, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces

      Description


      The event passed to the dragListener returns null for event.getTargetDragObject()

      This can be seen in the following code from component-showcase that is far more complex than necessary:

              if (event.getEventType() == DndEvent.DROPPED) {
                  String targetId = event.getTargetClientId(); if ((targetId != null) &&
                      (targetId.indexOf("cartDropTarget") != -1)) {
                      String value = ((HtmlPanelGroup) event.getComponent())
                              .getDragValue().toString();

        Issue Links

          Activity

          Hide
          Adnan Durrani added a comment -

          Hi Harvey,

          Can you please, test your application with the latest change.

          Thanks,

          Show
          Adnan Durrani added a comment - Hi Harvey, Can you please, test your application with the latest change. Thanks,
          Hide
          Harvey McQueen added a comment -

          I'm attaching the patch from the GroupRenderer I am using.

          And here's a snippet of my code. I'm using panelSeries, no dataTables.

          <ice:panelSeries id="prototypes" value="#

          {editLayout.prototypes}

          " var="prototype">
          <ice:panelGroup style="cursor:move;" draggable="true" dragOptions="dragGhost"
          dragValue="#

          {prototype}

          ">
          ...
          </ice:panelGroup>
          </ice:panelSeries>

          <ice:panelSeries id="elements" value="#

          {editLayout.elements}

          " var="element">
          <ice:panelGroup style="cursor:move;" draggable="true" dragOptions="dragGhost"
          dragValue="#

          {element}

          " dropTarget="true"
          dropListener="#

          {editLayout.dropListener}

          "
          dropMask="hover_start" hoverclass="seriesHover">
          ...
          </ice:panelGroup>
          </ice:panelSeries>

          Show
          Harvey McQueen added a comment - I'm attaching the patch from the GroupRenderer I am using. And here's a snippet of my code. I'm using panelSeries, no dataTables. <ice:panelSeries id="prototypes" value="# {editLayout.prototypes} " var="prototype"> <ice:panelGroup style="cursor:move;" draggable="true" dragOptions="dragGhost" dragValue="# {prototype} "> ... </ice:panelGroup> </ice:panelSeries> <ice:panelSeries id="elements" value="# {editLayout.elements} " var="element"> <ice:panelGroup style="cursor:move;" draggable="true" dragOptions="dragGhost" dragValue="# {element} " dropTarget="true" dropListener="# {editLayout.dropListener} " dropMask="hover_start" hoverclass="seriesHover"> ... </ice:panelGroup> </ice:panelSeries>
          Hide
          Harvey McQueen added a comment -

          I don't see a revision 15964 in subversion.

          Show
          Harvey McQueen added a comment - I don't see a revision 15964 in subversion.
          Hide
          Harvey McQueen added a comment -

          I've got that revision now and will test it Monday.

          Show
          Harvey McQueen added a comment - I've got that revision now and will test it Monday.
          Hide
          Harvey McQueen added a comment -

          Sorry it took me so long to get back to you. I tested it and it still doesn't work. From my debugging, the only to values I see for dndType in GroupRenderer.decode are "dragdrop" and "DRAG".

          If you take a look at the patch file I attached previously, I put the code to retrieve the dragValue and the dropValue inside the if statements that check for a dragListener or a dropListener. I believe this works because the method of retrieving the dragValue and dropValue depends on whether you are creating the event for a dragListener or dropListener. I can't think of all the possible test cases though, so I'm not sure whether this is the best way to do it.

          Show
          Harvey McQueen added a comment - Sorry it took me so long to get back to you. I tested it and it still doesn't work. From my debugging, the only to values I see for dndType in GroupRenderer.decode are "dragdrop" and "DRAG". If you take a look at the patch file I attached previously, I put the code to retrieve the dragValue and the dropValue inside the if statements that check for a dragListener or a dropListener. I believe this works because the method of retrieving the dragValue and dropValue depends on whether you are creating the event for a dragListener or dropListener. I can't think of all the possible test cases though, so I'm not sure whether this is the best way to do it.

            People

            • Assignee:
              Unassigned
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: