1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    8
    Vote Rating
    0
    makados is on a distinguished road

      0  

    Default [CLOSED] ComboBox.select before rendering gives NullPointerException

    [CLOSED] ComboBox.select before rendering gives NullPointerException


    If I try to use method select just after creation ComboBox throws a NullPointerException. For example the next code:
    Code:
    ComboBox comboBox = new ComboBox();
                comboBox.setStore(listStore);
                comboBox.setDisplayField("name");
                comboBox.setEditable(true);
                comboBox.select(1);
    gives
    Code:
    [ERROR] Uncaught exception escaped
    java.lang.NullPointerException: null
        at com.extjs.gxt.ui.client.widget.form.ComboBox.select(ComboBox.java:351)
    PS. I have 3 items in the comboBox and it works well without using method select. But I need to select values.

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Code:
      /**
       * Select an item in the dropdown list by its numeric index in the list. This
       * function does NOT cause the select event to fire. The list must expanded
       * for this function to work, otherwise use #setValue.
       * 
       * @param index the index of the item to select
       */
      public void select(int index) {}
    You most likely want to be using setValue. select should only be used when the list is expanded. I changed the code so that the null pointer will not be thrown.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi