Ext


Go Back   Ext JS Forums > Ext JS Community Forums (2.0) > Ext 2.x: User Extensions and Plugins

Reply
 
Thread Tools
  #101  
Old 11-04-2009, 02:51 PM
cchain's Avatar
cchain cchain is offline
Ext User
 
Join Date: May 2009
Location: San Diego, CA
Posts: 7
cchain is on a distinguished road
Default

Got it. New day, new perspective.

Thanks for pointing me back to the docs Saki, the answer was there.

I added:

     ,editorConfig:{maxWidth:792}
to the tree config, and it works great.

Any suggestions for the form I need to build that I mentioned in my initial post?
Reply With Quote
  #102  
Old 11-05-2009, 05:38 AM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,859
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

Listen to selectionchange event and fill in the form from the listener.
Reply With Quote
  #103  
Old 11-06-2009, 12:58 PM
cchain's Avatar
cchain cchain is offline
Ext User
 
Join Date: May 2009
Location: San Diego, CA
Posts: 7
cchain is on a distinguished road
Default

This is working for me now:

// tree node select listener
nav.tree.on('click',function(node){        
    nav.form.load({
        params:{cmd:'getNodeDetail',id:node.id}
        ,url:'content/editors/nav/qry_navEditor.cfm'
        });
});
Is there a particular reason I should use selectionchange as opposed to click?

I tried replacing click with selectionchange in the code above, but it didn't work...
Reply With Quote
  #104  
Old 11-07-2009, 09:54 AM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,859
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

Click fires everytime you click, selectionchange fires only when selection changes. BTW, selectionchange is event of SelectionModel not of TreePanel - that is most likely the reason why it didn't work for you.
Reply With Quote
  #105  
Old 11-16-2009, 02:14 PM
cchain's Avatar
cchain cchain is offline
Ext User
 
Join Date: May 2009
Location: San Diego, CA
Posts: 7
cchain is on a distinguished road
Thumbs up

Using code I found in remoteTreePanel.js, I modified the code to this:

// tree node select listener
voa.tree.getSelectionModel().on({
    selectionchange:{
        scope:this, fn:function(selModel, node){
            accred.form.load({
                params:{cmd:'getNodeDetail',id:node.id}
                ,url:'content/accred/qry_accredform.cfm'
            });
        }
    }
});
Seems to work just fine. Hopefully someone else can benefit from this... often times, I just need a code example to see how to apply the suggestions provided.

Saki, thanks for your help!
Reply With Quote
  #106  
Old 11-16-2009, 04:23 PM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,859
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

Thank you for sharing that - can be useful for others.
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 10:03 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.