Re: [Dhis2-devs] Pagination number of items per page as drop downs?

2010-12-07 Thread Knut Staring
On Tue, Dec 7, 2010 at 10:45 AM, Bob Jolliffe  wrote:
> On 6 December 2010 16:24, Knut Staring  wrote:
>> Hello all, with the pagination module one can specify exactly the
>> number of items per page, for example 27. However, I think it would be
>> slightly more user friendly to replace this input field by a dropdown
>> with typical choices, such as 5, 10, 20, 50 and 100 or "All/Single
>> page". It would of course constrain the user a bit, but in some cases
>> structure is more useful than full freedom.
>
> Spoken like a true swiss :-)

Indeed ;-)

>>
>> Knut
>>
>> On Mon, Dec 6, 2010 at 3:15 PM,   wrote:
>>> 
>>> revno: 2297
>>> committer: Quang 
>>> branch nick: trunk
>>> timestamp: Mon 2010-12-06 21:13:48 +0700
>>> message:
>>>  Apply pagination in User and UserRole lists.
>>> modified:
>>>  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java
>>>  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>>>  dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
>>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java
>>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java
>>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml
>>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/allRole.vm
>>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/searchUser.vm
>>>
>>>
>>> --
>>> lp:dhis2
>>> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
>>>
>>> Your team DHIS 2 developers is subscribed to branch lp:dhis2.
>>> To unsubscribe from this branch go to 
>>> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
>>>
>>> === modified file 
>>> 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java'
>>> --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java     
>>> 2010-10-30 08:20:17 +
>>> +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java     
>>> 2010-12-06 14:13:48 +
>>> @@ -29,6 +29,7 @@
>>>
>>>  import java.util.Collection;
>>>
>>> +import org.hisp.dhis.dataelement.DataElement;
>>>  import org.hisp.dhis.organisationunit.OrganisationUnit;
>>>
>>>  /**
>>> @@ -103,15 +104,16 @@
>>>      */
>>>     void deleteUser( User user );
>>>
>>> -    Collection getAllUsers( int from, int to );
>>> -
>>>     Collection searchUsersByName( String key );
>>>
>>> -    Collection searchUsersByName( String key, int from, 
>>> int to );
>>> -
>>> -    int countNumberOfSearchUsersByName( String key );
>>> -
>>> -    int countAllUsers();
>>> +    Collection getUsersBetween( int first, int max );
>>> +
>>> +    Collection getUsersBetweenByName( String name, int 
>>> first, int max );
>>> +
>>> +    int getUserCount();
>>> +
>>> +    int getUserCountByName( String name );
>>> +
>>>
>>>     // 
>>> -
>>>     // UserCredentials
>>> @@ -253,5 +255,13 @@
>>>      * @param userSetting the UserSetting to delete.
>>>      */
>>>     void deleteUserSetting( UserSetting userSetting );
>>> -
>>> +
>>> +    Collection getUserRolesBetween( int first, int max 
>>> );
>>> +
>>> +    Collection getUserRolesBetweenByName( String name, 
>>> int first, int max );
>>> +
>>> +    int getUserRoleCount();
>>> +
>>> +    int getUserRoleCountByName( String name );
>>> +
>>>  }
>>>
>>> === modified file 
>>> 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java'
>>> --- 
>>> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>>>    2010-10-30 08:20:17 +
>>> +++ 
>>> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>>>    2010-12-06 14:13:48 +
>>> @@ -38,6 +38,8 @@
>>>  import org.hibernate.criterion.Order;
>>>  import org.hibernate.criterion.Projections;
>>>  import org.hibernate.criterion.Restrictions;
>>> +import org.hisp.dhis.common.GenericIdentifiableObjectStore;
>>> +import org.hisp.dhis.datadictionary.DataDictionary;
>>>  import org.hisp.dhis.organisationunit.OrganisationUnit;
>>>  import org.hisp.dhis.system.util.AuditLogLevel;
>>>  import org.hisp.dhis.system.util.AuditLogUtil;
>>> @@ -76,6 +78,18 @@
>>>     {
>>>         this.currentUserService = currentUserService;
>>>     }
>>> +
>>> +    private GenericIdentifiableObjectStore 
>>> userRoleStore;
>>> +
>>> +    public GenericIdentifiableObjectStore 
>>> getUserRoleStore()
>>> +    {
>>> +        return userRoleStore;
>>> +    }
>>> +
>>> +    public void setUserRoleStore( 
>>> GenericIdentifiableObjectStore userRoleStore )
>>> +    {
>>

Re: [Dhis2-devs] Pagination number of items per page as drop downs?

2010-12-07 Thread Bob Jolliffe
On 6 December 2010 16:24, Knut Staring  wrote:
> Hello all, with the pagination module one can specify exactly the
> number of items per page, for example 27. However, I think it would be
> slightly more user friendly to replace this input field by a dropdown
> with typical choices, such as 5, 10, 20, 50 and 100 or "All/Single
> page". It would of course constrain the user a bit, but in some cases
> structure is more useful than full freedom.

Spoken like a true swiss :-)

