PDA

View Full Version : Load the input with a value from the database.



gigofizz
9 Feb 2012, 8:01 AM
Img 1: Register value
31541

Img 2: List of registered data.
31542

Img 3: View the registered row.
31545

Help: How to recover the value registered in the view. (Img3)

Code: Controller.js

showEdit: function(view, record, item, idex, e, eOpts){

//TODO: Buscar mejor manera de obtener el panel
var panel = view.ownerCt.ownerCt.ownerCt.tabPanel;

var title = record.get('cli_empresa'); //Title tab
var id = record.get('cli_codigo'); //Recover Id
var datos = record.get();

// to check tab to exist, the new tab to create
//var mytab = panel.down('[id="' + id + '"]');
var mytab = panel.getComponent(id);

if (!mytab) {
mytab = Ext.create('SG.crm.view.clients.completeView', {
locale: SG.config.locale,
closable: 'true',
title : title,
itemId: id
});
panel.add(mytab);
}
// tab exist to active
panel.setActiveTab(mytab);
panel.doLayout();
}

Thanks you.

mitchellsimoens
9 Feb 2012, 9:34 AM
What do you mean recover the value registered to the view?

gigofizz
9 Feb 2012, 9:38 AM
I want to use the value that i previously add to the DB in the input (In the window view).

mitchellsimoens
9 Feb 2012, 9:42 AM
reject the changes

gigofizz
9 Feb 2012, 10:13 AM
In Conclusion:
I want to do is , click on therow of the grid, show me a different window with your data on that row.

Img 1
31550

Img 2
31549

I intend to show the data the img1 in of img2 (in the part superior).

Thanks you!!!