1. #1
    Ext User
    Join Date
    Sep 2008
    Location
    Munich
    Posts
    16
    Vote Rating
    1
    roemisch is on a distinguished road

      0  

    Default Drag&Drop from grid to grid does not work inside tab panel

    Drag&Drop from grid to grid does not work inside tab panel


    I have constructed the following panel to edit system roles: (see attachment jpg)

    The left gridPanel ("assigned functions") and the right gridPanel ("unassigned functions") are items of a containing Panel.

    When this containing Panel is not an item within a tabpanel, the drag & drop works.

    NOW THE ERROR:
    When this containg Panel is now a TabPanel item (as shown in the attached jpg), then the definition of the DropZone Container element does not work anymore as in the following code line now the ".el" method returns nil:

    var acl_privileges_droptarget_el = acl_privileges_grid.getView().el.dom.childNodes[0].childNodes[1];

    I tried with and without lazy instantiation - but that does not make any difference.
    Does anyone know this problem or has a solution ?
    I also want to mention that on the other two tabs there are also such drag & drop grids.

    I am fighting this problem since two days - but now other information in the forums could help me.
    Attached Images

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    You need to assign the dropzones AFTER the grid(s) is/are rendered.

  3. #3
    Ext User
    Join Date
    Sep 2008
    Location
    Munich
    Posts
    16
    Vote Rating
    1
    roemisch is on a distinguished road

      0  

    Default


    Thank you for the hint. Unfortunatley it does not solve the problem. I even put a 5 second delay to have everything rendered. The behaviour is that when executing the
    var acl_privileges_droptarget_el = acl_privileges_grid.getView().el. ... , the gridrows even disappear again on the screen.

    The relevant part of the code is the following (don't get confused by the ruby code within the javascript ;-) ).
    I have now the version without tabs (by commenting it out), that works. When using the tabpanel, then the error ocurrs.

    //now create the tabe panel and hang the subpanels into it
    /*
    var tabpanel = new Ext.TabPanel({
    activeTab: 1,
    hideBorders: true,
    layoutOnTabChange:true,
    items:[ privileges_select_panel, functions_select_panel, functiongroups_select_panel ]
    });
    */

    //now define the overallpanel
    var acl_edit_panel = new Ext.Panel({
    renderTo: 'system_acl-div',
    title : '
    <%= l(:title_system_role_edit)%>',
    tbar: [
    { xtype: 'button',
    iconCls: 'save',
    text: '
    <%= l(:ext_button_save)%>',
    tooltip: '
    <%= l(:ext_button_save_tooltip)%><%= l(:table_privileges)%>',
    handler: function(){save_all();}
    },
    {
    xtype: 'button',
    iconCls: 'back',
    text: '
    <%= l(:ext_button_back)%>',
    tooltip: '
    <%= l(:ext_button_back_tooltip)%>',
    handler: function(){ update_div_center('
    <%= acls_url %>','GET'); }
    }
    ],
    items : [aclfp, privileges_select_panel, functions_select_panel, functiongroups_select_panel]
    // items : [aclfp, tabpanel]
    });


    // populate form values
    aclfp.form.setValues(
    <%= @acl.to_ext_json(:output_format => :form_values )%>);


    // now load the datastores with the search and paging information
    acl_functiongroups_datastore.load({params: {start:
    <%= params[tart] ||(controller.send :previous_pagination_state, 'ActiveAcl::ControllerGroup'))[:offset] || 0%>, limit:<%= Systemsetting.default_lines_per_page %> }});
    rest_of_functiongroups_datastore.load({params: {start:
    <%= params[tart] || (controller.send(:previous_pagination_state, 'ActiveAcl::ControllerGroup'))[:offset] || 0%>, limit:<%= Systemsetting.default_lines_per_page %> }});
    acl_functions_datastore.load({params: {start:
    <%= params[tart] || (controller.send(:previous_pagination_state, 'ActiveAcl::ControllerAction'))[:offset] || 0%>, limit:<%= Systemsetting.default_lines_per_page %> }});
    rest_of_functions_datastore.load({params: {start:
    <%= params[tart] || (controller.send(:previous_pagination_state, 'ActiveAcl::ControllerAction'))[:offset] || 0%>, limit:<%= Systemsetting.default_lines_per_page %> }});
    acl_privileges_datastore.load({params: {start:
    <%= params[tart] || (controller.send(:previous_pagination_state, 'ActiveAcl::Privilege'))[:offset] || 0%>, limit:<%= Systemsetting.default_lines_per_page %> }});
    rest_of_privileges_datastore.load({params: {start:
    <%= params[tart] || (controller.send(:previous_pagination_state, 'ActiveAcl::Privilege'))[:offset] || 0%>, limit:<%= Systemsetting.default_lines_per_page %> }});


    // define the drop targets (this must happen after the rendering of the grids )
    var acl_privileges_droptarget_el = acl_privileges_grid.getView().el.dom.childNodes[0].childNodes[1];
    var rest_of_privileges_droptarget_el = rest_of_privileges_grid.getView().el.dom.childNodes[0].childNodes[1];
    var acl_functions_droptarget_el = acl_functions_grid.getView().el.dom.childNodes[0].childNodes[1];
    var rest_of_functions_droptarget_el = rest_of_functions_grid.getView().el.dom.childNodes[0].childNodes[1];
    var acl_functiongroups_droptarget_el = acl_functiongroups_grid.getView().el.dom.childNodes[0].childNodes[1];
    var rest_of_functiongroups_droptarget_el = rest_of_functiongroups_grid.getView().el.dom.childNodes[0].childNodes[1];


  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    OK,

    well you're going to need to post code dude.

    http://extjs.com/forum/showthread.php?t=43718

  5. #5
    Ext User
    Join Date
    Sep 2008
    Location
    Munich
    Posts
    16
    Vote Rating
    1
    roemisch is on a distinguished road

      0  

    Default


    I have solved the problem ! Finally you have been right with the rendering.
    I need to set deferredRender: false in the tabpanel configuration, because only then also unactivated tabs are rendered and the DropTarget Zones can be defined.
    Thank you very much for your help !!!

Thread Participants: 1

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