>
> Knut
>
> On Mon, Dec 6, 2010 at 3:15 PM,   wrote:
>> 
>> revno: 2297
>> committer: Quang 
>> branch nick: trunk
>> timestamp: Mon 2010-12-06 21:13:48 +0700
>> message:
>>  Apply pagination in User and UserRole lists.
>> modified:
>>  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java
>>  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>>  dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java
>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java
>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml
>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/allRole.vm
>>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/searchUser.vm
>>
>>
>> --
>> lp:dhis2
>> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
>>
>> Your team DHIS 2 developers is subscribed to branch lp:dhis2.
>> To unsubscribe from this branch go to 
>> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
>>
>> === modified file 
>> 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java'
>> --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java     
>> 2010-10-30 08:20:17 +
>> +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java     
>> 2010-12-06 14:13:48 +
>> @@ -29,6 +29,7 @@
>>
>>  import java.util.Collection;
>>
>> +import org.hisp.dhis.dataelement.DataElement;
>>  import org.hisp.dhis.organisationunit.OrganisationUnit;
>>
>>  /**
>> @@ -103,15 +104,16 @@
>>      */
>>     void deleteUser( User user );
>>
>> -    Collection getAllUsers( int from, int to );
>> -
>>     Collection searchUsersByName( String key );
>>
>> -    Collection searchUsersByName( String key, int from, 
>> int to );
>> -
>> -    int countNumberOfSearchUsersByName( String key );
>> -
>> -    int countAllUsers();
>> +    Collection getUsersBetween( int first, int max );
>> +
>> +    Collection getUsersBetweenByName( String name, int 
>> first, int max );
>> +
>> +    int getUserCount();
>> +
>> +    int getUserCountByName( String name );
>> +
>>
>>     // 
>> -
>>     // UserCredentials
>> @@ -253,5 +255,13 @@
>>      * @param userSetting the UserSetting to delete.
>>      */
>>     void deleteUserSetting( UserSetting userSetting );
>> -
>> +
>> +    Collection getUserRolesBetween( int first, int max 
>> );
>> +
>> +    Collection getUserRolesBetweenByName( String name, 
>> int first, int max );
>> +
>> +    int getUserRoleCount();
>> +
>> +    int getUserRoleCountByName( String name );
>> +
>>  }
>>
>> === modified file 
>> 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java'
>> --- 
>> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>>    2010-10-30 08:20:17 +
>> +++ 
>> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>>    2010-12-06 14:13:48 +
>> @@ -38,6 +38,8 @@
>>  import org.hibernate.criterion.Order;
>>  import org.hibernate.criterion.Projections;
>>  import org.hibernate.criterion.Restrictions;
>> +import org.hisp.dhis.common.GenericIdentifiableObjectStore;
>> +import org.hisp.dhis.datadictionary.DataDictionary;
>>  import org.hisp.dhis.organisationunit.OrganisationUnit;
>>  import org.hisp.dhis.system.util.AuditLogLevel;
>>  import org.hisp.dhis.system.util.AuditLogUtil;
>> @@ -76,6 +78,18 @@
>>     {
>>         this.currentUserService = currentUserService;
>>     }
>> +
>> +    private GenericIdentifiableObjectStore 
>> userRoleStore;
>> +
>> +    public GenericIdentifiableObjectStore 
>> getUserRoleStore()
>> +    {
>> +        return userRoleStore;
>> +    }
>> +
>> +    public void setUserRoleStore( 
>> GenericIdentifiableObjectStore userRoleStore )
>> +    {
>> +        this.userRoleStore = userRoleStore;
>> +    }
>>
>>     // 
>> -
>>     // User
>> @@ -122,14 +136,6 @@
>>         ret

[Dhis2-devs] Pagination number of items per page as drop downs?

2010-12-06 Thread Knut Staring
Hello all, with the pagination module one can specify exactly the
number of items per page, for example 27. However, I think it would be
slightly more user friendly to replace this input field by a dropdown
with typical choices, such as 5, 10, 20, 50 and 100 or "All/Single
page". It would of course constrain the user a bit, but in some cases
structure is more useful than full freedom.

Knut

On Mon, Dec 6, 2010 at 3:15 PM,   wrote:
> 
> revno: 2297
> committer: Quang 
> branch nick: trunk
> timestamp: Mon 2010-12-06 21:13:48 +0700
> message:
>  Apply pagination in User and UserRole lists.
> modified:
>  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java
>  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>  dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java
>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java
>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml
>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/allRole.vm
>  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/searchUser.vm
>
>
> --
> lp:dhis2
> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
>
> Your team DHIS 2 developers is subscribed to branch lp:dhis2.
> To unsubscribe from this branch go to 
> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
>
> === modified file 
> 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java'
> --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java     
> 2010-10-30 08:20:17 +
> +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java     
> 2010-12-06 14:13:48 +
> @@ -29,6 +29,7 @@
>
>  import java.util.Collection;
>
> +import org.hisp.dhis.dataelement.DataElement;
>  import org.hisp.dhis.organisationunit.OrganisationUnit;
>
>  /**
> @@ -103,15 +104,16 @@
>      */
>     void deleteUser( User user );
>
> -    Collection getAllUsers( int from, int to );
> -
>     Collection searchUsersByName( String key );
>
> -    Collection searchUsersByName( String key, int from, int 
> to );
> -
> -    int countNumberOfSearchUsersByName( String key );
> -
> -    int countAllUsers();
> +    Collection getUsersBetween( int first, int max );
> +
> +    Collection getUsersBetweenByName( String name, int 
> first, int max );
> +
> +    int getUserCount();
> +
> +    int getUserCountByName( String name );
> +
>
>     // 
> -
>     // UserCredentials
> @@ -253,5 +255,13 @@
>      * @param userSetting the UserSetting to delete.
>      */
>     void deleteUserSetting( UserSetting userSetting );
> -
> +
> +    Collection getUserRolesBetween( int first, int max );
> +
> +    Collection getUserRolesBetweenByName( String name, 
> int first, int max );
> +
> +    int getUserRoleCount();
> +
> +    int getUserRoleCountByName( String name );
> +
>  }
>
> === modified file 
> 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java'
> --- 
> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>    2010-10-30 08:20:17 +
> +++ 
> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
>    2010-12-06 14:13:48 +
> @@ -38,6 +38,8 @@
>  import org.hibernate.criterion.Order;
>  import org.hibernate.criterion.Projections;
>  import org.hibernate.criterion.Restrictions;
> +import org.hisp.dhis.common.GenericIdentifiableObjectStore;
> +import org.hisp.dhis.datadictionary.DataDictionary;
>  import org.hisp.dhis.organisationunit.OrganisationUnit;
>  import org.hisp.dhis.system.util.AuditLogLevel;
>  import org.hisp.dhis.system.util.AuditLogUtil;
> @@ -76,6 +78,18 @@
>     {
>         this.currentUserService = currentUserService;
>     }
> +
> +    private GenericIdentifiableObjectStore userRoleStore;
> +
> +    public GenericIdentifiableObjectStore 
> getUserRoleStore()
> +    {
> +        return userRoleStore;
> +    }
> +
> +    public void setUserRoleStore( 
> GenericIdentifiableObjectStore userRoleStore )
> +    {
> +        this.userRoleStore = userRoleStore;
> +    }
>
>     // 
> -
>     // User
> @@ -122,14 +136,6 @@
>         return session.createQuery( "from User" ).list();
>     }
>
> -   �...@suppresswarnings( "unchecked" )
> -    public Collection getAllUsers( int from, int to )
> -    {
> -        Session session = sessionFactory.getCurrentSession()

Re: [Dhis2-devs] Pagination patch

2010-07-04 Thread Lars Helge Øverland
2010/7/4 Quang Nguyen :
> Hi folks,
>
> I'm starting with this. First step, reusable resource will be centralized
> and refactored.
> It would be nice if somebody can provide me a database with number of
> patients.
>

Not sure we have any with anonymized data... Maybe you can test on the
long data element list...

> I also suggest renaming the PagingUtil to PagingDto (or a better name)
> because it is an DTO class actually, not util.
>
> Best regards,
> Quang
>
> 2010/4/22 Lars Helge Øverland 
>>
>>
>> 2010/4/22 Jason Pickering 
>>>
>>> More details on this. On Opera 10.10, the behaviour is even stranger.
>>> Sometimes, it is behaves as one would expect. You type in "Malaria"
>>> and then immediately the results are filtered. Othertimes (as noted in
>>> the blueprint) I only see the first 2 characters and things jump all
>>> over the place. It is clear though that FireFox 3.0.19 is a bit
>>> strange. The exact same version on Windows performs quite well. It
>>> could simply be the wimpy hardware I am using.
>>>
>>>
>>
>> Tested on one of the Indian online servers with 1000 dataelements, the
>> whole page loads in 2 sec and the filter works nice and quickly, using
>> firefox and chrome.
>>
>>>
>>> 2010/4/22 Jason Pickering :
>>> > I actually made a video, of what happens, but lacking bandwidth on
>>> > this side of the equator, I will describe the problem instead.
>>> >
>>> > I open up the data element page and filter begin to type "Malaria".
>>> > After about the third character, the browser completely freezes, and
>>> > goes grey. It stays this way for approximately 2 minutes, and the
>>> > comes back to life again. During this period, the CPU usage shoots up
>>> > to 100%, and the whole OS (Ubuntu on a MacBook) becomes extremely
>>> > sluggish. It is not pretty.
>>> >
>>> >
>>> >
>>> > 2010/4/22 Lars Helge Øverland :
>>> >>
>>> >>
>>> >> On Thu, Apr 22, 2010 at 8:20 AM, Jason Pickering
>>> >>  wrote:
>>> >>>
>>> >>> I have written up a blueprint here. It seems a bit wishy-washy when I
>>> >>> read it now. Comments?
>>> >>>
>>> >>> https://blueprints.launchpad.net/dhis2/+spec/server-side-pagination
>>> >>
>>> >> Thanks!
>>> >> After looking more closely I realized that we are not using ajax calls
>>> >> for
>>> >> the filtering of the "main" dataelement list (or any of the others).
>>> >> We are
>>> >> simply hiding the rows that don't match the filter with
>>> >> javascript/dom.
>>> >> Then its a bit weird that you are getting these problems... What does
>>> >> your
>>> >> environment look like when you experience this freeze?
>>> >
>>> >
>>> >
>>> > --
>>> > --
>>> > Jason P. Pickering
>>> > email: jason.p.picker...@gmail.com
>>> > tel:+260968395190
>>> >
>>>
>>>
>>>
>>> --
>>> --
>>> Jason P. Pickering
>>> email: jason.p.picker...@gmail.com
>>> tel:+260968395190
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>
>

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-07-04 Thread Quang Nguyen
Hi folks,

I'm starting with this. First step, reusable resource will be centralized
and refactored.
It would be nice if somebody can provide me a database with number of
patients.

I also suggest renaming the PagingUtil to PagingDto (or a better name)
because it is an DTO class actually, not util.

Best regards,
Quang

2010/4/22 Lars Helge Øverland 

>
>
> 2010/4/22 Jason Pickering 
>
>> More details on this. On Opera 10.10, the behaviour is even stranger.
>> Sometimes, it is behaves as one would expect. You type in "Malaria"
>> and then immediately the results are filtered. Othertimes (as noted in
>> the blueprint) I only see the first 2 characters and things jump all
>> over the place. It is clear though that FireFox 3.0.19 is a bit
>> strange. The exact same version on Windows performs quite well. It
>> could simply be the wimpy hardware I am using.
>>
>>
>>
> Tested on one of the Indian online servers with 1000 dataelements, the
> whole page loads in 2 sec and the filter works nice and quickly, using
> firefox and chrome.
>
>
>>
>> 2010/4/22 Jason Pickering :
>> > I actually made a video, of what happens, but lacking bandwidth on
>> > this side of the equator, I will describe the problem instead.
>> >
>> > I open up the data element page and filter begin to type "Malaria".
>> > After about the third character, the browser completely freezes, and
>> > goes grey. It stays this way for approximately 2 minutes, and the
>> > comes back to life again. During this period, the CPU usage shoots up
>> > to 100%, and the whole OS (Ubuntu on a MacBook) becomes extremely
>> > sluggish. It is not pretty.
>> >
>> >
>> >
>> > 2010/4/22 Lars Helge Øverland :
>> >>
>> >>
>> >> On Thu, Apr 22, 2010 at 8:20 AM, Jason Pickering
>> >>  wrote:
>> >>>
>> >>> I have written up a blueprint here. It seems a bit wishy-washy when I
>> >>> read it now. Comments?
>> >>>
>> >>> https://blueprints.launchpad.net/dhis2/+spec/server-side-pagination
>> >>
>> >> Thanks!
>> >> After looking more closely I realized that we are not using ajax calls
>> for
>> >> the filtering of the "main" dataelement list (or any of the others). We
>> are
>> >> simply hiding the rows that don't match the filter with javascript/dom.
>> >> Then its a bit weird that you are getting these problems... What does
>> your
>> >> environment look like when you experience this freeze?
>> >
>> >
>> >
>> > --
>> > --
>> > Jason P. Pickering
>> > email: jason.p.picker...@gmail.com
>> > tel:+260968395190
>> >
>>
>>
>>
>> --
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+260968395190
>>
>
>
> ___
> Mailing list: 
> https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : 
> https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-22 Thread Lars Helge Øverland
2010/4/22 Jason Pickering 

> More details on this. On Opera 10.10, the behaviour is even stranger.
> Sometimes, it is behaves as one would expect. You type in "Malaria"
> and then immediately the results are filtered. Othertimes (as noted in
> the blueprint) I only see the first 2 characters and things jump all
> over the place. It is clear though that FireFox 3.0.19 is a bit
> strange. The exact same version on Windows performs quite well. It
> could simply be the wimpy hardware I am using.
>
>
>
Tested on one of the Indian online servers with 1000 dataelements, the whole
page loads in 2 sec and the filter works nice and quickly, using firefox and
chrome.


>
> 2010/4/22 Jason Pickering :
> > I actually made a video, of what happens, but lacking bandwidth on
> > this side of the equator, I will describe the problem instead.
> >
> > I open up the data element page and filter begin to type "Malaria".
> > After about the third character, the browser completely freezes, and
> > goes grey. It stays this way for approximately 2 minutes, and the
> > comes back to life again. During this period, the CPU usage shoots up
> > to 100%, and the whole OS (Ubuntu on a MacBook) becomes extremely
> > sluggish. It is not pretty.
> >
> >
> >
> > 2010/4/22 Lars Helge Øverland :
> >>
> >>
> >> On Thu, Apr 22, 2010 at 8:20 AM, Jason Pickering
> >>  wrote:
> >>>
> >>> I have written up a blueprint here. It seems a bit wishy-washy when I
> >>> read it now. Comments?
> >>>
> >>> https://blueprints.launchpad.net/dhis2/+spec/server-side-pagination
> >>
> >> Thanks!
> >> After looking more closely I realized that we are not using ajax calls
> for
> >> the filtering of the "main" dataelement list (or any of the others). We
> are
> >> simply hiding the rows that don't match the filter with javascript/dom.
> >> Then its a bit weird that you are getting these problems... What does
> your
> >> environment look like when you experience this freeze?
> >
> >
> >
> > --
> > --
> > Jason P. Pickering
> > email: jason.p.picker...@gmail.com
> > tel:+260968395190
> >
>
>
>
> --
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+260968395190
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-22 Thread Lars Helge Øverland
2010/4/22 Jason Pickering 

> More details on this. On Opera 10.10, the behaviour is even stranger.
> Sometimes, it is behaves as one would expect. You type in "Malaria"
> and then immediately the results are filtered. Othertimes (as noted in
> the blueprint) I only see the first 2 characters and things jump all
> over the place. It is clear though that FireFox 3.0.19 is a bit
> strange. The exact same version on Windows performs quite well. It
> could simply be the wimpy hardware I am using.
>
>
Hm... we should really keep an old, virus-infected windows box in the dev
lab...  can't reproduce it but will test more.
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-22 Thread Jason Pickering
More details on this. On Opera 10.10, the behaviour is even stranger.
Sometimes, it is behaves as one would expect. You type in "Malaria"
and then immediately the results are filtered. Othertimes (as noted in
the blueprint) I only see the first 2 characters and things jump all
over the place. It is clear though that FireFox 3.0.19 is a bit
strange. The exact same version on Windows performs quite well. It
could simply be the wimpy hardware I am using.



2010/4/22 Jason Pickering :
> I actually made a video, of what happens, but lacking bandwidth on
> this side of the equator, I will describe the problem instead.
>
> I open up the data element page and filter begin to type "Malaria".
> After about the third character, the browser completely freezes, and
> goes grey. It stays this way for approximately 2 minutes, and the
> comes back to life again. During this period, the CPU usage shoots up
> to 100%, and the whole OS (Ubuntu on a MacBook) becomes extremely
> sluggish. It is not pretty.
>
>
>
> 2010/4/22 Lars Helge Øverland :
>>
>>
>> On Thu, Apr 22, 2010 at 8:20 AM, Jason Pickering
>>  wrote:
>>>
>>> I have written up a blueprint here. It seems a bit wishy-washy when I
>>> read it now. Comments?
>>>
>>> https://blueprints.launchpad.net/dhis2/+spec/server-side-pagination
>>
>> Thanks!
>> After looking more closely I realized that we are not using ajax calls for
>> the filtering of the "main" dataelement list (or any of the others). We are
>> simply hiding the rows that don't match the filter with javascript/dom.
>> Then its a bit weird that you are getting these problems... What does your
>> environment look like when you experience this freeze?
>
>
>
> --
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+260968395190
>



-- 
--
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+260968395190

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-22 Thread Jason Pickering
I actually made a video, of what happens, but lacking bandwidth on
this side of the equator, I will describe the problem instead.

I open up the data element page and filter begin to type "Malaria".
After about the third character, the browser completely freezes, and
goes grey. It stays this way for approximately 2 minutes, and the
comes back to life again. During this period, the CPU usage shoots up
to 100%, and the whole OS (Ubuntu on a MacBook) becomes extremely
sluggish. It is not pretty.



2010/4/22 Lars Helge Øverland :
>
>
> On Thu, Apr 22, 2010 at 8:20 AM, Jason Pickering
>  wrote:
>>
>> I have written up a blueprint here. It seems a bit wishy-washy when I
>> read it now. Comments?
>>
>> https://blueprints.launchpad.net/dhis2/+spec/server-side-pagination
>
> Thanks!
> After looking more closely I realized that we are not using ajax calls for
> the filtering of the "main" dataelement list (or any of the others). We are
> simply hiding the rows that don't match the filter with javascript/dom.
> Then its a bit weird that you are getting these problems... What does your
> environment look like when you experience this freeze?



-- 
--
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+260968395190

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-22 Thread Lars Helge Øverland
On Thu, Apr 22, 2010 at 8:20 AM, Jason Pickering <
jason.p.picker...@gmail.com> wrote:

> I have written up a blueprint here. It seems a bit wishy-washy when I
> read it now. Comments?
>
> https://blueprints.launchpad.net/dhis2/+spec/server-side-pagination
>

Thanks!

After looking more closely I realized that we are not using ajax calls for
the filtering of the "main" dataelement list (or any of the others). We are
simply hiding the rows that don't match the filter with javascript/dom.

Then its a bit weird that you are getting these problems... What does your
environment look like when you experience this freeze?
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-21 Thread Murodullo Latifov
Hi Jason,

Just one point, on my initial post of server side pagination I said there is 
search option result of which in turn is paginated too (replacement for client 
side hiding/filtering), after better implementation and colorizing by 
Vietnamese guys, I don't know what happened to search option, which could solve 
most of issues with search/filtering, and maybe sorting.

regards,
murod



- Original Message 
From: Jason Pickering 
To: Bob Jolliffe ; Lars Helge Øverland 

Cc: DHIS 2 developers 
Sent: Thu, April 22, 2010 11:50:21 AM
Subject: Re: [Dhis2-devs] Pagination patch

I have written up a blueprint here. It seems a bit wishy-washy when I
read it now. Comments?

https://blueprints.launchpad.net/dhis2/+spec/server-side-pagination

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp



  

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-21 Thread Jason Pickering
I have written up a blueprint here. It seems a bit wishy-washy when I
read it now. Comments?

https://blueprints.launchpad.net/dhis2/+spec/server-side-pagination

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-21 Thread Bob Jolliffe
2010/4/21 Jason Pickering :
> Hi Lars,
> I will write up the blueprint. It is becoming my specialty. :)
>
> Personally, I think the filter button is a good thing to test. The
> on-the-fly filtering is really causing me a lot of headaches. On
> Ubuntu, on a relatively slow machine, the browser greys out while
> performing a filter, sometimes for a minute or so. This does not seem
> like a particularly complicated operation, but it is very annoying,
> and the user has no idea what is happening. The machine just freezes
> for a few seconds when filtering on data elements.

