PDA

View Full Version : Portal Sample with Navigation



ByteLess
16 Jan 2013, 8:57 AM
I am looking for a portal sample with sample navigation links within the sample.

I tried and its error out.

I am fairly new with EXTJS4 and really need help.

I need to know exactly how do I add the dynamic navigation tree (through ajax) into the portal sample.

ByteLess
16 Jan 2013, 11:03 AM
I am getting the following from my ajax call to populate the tree.

{ "text": "WMS Links",
"expanded": false,
"items": [
{
"id": "/wms/t_kbz_quote2.cfm",
"qtip": "KBZ Pre-Quote",
"text": "KBZ Pre-Quote",
"leaf": "true"
},
{
"id": "/wms/t_ShipInvReport.cfm",
"qtip": "Ship Inquiry",
"text": "Ship Inquiry",
"leaf": "true"
},
{
"id": "/wms/t_ShipHistory.cfm",
"qtip": "Ship History Report",
"text": "Ship History Report",
"leaf": "true"
},
{
"id": "/wms/t_upd_loc.cfm",
"qtip": "Update Locations",
"text": "Update Locations",
"leaf": "true"
},
{
"id": "/wms/t_poreceipt.cfm",
"qtip": "PO Management",
"text": "PO Management",
"leaf": "true"
},
{
"id": "/wms/t_soreceipt.cfm",
"qtip": "SO Management",
"text": "SO Management",
"leaf": "true"
},
{
"id": "/wms/t_serialsmanage.cfm",
"qtip": "Scan Receivings",
"text": "Scan Receivings",
"leaf": "true"
},
{
"id": "/wms/t_currentInv.cfm",
"qtip": "Current Inventory",
"text": "Current Inventory",
"leaf": "true"
},
{
"id": "/wms/receivings/app.html",
"qtip": "Receiving Inquiry",
"text": "Receiving Inquiry",
"leaf": "true"
},
{
"id": "/wms/manage_parts/app.cfm",
"qtip": "Parts Maintenance",
"text": "Parts Maintenance",
"leaf": "true"
}
]
}

my treestore is like that.
I need help in this one that how to setup the store.


var store = Ext.create('Ext.data.TreeStore', { proxy: {
type: 'ajax',
url: 'qNavigation.cfm'
},
sorters: [{
property: 'leaf',
direction: 'ASC'
}, {
property: 'text',
direction: 'ASC'
}]
});


var tree = Ext.create('Ext.tree.Panel', {
store: store,
renderTo: 'tree-div',
//renderTo: Ext.getBody(),
rootVisible: true,
useArrows: true,
//frame: true,
//title: 'Tree',
autoscroll: true,
height: 200,
width: 250,
expand: true,
listeners: {
render: function(comp) {
var test = true;
if (test) {
}
}
}

});

ByteLess
17 Jan 2013, 7:38 AM
attached is the sample of the tree component which I am trying to attach with my portal.

the problem is I don't understand how the tree json should formatted and how the tree would be populated with the link open into center panel.

I attached the codes which I think it should work, but the links are not under the folders as well as when I try to open the folder it error out.