1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    12
    Vote Rating
    0
    proesterchen is on a distinguished road

      0  

    Question Need help with qtipCfg via json on TreeNode

    Need help with qtipCfg via json on TreeNode


    Hey folks,

    I'm displaying a Quicktip on async treenodes which are passed via json:

    PHP Code:
    array_push($roles, array(
                    
    "iconCls" => "role",
                    
    "leaf" => "true",
                    
    "text" => $row["ROLE_NAME"],
                    
    "qtipCfg" => array(
                        
    "xtype" => "quicktip",
                        
    "title" => $row["ROLE_DESCRIPTION"],
                        
    "width" => 500,
                        
    "text" => $qtipText
                    
    )
    )); 
    while $qtipText is filled before and could have many rows delimited by <br />. So far, this is working pretty well (widht 500px, displaying a title and the text). Now I wanted to extend the config with
    PHP Code:
                        "dismissDelay" => 0,
                        
    "height" => "500",
                        
    "autoScroll" => "true" 
    but those have no impact at all.

    Does anyone know which parameters are taken or how I can reach the goals of disable automatic hiding and display the Quicktip with a limited height and a scrollbar?

    Any help is appreciated! Thanks in advance....

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Configure it autoHeight: false

    See autoHide

  3. #3
    Sencha User
    Join Date
    Feb 2010
    Posts
    12
    Vote Rating
    0
    proesterchen is on a distinguished road

      0  

    Default


    Hi Animal,

    thanks for the quick reply. I tried with autoHide, it worked, but had the effect, that the QuickTip was still displayed after mouseout. Than I retreid with "dismissDelay" => 0 which again had no effect. "dismissDelay" => 5000000000000 did the work now!

    With "autoHeight" => "false" or "autoHeight" => falsestill no success...

    Still trying..

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    autoHeight: false should work.

    Need to see the resulting Javascript, not PHP.

  5. #5
    Sencha User
    Join Date
    Feb 2010
    Posts
    12
    Vote Rating
    0
    proesterchen is on a distinguished road

      0  

    Default


    Hi Animal,

    as the qtipCfg is taken from the json, here is the console.log from the qtipCfg:

    Unbenannt.PNG

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    The resulting Javascript.

    I don't know what you have logged there. It looks bad. el as a span???

  7. #7
    Sencha User
    Join Date
    Feb 2010
    Posts
    12
    Vote Rating
    0
    proesterchen is on a distinguished road

      0  

    Default


    I logged the attributes.qtipCfg of the leaf, as it comes back from the server (load: function(node)....)

    As I can see in the HTML-Dom the leaf is rendered as a nested span...

    So what looks bad about it?

    Cheers...

  8. #8
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    How come the qtipCfg has an el?

    Look at the JSON as it is received through Ajax when the TreeLoader requests the node. Use Firebug.

  9. #9
    Sencha User
    Join Date
    Feb 2010
    Posts
    12
    Vote Rating
    0
    proesterchen is on a distinguished road

      0  

    Default


    Hi Animal,

    so this is the json comming back from the server:

    Code:
    [
        {
            "iconCls": "role",
            "leaf": "true",
            "text": "rol_OE_2",
            "qtipCfg": {
                "xtype": "quicktip",
                "title": "Mitarbeiter darf Daten sehen",
                "width": 500,
                "text": "RestrictionOrganization | 11 | true<br\/>",
                "dismissDelay": 600000,
                "autoHeight": false,
                "height": 500
            }
        },
        {
            "iconCls": "role",
            "leaf": "true",
            "text": "rol_I-1",
            "qtipCfg": {
                "xtype": "quicktip",
                "title": "Rolle 1",
                "width": 500,
                "text": "AdminGlobal | adminobject | true<br\/>AdminGlobal | adminglobal | true<br\/>AdminSubstitute | AdminSubstitute | true<br\/>AdminSubstitute | adminobject | true<br\/>AdminSubstitute | AdminSubstituteA | true<br\/>AdminSubstitute | AdminSubstituteLevel | true<br\/>",
                "dismissDelay": 600000,
                "autoHeight": false,
                "height": 500
            }
        }
    ]
    Don't know why it has an el when I log it in javascript...

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I'd say use a single Ext.ux.DataTip instance on the tree, configured as you want it, and with a tpl of '{text}'

Similar Threads

  1. Using 'anchor', 'anchorOffset', and 'anchorToTarget' on Treenode qtipCfg
    By wilzan in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 1 Sep 2009, 8:38 AM
  2. Help with TreePanel qtipCfg
    By donnki in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 31 Aug 2009, 1:24 AM
  3. How to specify a qtipCfg in json for treenode
    By mabra in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 13 Jul 2009, 11:28 AM
  4. TreeNode and qtipCfg
    By leoncx in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Mar 2009, 12:29 AM
  5. AsyncTreeNode qtipCfg from JSON
    By crxtech in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 25 Mar 2009, 12:28 AM

Thread Participants: 1

Tags for this Thread