Should maybe not throw out the baby with the bathwater.  What you
describe shouldn't really happen - that's meant to be the asynchronous
in Ajax - and could well be a problem with our implementation.  So I'd
go for an optional button - perhaps driven by a general system-wide
setting "No-Ajax-Please" which could be used in other parts of the UI
as well.

> I am experiencing a very high latency environment right now, so it may
> be a while before I can get launchpad to work.

I had some problems with launchpad last night.  I think sometimes it
just gets bewildered.

Cheers
Bob

>
> Regards,
> Jason
>
>
> 2010/4/21 Lars Helge Øverland :
>>
>> Hi,
>> agreed that pagination is needed on long lists like data elements and
>> indicators. Jason, could you take the bother to write a blueprint? I guess
>> you have almost done it with your last mail.
>> Re the filtering I think we are mixing this up a bit. Currently filtering
>> happens on the client side. It can continue to do that even if we use
>> pagination as the filter function simply moves elements back and forth from
>> a hidden list.
>> Also, currently we have on-the-fly filtering. Would it be simpler if we just
>> have a button which says "Filter" instead, ie letting the user decide when
>> to perform the filtering? Easier and maybe better?
>> Agree that this is important and that we really need to improve
>> usability/performance in "high latency internet environments". Downloading
>> the data element list with 1000 elements can be around 1 MB which is
>> unacceptable. We have currently reduced the amount of html in the page +
>> made the delete function "ajaxified" in order to avoid reloading the list,
>> but more must be done.
>> Lars
>>
>
>
>
> --
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+260968395190
>

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-21 Thread Thuy Nguyen
Not only in Ubuntu but in Windows as well. I met this a lot of times. I had
to type the phrase somewhere else then copy and paste it in the filter text
area to avoid hanging of my computer. It's really good to have the button,
or just filter after user click ENTER.


-- 
--
Thuy
HISP Vietnam
+84902079126
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-21 Thread Lars Helge Øverland
2010/4/21 Jason Pickering 

> Hi Lars,
> I will write up the blueprint. It is becoming my specialty. :)
>
> Personally, I think the filter button is a good thing to test. The
> on-the-fly filtering is really causing me a lot of headaches. On
> Ubuntu, on a relatively slow machine, the browser greys out while
> performing a filter, sometimes for a minute or so. This does not seem
> like a particularly complicated operation, but it is very annoying,
> and the user has no idea what is happening. The machine just freezes
> for a few seconds when filtering on data elements.
>
>
John L here also thinks this is a good idea as they have experienced similar
issues. I think we should go for it.


> I am experiencing a very high latency environment right now, so it may
> be a while before I can get launchpad to work.
>

Thanks... If you email the text I can register it...




>
> Regards,
> Jason
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-21 Thread Jason Pickering
Hi Lars,
I will write up the blueprint. It is becoming my specialty. :)

Personally, I think the filter button is a good thing to test. The
on-the-fly filtering is really causing me a lot of headaches. On
Ubuntu, on a relatively slow machine, the browser greys out while
performing a filter, sometimes for a minute or so. This does not seem
like a particularly complicated operation, but it is very annoying,
and the user has no idea what is happening. The machine just freezes
for a few seconds when filtering on data elements.

I am experiencing a very high latency environment right now, so it may
be a while before I can get launchpad to work.

Regards,
Jason


2010/4/21 Lars Helge Øverland :
>
> Hi,
> agreed that pagination is needed on long lists like data elements and
> indicators. Jason, could you take the bother to write a blueprint? I guess
> you have almost done it with your last mail.
> Re the filtering I think we are mixing this up a bit. Currently filtering
> happens on the client side. It can continue to do that even if we use
> pagination as the filter function simply moves elements back and forth from
> a hidden list.
> Also, currently we have on-the-fly filtering. Would it be simpler if we just
> have a button which says "Filter" instead, ie letting the user decide when
> to perform the filtering? Easier and maybe better?
> Agree that this is important and that we really need to improve
> usability/performance in "high latency internet environments". Downloading
> the data element list with 1000 elements can be around 1 MB which is
> unacceptable. We have currently reduced the amount of html in the page +
> made the delete function "ajaxified" in order to avoid reloading the list,
> but more must be done.
> Lars
>



-- 
--
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+260968395190

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-21 Thread Lars Helge Øverland
Hi,

agreed that pagination is needed on long lists like data elements and
indicators. Jason, could you take the bother to write a blueprint? I guess
you have almost done it with your last mail.

Re the filtering I think we are mixing this up a bit. Currently filtering
happens on the client side. It can continue to do that even if we use
pagination as the filter function simply moves elements back and forth from
a hidden list.

Also, currently we have on-the-fly filtering. Would it be simpler if we just
have a button which says "Filter" instead, ie letting the user decide when
to perform the filtering? Easier and maybe better?

Agree that this is important and that we really need to improve
usability/performance in "high latency internet environments". Downloading
the data element list with 1000 elements can be around 1 MB which is
unacceptable. We have currently reduced the amount of html in the page +
made the delete function "ajaxified" in order to avoid reloading the list,
but more must be done.

Lars
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-21 Thread Bob Jolliffe
Hi

On 21 April 2010 06:44, Jason Pickering  wrote:
> 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. :)

Haven't yet looked at the code but yes you do need to have some sort
of software "hysteresis" on these Ajax kind of things to prevent
excessive "chatter" and synchronisation problems.  Part of the
challenge is choosing the right amount of delay (and/or number of
characters typed) to make the system behave reasonably in different
network environments.  In very high latency internet environments
(like for example a lot of the Indian deployment) doing this auto
dispatching of ajax requests would need to be tuned quite differently
(or switched off) compared to running the app on the same workstation
as the browser.  I suspect the best short term solution is to be able
to switch automatic filtering on and off.

(Crazy aside:   Ideally it would be *nice-to-have* a sort of adaptive
timeout which recalibrates itself against the measured round-trip
times of the ajax request/response.   This is the same problem which
TCP solves in the calculation of its timeouts.  [To save myself
recalculating - if I was writing a program in C on linux - I could use
getsockopt(TCP_INFO) ] Nevertheless, implementing a similar algorithm
in javascript working on the ajax RTTs is not beyond the bounds of
reason.  I guess I'd keep the time in a hidden div on the page with
id='RTT'.  Each time I sent a request I'd include a timestamp.  On
receiving the response I'd compare timestamp with current time and
update the RTT.  Of course RTTs can have considerable variance so I'd
probably want to do what TCP does and keep a moving weighted average
to avoid spikes causing me to set ridiculous timeouts.)

>
> 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 think with lists like patients you really cannot get away from
server side pagination.

Cheers
Bob

> 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  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: jason.p.picker.

Re: [Dhis2-devs] Pagination patch

2010-04-20 Thread Jason Pickering
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  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: jason.p.picker...@gmail.com
tel:+260968395190

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-20 Thread Viet Nguyen
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 ?
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-20 Thread Jason Pickering
Hi Ola,

Thanks, but this is not applicable in my case. All of our data
elements have been imported from DHIS14. The data set ordering is
correct there, but not imported, and thus not respected in 2. The
fundamental problem is the that the datasetmembers object has no
sortorder. The sortorder persisted in dataelements is pretty close to
the order in DHIS1.4 (although not exact, which is a bit strange), but
even this is not respected when it comes to data set sections. Just
look at the code, and you will see what the problems are.

The issue that I am discussing (in this thread) is really about
sending what is necessary and practical to the client. It seems to be
totally inefficient (and certainly not scalable) to send several
hundred data elements across the wire at one time. Why not take a
block of 30 and allow people to page through them? Allowing
presentation by different sort orders (data set order, data element
order, alphabetical order, code order) are things that 1.4 has, and
there has been (at least in my assessment) a proven need for them in
the field. Again, all of this is are suggestions, which I hope can be
improved upon.

Regards,
JPP




On Tue, Apr 20, 2010 at 8:55 PM, Ola Hodne Titlestad  wrote:
> Jason,
>
> Not sure that this will help you, but when setting up the datasets for
> Sierra Leone I always started by creating data element groups, and then when
> creating data sets and data set sections I added all data elements from a
> group. This made it easier for me as the data element group editor UI is
> working fine and also has the two dimensional view.
>
>
> Ola Hodne Titlestad |Technical Officer|
> Health Metrics Network (HMN) | World Health Organization
> Avenue Appia 20 |1211 Geneva 27, Switzerland | Email:
> titlest...@who.int|Tel: +41 788216897
> Website: www.healthmetricsnetwork.org
>
> Better Information. Better Decisions. Better Health.
>
>
> 2010/4/20 Jason Pickering 
>>
>>  It would seem this was implemented for the patient system. Has there
>> been any effort to move it to a more common place, so it can be used
>> by other modules?
>>
>> I am asking for two reasons.
>>
>> 1) Currently, ALL data elements are loaded when editing data elements.
>> In our case, this results in a lot data being sent across a very small
>> pipeline. Operations with data elements (sort for example) are very,
>> very sluggish. This might help to improve the situation.
>>
>> 2) Bob and I have had a very lengthy discussion about the data set
>> sections. It is quite a mess. I think Bob is working on a fix, but it
>> would be useful to have this functionality here. One may have many
>> data elements in a given section, and it would be useful to be able to
>> sort/filter them efficiently.
>>
>> Regards,
>> Jason
>>
>>
>> 2010/3/9 Lars Helge Øverland :
>> >
>> >
>> > 2010/3/9 Viet Nguyen 
>> >>
>> >>
>> >> 2010/3/9 Viet Nguyen 
>> >>>
>> 
>>  Hi Viet, this looks quite elegant..
>>  If the PagingUtil class is general, any chance we can move it to the
>>  dhis-support-system project so that it can be used by other modules
>>  if
>>  required later?
>>  Lars
>> 
>> >>>
>> >>> Yeah, I can move the PageUtil class to dhis-support-system, paging.vm
>> >>> and
>> >>> paging.css to common-resource.
>> >>>
>> >>> If I remember correctly...I think you also have a RequestUtil class
>> >>> somewhere
>> >>>
>> >>> Actually, to get current request path I just call the method
>> >>> request.getServletPath() , but I'm not sure  it works for all
>> >>> modules... so
>> >>> I put it in a util class, then later I can modify that link ( maybe
>> >>> add or
>> >>> remove a "/" , or something like that )
>> >>>
>> >>> --
>> >>> Viet Nguyen
>> >>>
>> >>
>> >> Sorry, I forgot to mention the javascript methods.
>> >>
>> >> function changePageSize( baseLink )
>> >> {
>> >>     var pageSize = jQuery("#sizeOfPage").val();
>> >>     window.location.href = baseLink +"pageSize=" + pageSize ;
>> >> }
>> >> function jumpToPage( baseLink )
>> >> {
>> >>     var pageSize = jQuery("#sizeOfPage").val();
>> >>     var currentPage = jQuery("#jumpToPage").val();
>> >>     window.location.href = baseLink +"pageSize=" + pageSize
>> >> +"¤tPage=" +currentPage;
>> >> }
>> >>
>> >> So I guess, this will have to be moved to common-resources...
>> >> Should I create new file or put it in common.js ?
>> >>
>> >
>> > commons.js would be fine. Also moving the vm templates to
>> > commons-resources
>> > is good.
>> > ___
>> > Mailing list: https://launchpad.net/~dhis2-devs
>> > Post to     : dhis2-devs@lists.launchpad.net
>> > Unsubscribe : https://launchpad.net/~dhis2-devs
>> > More help   : https://help.launchpad.net/ListHelp
>> >
>> >
>>
>>
>>
>> --
>> --
>> Jason P. Pickering
>> email: jason.p.picker...@gmail.com
>> tel:+260968395190
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@lists

Re: [Dhis2-devs] Pagination patch

2010-04-20 Thread Ola Hodne Titlestad
Jason,

Not sure that this will help you, but when setting up the datasets for
Sierra Leone I always started by creating data element groups, and then when
creating data sets and data set sections I added all data elements from a
group. This made it easier for me as the data element group editor UI is
working fine and also has the two dimensional view.


Ola Hodne Titlestad |Technical Officer|
Health Metrics Network (HMN) | World Health Organization
Avenue Appia 20 |1211 Geneva 27, Switzerland | Email: titlest...@who.int|Tel:
+41 788216897
Website: www.healthmetricsnetwork.org

Better Information. Better Decisions. Better Health.


2010/4/20 Jason Pickering 

