1. #1
    Ext User Pmithrandir's Avatar
    Join Date
    Sep 2008
    Location
    Rennes - France
    Posts
    40
    Vote Rating
    0
    Pmithrandir is on a distinguished road

      0  

    Default Change portlet to use the body to drag.

    Change portlet to use the body to drag.


    Hello
    I wan't to use the functionnaly of portlet to reorder my components on my web page.

    I don't want to use the header drag, and i set it to disabled.

    The probleme is that i can't change the draggable object to enabled proxy(to drag on the body of my portlet).

    Is it a possibility to have this functionnality ?

    Pierre
    Code:
        final MyPortlet portlet = new MyPortlet();
        portlet.setHeaderVisible(false);
        this.configPanel(portlet);
        Draggable d = (Draggable) portlet.getData("gxt.draggable");
        d.setUseProxy(true); <---null pointer exception
        portlet.addText(this.getBogusText());
        return portlet;

  2. #2
    Ext User
    Join Date
    Oct 2008
    Posts
    126
    Vote Rating
    0
    LINEMAN78 is on a distinguished road

      0  

    Default


    Well, I got your code to work, but it doesn't work like you want because it doesn't really work with the portal and the portlet disappears as soon as you let go. There are a lot of things that you need to apply to the draggable object that come from the portal itself that I am not sure how you get. All you really need is the default draggable object for the portlet and change the handle. This would be a very easy thing to add I think, I would suggest putting this in the feature request forum so that the developers see this, or you could try exposing the draggable object yourself. To get your code to work without failing do this:

    Code:
    Draggable d = new Draggable(portlet);

  3. #3
    Ext User Pmithrandir's Avatar
    Join Date
    Sep 2008
    Location
    Rennes - France
    Posts
    40
    Vote Rating
    0
    Pmithrandir is on a distinguished road

      0  

    Default


    Hello

    I try your answer, but if the object is draggable, i don't have the INSERT possibility of the Portal item.(with move effect of other element on mouse over event.)

    I don't understand what your are saying about the handle ?

    Portal is the Handle of portlet ? (problem of translation for me I think).

    Have you any idea to active drag on the footer of the portlet element ?

    Thanks

    Pierre
    I search a job in Toronto or Vancouver for february 2009.
    Call me by private message.

  4. #4
    Ext User Pmithrandir's Avatar
    Join Date
    Sep 2008
    Location
    Rennes - France
    Posts
    40
    Vote Rating
    0
    Pmithrandir is on a distinguished road

      0  

    Default


    A colaborator of me have recode all Portal item.

    On INSERT method, she has disabled the getHeader() on draggable.

    It works for us, but it will be good if there is a method : activateMoveFromContent().

    Pierre
    I search a job in Toronto or Vancouver for february 2009.
    Call me by private message.

  5. #5
    Ext User
    Join Date
    Oct 2008
    Posts
    126
    Vote Rating
    0
    LINEMAN78 is on a distinguished road

      0  

    Default


    Code:
        public void onModuleLoad() {
            Viewport viewport = new Viewport();
            viewport.setLayout(new FitLayout());
            //viewport.add(new PortalExample());
            
            viewport.add(new MyPortal());
            
            RootPanel.get().add(viewport);
        }
        
        public class MyPortal extends LayoutContainer
        {
            public MyPortal()
            {
                setLayout(new FlowLayout());
                
                Portal portal = new Portal(2);
                portal.setColumnWidth(0, .33);
                portal.setColumnWidth(1, .66);
                
                Portlet portlet = new Portlet();
                portlet.setHeaderVisible(false);
                Draggable d = new Draggable(portlet);
                d.setUseProxy(true);
                d.setMoveAfterProxyDrag(false);
                d.addListener(Events.DragEnd, new Listener<DragEvent>(){
                    public void handleEvent(DragEvent be) {
                        Window.alert("Drag end "+be.getXY().toString());
                    }});
                portlet.addText("test");
                
                portal.add(portlet, 1);
                
                add(portal);
            }
        }

  6. #6
    Sencha User
    Join Date
    Apr 2011
    Posts
    1
    Vote Rating
    0
    Chameen is on a distinguished road

      0  

    Default


    hi,
    I also have the same requirement . Is this functionality now implemented there in latest version of ext gwt?

    does anyone know how to do this?

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar