PDA

View Full Version : extending window functionality



lormitto
2 Mar 2010, 11:55 AM
Hi,

Well, it might seem for you as novice question (who i am in fact) but I would like to ask for help with extending Ext.Window functionality.

I will try to operate on example code:


var testWindow = new Ext.Window({
title : "someTitle", closable : true, modal : true, id: 'testWindow',
width : 800, height : 600, minimizable : false, resizable : true,
draggable : true, shadowOffset : 8, layout: 'form', items :[],
closeAction : "hide"
});

Let's say that i want to put some variable sent from outside testWindow at "title: place.
I believe extending class is a general solution but truly speaking I've got no idea how to start with it. I would be thankful if you could show first steps.

TopKatz
2 Mar 2010, 12:50 PM
why not just set it?

testWindow.setTitle('new title')

lormitto
2 Mar 2010, 1:09 PM
why not just set it?

testWindow.setTitle('new title')

thank you for reply.

However i am considering more sophisticated aproach. Imagine that you click on grid. Window is opened. It consists nested tabPanel. One of the tabs has another grid which is build on sql query which uses id sent from first grid-click.

In fact that's my purpose :)

Knowladge how to extend one class might be crucial here but maybe there's another aproach i do not see at the moment.

art.home.ext
2 Mar 2010, 2:18 PM
See http://www.extjs.com/forum/showthread.php?t=28085&highlight=extending