4 Replies Latest reply on May 20, 2010 9:56 AM by porek

    waiting for my combobox list ..

      Hello Everybody ,
      Here is my problem :
      I have two combobox in my screen.
      The first one allows users to select a country from the given list..
      After that , a sql request is send to the server to get a list of towns, corresponding to the selected country.This request can take some time.So, i want to lock the second combobox until the request ending.Somebody can tell me How to do that ?
      Sorry for my bad english..

        • 1. Re: waiting for my combobox list ..
          tmalatinszki

          In this case You can use the disabled property of combobox, for example:


          <rich:comboBox .... disabled=#{yourBean.selectedCountry==null}>



          This way the combobox will be disabled until there is no selected country.


          Regards,


          Tamas

          • 2. Re: waiting for my combobox list ..
            tmalatinszki

            Sorry, my fault, the correct usage is:


            <rich:comboBox .... disabled="#{yourBean.selectedCountry==null}">




            • 3. Re: waiting for my combobox list ..

              Thanks you.
              But another is : the first time , the second combobox is disabled because the list is empty.
              if we change the country after, the list is not empty ,it contains towns of the precedent choosen country, and it will not be disabled until the end if the second request...
              i want my second combobox to be disabled durind each request...

              • 4. Re: waiting for my combobox list ..

                Thanks you.
                But another problem is : the first time , the second combobox is disabled because the list is empty.
                if we change the country after that, the list is not empty ,it contains towns of the precedent choosen country, and it will not be disabled until the end of the second request...
                i want my second combobox to be disabled durind each request...