Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Loading icon on screen when combo box item is fetching  data from picklist

    Hi Team,

    We are fetching data from picklist using criteria for combobox item. We need to put the loading icon on screen (so that no other network call will fire) when combox item is fecting data (on criteria change). The combo box item is in the listgrid.


    ComboBoxItem item = new ComboBoxItem();
    item.setPickListFilterCriteriaFunction(itemContext -> {
    Criteria criteria1 = new Criteria();
    criteria1.setCritera("val1","xxx");
    return criteria1;
    });

    #2
    You should be able to use setOptionFilterContext to customize the DataSource request for the fetch, including setting showPrompt and promptStyle

    Regards
    Isomorphic Software

    Comment


      #3
      Hi ,

      Thanks for replying , I tried the same but it's not blocking any network or adding any loading icon to screen below is the code snippet

      ComboBoxItem item = new ComboBoxItem();
      item.setPickListFilterCriteriaFunction(itemContext -> {
      Criteria criteria1 = new Criteria();
      criteria1.addCriteria("","");
      return criteria1;
      });

      DSRequest req = new DSRequest(DSOperationType.FETCH);
      req.setShowPrompt(true);
      req.setPromptStyle(PromptStyle.DIALOG);
      item.setOptionFilterContext(req);

      Comment


        #4
        Thanks for letting us know.
        We'll take a look, but can we also get a couple of clarifications on what your expected behavior is here?

        The dataSource request prompt either shows a blocking pop-up dialog with a text and a loading icon, or it shows a custom cursor to indicate the system is busy (and again blocks interaction).
        Is that what you're looking for when you say "showing a loading icon" or are you looking for a loading icon in the body of the combo-box pickList (or something else)?

        Secondly - when you say "blocking any network" - what are you looking for? The wait-prompts for requests block user interaction with the application, but wouldn't necessarily block http-requests to the server (other dataSource requests triggered programmatically, rather than from user action).
        Is that sufficient for your usage or are you looking for something else? Can you give us an overview of what you're currently seeing in terms of interactions that you want to block?

        Thank you
        Isomorphic Software

        Comment


          #5
          Hi Team,

          Below is the use case , what we want to achive.
          We have a combo box item in list grid. When user clicks on comboboxitem. The criteria fires and fetch request is made to server to get the records. Till the time records are fetching ,we want to block the whole UI so end user can not do any operation till the time picklist is getting fetched. So the loading icon will be on whole screen and not just on the combobox.

          Thanks

          Comment


            #6
            OK, you didn't actually post anything "below", perhaps a screen shot was missing.

            As far as your described requirement, the approach we indicated achieves that. Take your code for configuring the optionFilterContext and add it to one of the standard ComboBoxItem samples and you will see this.

            Comment


              #7
              Hi Team,

              I tried with optionFilterContext , but not working I have already pasted the code in comment #3 , is it someting to do with criteria ?

              Thanks,
              Ankit

              Comment


                #8
                The code you posted was not complete. The approach works, so try it, and if you can't get it working, then post a complete, minimal, ready-to-run example showing your actual code.

                Comment

                Working...
                X