PDA

View Full Version : Pop a wait message?



TheBigOnion
31 Aug 2010, 6:55 AM
Hello all,

I have a button on my form that is tied to a function. The function simply has a

var connection = new Ext.data.Connection().request({
in it.

My question is how can I get a wait message to appear while my function is running. I tried to add

waitTitle and waitMsg to the Connection but it did not work.

Can someone give me an example of how to launch a wait message?

Thanks.

christian130
31 Aug 2010, 7:05 AM
do u wanna use native extjs code or u can use another framework also. Extjs and jquery have an adapter named jqueryextjsadapter using this u can use a $.jgrowl and in the callback of the function u wanna call or the datastore u can introduce it i'm going to put an example:

here comes the definition of the proxy, the jsonreader/xmlreader/reader(any) and the store



var ds_random_employee_data_active;
var proxy2= new Ext.data.HttpProxy({
// this json data contains only employees where active is 'true'
url: '/modulos/despacho/mantenimientos/satrim/acciones.php?acc=GETACT',
method:'GET'


});
var rd_random_employee_data = new Ext.data.JsonReader({}, [ 'id', 'nombre','x','alicuotas','ut']);
ds_random_employee_data_active = new Ext.data.Store({
proxy: proxy2,
reader: rd_random_employee_data,

remoteSort: false
});

and here we get the callback function of whatever in this case i use a store which i defined above


$.jGrowl("ESPERE UN MOMENTO", { theme: "satisfactorio", header: 'POR FAVOR ESPERE (CARGANDO)...' },{ sticky: true });
store.load({params:{anio:varanio},callback:function(){
$('.close').trigger('click');// using this will stop the user prompt


// use jquery jgrowl to pop up a message
}})

TheBigOnion
31 Aug 2010, 7:18 AM
no of course not. Just plain extjs.

Animal
31 Aug 2010, 7:44 AM
Display an Ext.Window

TheBigOnion
31 Aug 2010, 9:00 AM
Just a blank window? How will that tell them what is happening?

Animal
31 Aug 2010, 9:53 AM
Well put a message in it!

steffenk
31 Aug 2010, 2:38 PM
:)