Hi Viet, This is good news.
So, my suggestion would be as follows. 1) Use the user settings to determine what the initial sorting should be. Retrieve the first block of data based on whatever the user settings are when the user enters the page. At this point there would be no filter. 2) Should the user apply a filter, a new block of data would need to be retrieved, based on the user input. One thing that I have noticed is that there should be some sort of "delay" implemented until the user finishes typing. It would be inefficient to send an AJAX request each time the user types a character, but the request should be generated once the user stops typing. This might require some experimentation. My browser sort of does a "hiccup" each time I filter on the data element list, as it filters after the input of each character. If it would be possible to wait until the user actually finishes typing, and then make the filter, this might result in a better user experience. On a slow machine of mine, Firefox has crashed several times while trying to filter the data element list. This is one of the reasons I keep pushing so hard for this feature. :) 3) I would think it would be desirable to view all results (the current view that we have) as well. 4) When I saw this with Murod in Tajikistan a few weeks back, I did not pay attention to the details. But, it would be very nice to be able to filter/search on other properties of the object. This is a "nice to have" feature. Right now, we can only filter on the "name" but there are situations when you need to filter the data element code for instance. Not sure if this is possible. As Lars has detailed in a previous mail, a separate branch should probably be made for this. Although I think it is a good and needed feature, it may result in worse performance due to the roundtrips between the client and the server that will be required each time a new page needs to be generated. For large lists, i.e. patients and data elements, it would seem to make sense in theory, but may actually be worse than loading the entire DOM into the browser and filtering on the client side. I would be of course available to test this with you. Lastly, thanks for taking a look at this. Regards, Jason On Wed, Apr 21, 2010 at 7:22 AM, Viet Nguyen <[email protected]> wrote: > > Hi Jason, > > I planed to move this to common ... but...somehow forgot it sorry :( > Will do it asap. > > Something I would like to note here for sorting and filter functions. > > When we apply the paging, we need to sort from database, so there will be > many changes in service methods. > And for filter function, this is the most thing I have been worry about . > Because we should not just filter in current page. I think we need to use > ajax here. > At this point, filter would be similar to search function, the only > different thing is it effects on the fly. > When user type something in filter text box, we get the result from > database, then sort and paging that list, then return to the view. > > What do you think about this ? > > -- -- Jason P. Pickering email: [email protected] tel:+260968395190 _______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

