Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    69
    Vote Rating
    0
    Rvanlaak is on a distinguished road

      0  

    Default [FIXED] [2.0 M1] Bug in dragSource.disable()

    [FIXED] [2.0 M1] Bug in dragSource.disable()


    When using the DnD functionality, I want to disable the dragSource when an event happens. I've got it working, but it seems GXT doesn't really disable the dragging, but only hides the content. It is still possible to drag and it leaves a artifact at the right bottom of the mouse cursor (as shown on screenshot)

    Code sample (without get/setters and imports) :


    public class QueueCurrent extends LayoutContainer {

    private Html html;
    private String callerNumber;
    private String sourceChannel;
    private Button redirectButton;
    private Button notesButton;
    private NoteDetailsWindow noteWindow = new NoteDetailsWindow();
    private DragSource source;

    private StaticServiceAsync asterSvc = GWT.create(StaticService.class);

    public QueueCurrent() {

    setLayoutOnChange(true);
    setBorders(true);
    setSize(200, 50);

    html = new Html();
    add(html, new FlowData(3));

    source = new DragSource(html) {
    @Override
    protected void onDragStart(DNDEvent event) {
    // by default drag is allowed
    event.setData(html);
    event.getStatus().update(
    El.fly(html.getElement()).cloneNode(true));
    }

    @Override
    protected void onDragDrop(DNDEvent event) {

    super.onDragDrop(event);

    System.out.println("DragSource: " + event.getDragSource());
    System.out.println("DropTarget: " + event.getDropTarget());

    }
    };
    // group is optional
    source.setGroup("dnd-call");

    // Set initial state
    unsetCallData();
    }

    /**
    * Set the source channel of the DnD box, needed for redirecting
    */
    public void setCallData(String name, String sourceChannel, String callerNumber) {
    html.setHtml(name);
    html.setStyleName("queueCurrent-active");
    html.setToolTip("Kanaal: " + sourceChannel);
    setSourceChannel(sourceChannel);
    setCallerNumber(callerNumber);
    redirectButton.setEnabled(true);
    notesButton.setEnabled(true);
    source.enable();
    }

    public void unsetCallData( ) {
    html.setHtml("---");
    html.setStyleName("queueCurrent-inactive");
    html.hideToolTip();
    setSourceChannel(null);
    setCallerNumber(null);
    redirectButton.setEnabled(false);
    notesButton.setEnabled(false);
    source.disable();
    }

    }
    Attached Images

  2. #2
    Ext User
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    69
    Vote Rating
    0
    Rvanlaak is on a distinguished road

      0  

    Default


    As i've compiled the application to Firefox, it seems that FF doesn't show above artifact under the cursor.

    If I open the same compiled site in IE7, the dashed artifact does show up. It isn't a Hosted-Mode only bug...

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Yes i confirmed that and have a fix ready.

  4. #4
    Ext User
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    69
    Vote Rating
    0
    Rvanlaak is on a distinguished road

      0  

    Default


    Looks like the Hosted mode does use IE to render things.. :P

  5. #5
    Ext User
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    69
    Vote Rating
    0
    Rvanlaak is on a distinguished road

      0  

    Default


    Is it also possible to disable the status fly ghost item? When the DragSource is disabled, the ghost still stays active. I can't find a way to disable the ghost.

    Besides that,, how can I drag DataListItems? The example explorer tells about List to List dnd, but I want to drop a list item at top of a other target (button). The ListViewDragSource is able to drag multiple items, but I only want to drag one item.

  6. #6
    Ext User
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    69
    Vote Rating
    0
    Rvanlaak is on a distinguished road

      0  

    Default


    Actually, it looks like the List selection mode is blocking the DnD event. Is it possible to disable a list from selection?

  7. #7
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed in SVN.

  8. #8
    Ext User
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    69
    Vote Rating
    0
    Rvanlaak is on a distinguished road

      0  

    Default


    The bug is solved in the M2 build. Now a selection will be made. Is it possible to override this select action? The entire viewport is filled with blue because of the selection.

  9. #9
    Ext User
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    69
    Vote Rating
    0
    Rvanlaak is on a distinguished road

      0  

    Default DnD DataList

    DnD DataList


    Quote Originally Posted by Rvanlaak View Post
    Actually, it looks like the List selection mode is blocking the DnD event. Is it possible to disable a list from selection?
    I can't figure out how to make the items in a datalist draggable, is this fixed in the M2 build or am i doing something wrong?

    Code:
    
    public class QueueItem extends DataListItem {
    
    ............
    
        public QueueItem(String callerIdName, String phoneNumber, String uniqueId,
                String channel, String queueName) {
    
            .......
            
            
            source = new DragSource( this ) {
                
                @Override
                protected void onDragStart(DNDEvent event) {
                    // by default drag is allowed
                    event.setData( getChannel() );
                    event.getStatus().update( getCallerIdName() );
                    
                    System.out.println("DragStart");
                }
                
            };
            // group is optional
            source.setGroup("dnd-call");
            
        }
    }
    Playing with some of the DataList properties doesn't work...

  10. #10
    Ext User
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    69
    Vote Rating
    0
    Rvanlaak is on a distinguished road

      0  

    Default


    Anybody who has got the Dragging working withing lists?

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi