-
10 Mar 2009 8:49 AM #1
set initial value to MessageBox.prompt field
set initial value to MessageBox.prompt field
Hi,
I would like to know if, when I call MessageBox.prompt, I can set an initial value to the TextField that appears in the MessageBox.
Or should I use Dialog class instead of MessageBox.
Thanks !!!
-
10 Mar 2009 8:51 AM #2
is what you are looking for. Check the javadocs pleaseCode:msgbox.getTextBox
-
11 Mar 2009 12:29 AM #3
Thanks for the answer Sven. I'm moving from GWT-Ext and have some errors so I can't execute the application yet to test it.
I have read in another post that when MessageBox.prompt is called, the MessageBox will be shown immediately. So the next code is correct ..
or should I use this one:Code:MessageBox messageBox = MessageBox.prompt("", "someLabel", true); messageBox.getTextArea().setValue("aaaa");
Thanks.Code:MessageBox messageBox = MessageBox.prompt("", "someLabel", true); messageBox.addListener(Events.BeforeOpen, new Listener<MessageBoxEvent>() { publicvoid handleEvent(MessageBoxEvent be) { be.messageBox.getTextArea().setValue("aaa"); }});
-
11 Mar 2009 9:17 AM #4
first one would be fine unless you want to change the text dynamically..
-
24 Apr 2012 4:40 AM #5
how to set a value in prompt text field
how to set a value in prompt text field
Hi my code is
Ext.Msg.prompt(POPUP_CRICT_SUPPLIER_UPDATE, LABEL_CRICT_SUPPLIER_LOCATION_VALUE+' :'+depExtOwnername, function(btn, text){
});
I want to send value to text filed.
Thanks
Rajani


Reply With Quote