>  It would seem this was implemented for the patient system. Has there
> been any effort to move it to a more common place, so it can be used
> by other modules?
>
> I am asking for two reasons.
>
> 1) Currently, ALL data elements are loaded when editing data elements.
> In our case, this results in a lot data being sent across a very small
> pipeline. Operations with data elements (sort for example) are very,
> very sluggish. This might help to improve the situation.
>
> 2) Bob and I have had a very lengthy discussion about the data set
> sections. It is quite a mess. I think Bob is working on a fix, but it
> would be useful to have this functionality here. One may have many
> data elements in a given section, and it would be useful to be able to
> sort/filter them efficiently.
>
> Regards,
> Jason
>
>
> 2010/3/9 Lars Helge Øverland :
> >
> >
> > 2010/3/9 Viet Nguyen 
> >>
> >>
> >> 2010/3/9 Viet Nguyen 
> >>>
> 
>  Hi Viet, this looks quite elegant..
>  If the PagingUtil class is general, any chance we can move it to the
>  dhis-support-system project so that it can be used by other modules if
>  required later?
>  Lars
> 
> >>>
> >>> Yeah, I can move the PageUtil class to dhis-support-system, paging.vm
> and
> >>> paging.css to common-resource.
> >>>
> >>> If I remember correctly...I think you also have a RequestUtil class
> >>> somewhere
> >>>
> >>> Actually, to get current request path I just call the method
> >>> request.getServletPath() , but I'm not sure  it works for all
> modules... so
> >>> I put it in a util class, then later I can modify that link ( maybe add
> or
> >>> remove a "/" , or something like that )
> >>>
> >>> --
> >>> Viet Nguyen
> >>>
> >>
> >> Sorry, I forgot to mention the javascript methods.
> >>
> >> function changePageSize( baseLink )
> >> {
> >> var pageSize = jQuery("#sizeOfPage").val();
> >> window.location.href = baseLink +"pageSize=" + pageSize ;
> >> }
> >> function jumpToPage( baseLink )
> >> {
> >> var pageSize = jQuery("#sizeOfPage").val();
> >> var currentPage = jQuery("#jumpToPage").val();
> >> window.location.href = baseLink +"pageSize=" + pageSize
> >> +"¤tPage=" +currentPage;
> >> }
> >>
> >> So I guess, this will have to be moved to common-resources...
> >> Should I create new file or put it in common.js ?
> >>
> >
> > commons.js would be fine. Also moving the vm templates to
> commons-resources
> > is good.
> > ___
> > Mailing list: 
> > https://launchpad.net/~dhis2-devs
> > Post to : dhis2-devs@lists.launchpad.net
> > Unsubscribe : 
> > https://launchpad.net/~dhis2-devs
> > More help   : https://help.launchpad.net/ListHelp
> >
> >
>
>
>
> --
> --
> Jason P. Pickering
> email: jason.p.picker...@gmail.com
> tel:+260968395190
>
> ___
> Mailing list: 
> https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : 
> https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-04-20 Thread Jason Pickering
 It would seem this was implemented for the patient system. Has there
been any effort to move it to a more common place, so it can be used
by other modules?

I am asking for two reasons.

1) Currently, ALL data elements are loaded when editing data elements.
In our case, this results in a lot data being sent across a very small
pipeline. Operations with data elements (sort for example) are very,
very sluggish. This might help to improve the situation.

2) Bob and I have had a very lengthy discussion about the data set
sections. It is quite a mess. I think Bob is working on a fix, but it
would be useful to have this functionality here. One may have many
data elements in a given section, and it would be useful to be able to
sort/filter them efficiently.

Regards,
Jason


2010/3/9 Lars Helge Øverland :
>
>
> 2010/3/9 Viet Nguyen 
>>
>>
>> 2010/3/9 Viet Nguyen 
>>>

 Hi Viet, this looks quite elegant..
 If the PagingUtil class is general, any chance we can move it to the
 dhis-support-system project so that it can be used by other modules if
 required later?
 Lars

>>>
>>> Yeah, I can move the PageUtil class to dhis-support-system, paging.vm and
>>> paging.css to common-resource.
>>>
>>> If I remember correctly...I think you also have a RequestUtil class
>>> somewhere
>>>
>>> Actually, to get current request path I just call the method
>>> request.getServletPath() , but I'm not sure  it works for all modules... so
>>> I put it in a util class, then later I can modify that link ( maybe add or
>>> remove a "/" , or something like that )
>>>
>>> --
>>> Viet Nguyen
>>>
>>
>> Sorry, I forgot to mention the javascript methods.
>>
>> function changePageSize( baseLink )
>> {
>>     var pageSize = jQuery("#sizeOfPage").val();
>>     window.location.href = baseLink +"pageSize=" + pageSize ;
>> }
>> function jumpToPage( baseLink )
>> {
>>     var pageSize = jQuery("#sizeOfPage").val();
>>     var currentPage = jQuery("#jumpToPage").val();
>>     window.location.href = baseLink +"pageSize=" + pageSize
>> +"¤tPage=" +currentPage;
>> }
>>
>> So I guess, this will have to be moved to common-resources...
>> Should I create new file or put it in common.js ?
>>
>
> commons.js would be fine. Also moving the vm templates to commons-resources
> is good.
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>



-- 
--
Jason P. Pickering
email: jason.p.picker...@gmail.com
tel:+260968395190

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-03-09 Thread Lars Helge Øverland
2010/3/9 Viet Nguyen 

>
>
> 2010/3/9 Viet Nguyen 
>
>
>>
>>> Hi Viet, this looks quite elegant..
>>>
>>> If the PagingUtil class is general, any chance we can move it to the
>>> dhis-support-system project so that it can be used by other modules if
>>> required later?
>>>
>>> Lars
>>>
>>>
>>>
>> Yeah, I can move the PageUtil class to dhis-support-system, paging.vm and
>> paging.css to common-resource.
>>
>> If I remember correctly...I think you also have a RequestUtil class
>> somewhere
>>
>> Actually, to get current request path I just call the method
>> request.getServletPath() , but I'm not sure  it works for all modules... so
>> I put it in a util class, then later I can modify that link ( maybe add or
>> remove a "/" , or something like that )
>>
>> --
>> Viet Nguyen
>>
>>
> Sorry, I forgot to mention the javascript methods.
>
> function changePageSize( baseLink )
> {
> var pageSize = jQuery("#sizeOfPage").val();
> window.location.href = baseLink +"pageSize=" + pageSize ;
> }
> function jumpToPage( baseLink )
> {
> var pageSize = jQuery("#sizeOfPage").val();
> var currentPage = jQuery("#jumpToPage").val();
> window.location.href = baseLink +"pageSize=" + pageSize
> +"¤tPage=" +currentPage;
> }
>
> So I guess, this will have to be moved to common-resources...
> Should I create new file or put it in common.js ?
>
>
commons.js would be fine. Also moving the vm templates to commons-resources
is good.
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-03-09 Thread Viet Nguyen
2010/3/9 Viet Nguyen 

