Announcement

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

    Question about databound SelectItems

    Hi, I have a databound form with a bunch of databound selectItems that are populated when the form fetches. My problem is that they sometimes send 2 fetch requests to their optionDatasources.

    It looks like the selectitems are trying to fetch a missing value since one of the fetch requests has methodName:"fetchMissingValueReply" in the callback of the DSRequest.

    Since it only happens sometimes and to different selectitems, I'm guessing that they send the extra request if they haven't gotten the response from the first one by the time they get their data from the form.fetchData.

    Since I am fetching whole valuemap for the select item the first time, the second fetch is just a waste.

    Can you explain what causes the second ("fetchMissingValueReply") fetch to fire and how I turn it off?

    I have attached a screenshot of two of these fetches from the developer console RPC tab.

    Let me know if you need any more data.
    Attached Files

    #2
    See FormItem.fetchMissingValues for an explanation of these automatic fetches and when they occur.

    Comment


      #3
      Okay, that explains it then.

      Is there a way to know if the form and all its related optionDatasources are done fetching so I can delay the draw untill then?

      Comment


        #4
        No, since drawing is what triggers the fetch (at least in some cases).

        Why would you delay drawing anyway?

        Comment


          #5
          Okay.

          I wanted to delay the draw because my form is in a modal window, and it would be nice if every thing was done fetching when the window was drawn.

          Comment


            #6
            It's still not clear why that would be important - the display of the form and Window is not blocked by the network fetch, so the fact that the browser drawing and server round-trip are happening simultaneously is generally considered a good thing.

            Comment


              #7
              It's not important. The reason I wanted to wait with the draw was because the selectitems were still showing "Loading" when the form was drawn, so I would rather delay the draw so all the valuemaps were done fetching when the form was drawn, but like I said it's not important. Considder the issue closed.

              Comment

              Working...
              X