Hybrid View

  1. #1
    Ext User
    Join Date
    Mar 2009
    Location
    Castellter├žol (Catalonia)
    Posts
    13
    Vote Rating
    0
    pepgrifell is on a distinguished road

      0  

    Default 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 !!!

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Code:
    msgbox.getTextBox
    is what you are looking for. Check the javadocs please

  3. #3
    Ext User
    Join Date
    Mar 2009
    Location
    Castellter├žol (Catalonia)
    Posts
    13
    Vote Rating
    0
    pepgrifell is on a distinguished road

      0  

    Default


    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 ..

    Code:
    MessageBox messageBox = MessageBox.prompt(
    "", "someLabel", true); messageBox.getTextArea().setValue("aaaa");
    or should I use this one:

    Code:
    MessageBox messageBox = MessageBox.prompt(
    "", "someLabel", true); messageBox.addListener(Events.BeforeOpen, new Listener<MessageBoxEvent>() { publicvoid handleEvent(MessageBoxEvent be) { be.messageBox.getTextArea().setValue("aaa"); }
    });
    Thanks.

  4. #4
    Ext User
    Join Date
    Oct 2008
    Location
    Atlanta ,GA
    Posts
    239
    Vote Rating
    0
    kolli is on a distinguished road

      0  

    Default


    first one would be fine unless you want to change the text dynamically..

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Rajani is on a distinguished road

      0  

    Default 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

Thread Participants: 3