>
>
>> Hi Viet, this looks quite elegant..
>>
>> If the PagingUtil class is general, any chance we can move it to the
>> dhis-support-system project so that it can be used by other modules if
>> required later?
>>
>> Lars
>>
>>
>>
> Yeah, I can move the PageUtil class to dhis-support-system, paging.vm and
> paging.css to common-resource.
>
> If I remember correctly...I think you also have a RequestUtil class
> somewhere
>
> Actually, to get current request path I just call the method
> request.getServletPath() , but I'm not sure  it works for all modules... so
> I put it in a util class, then later I can modify that link ( maybe add or
> remove a "/" , or something like that )
>
> --
> Viet Nguyen
>
>
Sorry, I forgot to mention the javascript methods.

function changePageSize( baseLink )
{
var pageSize = jQuery("#sizeOfPage").val();
window.location.href = baseLink +"pageSize=" + pageSize ;
}
function jumpToPage( baseLink )
{
var pageSize = jQuery("#sizeOfPage").val();
var currentPage = jQuery("#jumpToPage").val();
window.location.href = baseLink +"pageSize=" + pageSize +"¤tPage="
+currentPage;
}

So I guess, this will have to be moved to common-resources...
Should I create new file or put it in common.js ?

-- 
Viet Nguyen
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination patch

2010-03-09 Thread Viet Nguyen
>
> Hi Viet, this looks quite elegant..
>
> If the PagingUtil class is general, any chance we can move it to the
> dhis-support-system project so that it can be used by other modules if
> required later?
>
> Lars
>
>
>
Yeah, I can move the PageUtil class to dhis-support-system, paging.vm and
paging.css to common-resource.

If I remember correctly...I think you also have a RequestUtil class
somewhere

Actually, to get current request path I just call the method
request.getServletPath() , but I'm not sure  it works for all modules... so
I put it in a util class, then later I can modify that link ( maybe add or
remove a "/" , or something like that )

-- 
Viet Nguyen
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Pagination patch

2010-03-08 Thread Murodullo Latifov
Hi all,

I created patch for pagination for Dataelement listing for truck head (1586) 
and send it via: bzr send -o pagination.patch. It did go and I don't know where 
did it actually go. Please check if it is there.

regards,
murod



  

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination

2010-02-01 Thread Ola Hodne Titlestad
Hi,

This sounds like functionality that could be used in a more general forms
model for DHIS2.

I have earlier asked for some simple functionality to be able to add some
view properties to datasets, like sorting, sub headers, grey/disabled fields
in tables and sub-tables.

To make use of the catcombo functionality and consequent sub-tables being
generated in default data entry forms we really need this kind of
functionality.

It is really frustrating to first spend a lot of time designing
catcombos/sections for a dataset and then later finding out that the form
has to be manually/custom designed anyway (even when the form is basically a
few tables that could be auto-generated off the dataset and its
catcombos/sections. Right now we can autogenerate these tables, but without
sorting and grey fields, so we can't use the default forms anyway. No EPI
data clerk would like to use a form where all the vaccines are just randomly
listed


Ola Hodne Titlestad |Technical Officer|
Health Metrics Network (HMN) | World Health Organization
Avenue Appia 20 |1211 Geneva 27, Switzerland | Email: titlest...@who.int|Tel:
+41 788216897
Website: www.healthmetricsnetwork.org

Better Information. Better Decisions. Better Health.


On 1 February 2010 11:53, Viet Nguyen  wrote:

> Hi,
>
> That's great. This plugin also provides sorting function I think :)
>
> By the way, if we gonna apply this, I suggest that we add a   Page Length
> combox  which will have some predifined number of items in one page. So user
> can choose how many items they want to see in one page. And that value can
> also be saved to a cookie value for later visiting.
>
> Regards,
>
> On Mon, Feb 1, 2010 at 3:58 PM, Murodullo Latifov 
> wrote:
>
>> Sorry, here it is.
>>
>>
>>
>> - Original Message 
>> From: Murodullo Latifov 
>> To: DHIS 2 developers 
>> Sent: Mon, February 1, 2010 3:58:22 PM
>> Subject: Pagination
>>
>> Hi all,
>>
>> I have developed client side pagination for one of modules we use here in
>> Tajikistan (see attached screen-shot). Could be useful for patient modules,
>> as many records would be added into the same table. I am using jquery plugin
>> for this. Its quite easy task to add for other modules like list of data
>> elements and so on. What do you think? Later we could move to server side
>> pagination?
>>
>> regards,
>> murod
>>
>>
>>
>>
>> ___
>> Mailing list: 
>> https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@lists.launchpad.net
>> Unsubscribe : 
>> https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Viet Nguyen
>
>
> ___
> Mailing list: 
> https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : 
> https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


Re: [Dhis2-devs] Pagination

2010-02-01 Thread Viet Nguyen
Hi,

That's great. This plugin also provides sorting function I think :)

By the way, if we gonna apply this, I suggest that we add a   Page Length
combox  which will have some predifined number of items in one page. So user
can choose how many items they want to see in one page. And that value can
also be saved to a cookie value for later visiting.

Regards,

On Mon, Feb 1, 2010 at 3:58 PM, Murodullo Latifov wrote:

> Sorry, here it is.
>
>
>
> - Original Message 
> From: Murodullo Latifov 
> To: DHIS 2 developers 
> Sent: Mon, February 1, 2010 3:58:22 PM
> Subject: Pagination
>
> Hi all,
>
> I have developed client side pagination for one of modules we use here in
> Tajikistan (see attached screen-shot). Could be useful for patient modules,
> as many records would be added into the same table. I am using jquery plugin
> for this. Its quite easy task to add for other modules like list of data
> elements and so on. What do you think? Later we could move to server side
> pagination?
>
> regards,
> murod
>
>
>
>
> ___
> Mailing list: 
> https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@lists.launchpad.net
> Unsubscribe : 
> https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Viet Nguyen
___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp


[Dhis2-devs] Pagination

2010-02-01 Thread Murodullo Latifov
Hi all,

I have developed client side pagination for one of modules we use here in 
Tajikistan (see attached screen-shot). Could be useful for patient modules, as 
many records would be added into the same table. I am using jquery plugin for 
this. Its quite easy task to add for other modules like list of data elements 
and so on. What do you think? Later we could move to server side pagination?

regards,
murod



  

___
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp