PDA

View Full Version : How to send and receive parameters from a field of a windows ?



realtebo2
29 Dec 2009, 6:33 AM
My app is fullfilled into a layout. Except that when i click a button, it must show a windows to the users. This windows need a parameter, an userid, to load specific content.

How to send this parameter to the window?

The windows has got a list. the user select one and click ok. Now the windows close, but, Again, how to 'retrieve' this value from the windows ?

it's something like a custom input box... but which accept a parameter

the windows has an element with autoload. it get a php page and i need to send a parameter to this page. it's the reason i need to inform the windows about a parameter
sorry for my english

29 Dec 2009, 6:58 AM
you can set it on the window's config option:

new myWindowClass ({
userParam1 : 'val1',
userParam2 : 'val2'
});

29 Dec 2009, 6:59 AM
Ext.Component's constructor (read the source) applies everything to instance object, so you can access custom properties via this.userParam1, etc.

realtebo2
29 Dec 2009, 8:55 AM
thanks (we know each other, i'm in your manning sandbox forum) ..

..

ok, windows receive params in this way, and ... how to 'resend' to code that launched it the value selected from the users? is there a way to have a 'closing value' parameter (acting like the input box)

29 Dec 2009, 9:03 AM
You can easily configure a 'beforedestroy' event listener for that :)