0

I tried to load ONE data column using RESTful viewItemFileService and use it in dojo filtering select control for selection. The total rows is 50,000 and seems that REST could not handle big data because I set count=1000000. If I set count=500, then it works but the rest of data after 500 not available for selection in dojo filtering control. I would like to see RESTful can load data per count size but it seems no doing that. My code as below. I must missing something.

<xe:restService id="restActivity" jsId="activityStore"
        pathInfo="activities">
        <xe:this.service>
            <xe:viewItemFileService viewName="lkpActivities"
                dojoType="dojo.data.ItemFileReadStore" var="rowActivity"
                contentType="application/json" compact="true" systemColumns="4"
                count="1000000">
                <xe:this.columns>
                    <xe:restViewColumn columnName="Activity"
                        name="Activity">
                    </xe:restViewColumn>
                </xe:this.columns>
            </xe:viewItemFileService>
        </xe:this.service>
    </xe:restService>

    <xe:djFilteringSelect id="djfsActivity"
                            promptMessage="Please type the first letter of intended activity"
                            invalidMessage="No activity found.  Please type again"
                            searchAttr="Activity" labelAttr="Activity" store="activityStore"
                            pageSize="20">
                        </xe:djFilteringSelect>
  • 2
    You should try load data from rest service based on what user tries to type in the djFilterSelect. Loading everything (what if you have 1mln entries??) is a bad practice since application users will get it every time they load the page – Egor Margineanu Oct 22 '13 at 21:52
  • Thanks much. I see your points and expecting to work that way by setting the count number. If I set count to 500, it only return 500. The rest after that not available for selection!!! I expect that it should load the next 500 lot when user typing but NOT happening. If no number being set to count, then it returns 10 by default. That's why I put million but it is not worked either. I just follow this example http://www.ibmpressbooks.com/articles/article.asp?p=1924777&seqNum=6 – Dragon Chow Oct 23 '13 at 12:00
  • 1
    This might simply be a timeout issue. If it has to pull data from 50,000 view entries on the off chance that some of them might match the user input, Dojo might just be giving up before the server returns a response. I'd suggest using a custom rest service that just does a `getAllEntriesByKey` based on the entered query so that you're only reading entries that are valid. – Tim Tripcony Oct 23 '13 at 21:23
  • Thanks. I made it work by setting a value to "Keys" property. This works similar as per your suggestion. Just wonder if we have ton of data to load, then how to fetch data lot by lot set by count property. – Dragon Chow Oct 24 '13 at 15:57

0 Answers0