"order by" clause does not result in list refreshing

5 views
Skip to first unread message

Brian Hayward

unread,
Jan 21, 2013, 3:07:44 AM1/21/13
to mo...@googlegroups.com
In chrome on the mac, mobl 0.45:

Spent a little time playing with the different options here.
Consider a "most popular" list like this:

list(it in Item.all() where votes > 1 order by votes desc limit 30) {
        item {
                checkBox(it.selected, it.name)
        }
}

If an existing list changes in such a way that the order by clause would result in a different order, but no items are added or removed, the list is not refreshed.
As soon as a new item qualifies for the 'where clause' the list is refreshed and the orders are corrected
The only workaround I've found so far is "shift-reload" of the browser.

Any suggestions?  Didn't see it in yellowgrass.

Thanks,
Brian

Chris Melman

unread,
Jan 21, 2013, 6:48:20 AM1/21/13
to mo...@googlegroups.com
I guess this is indeed a cornercase that is not implemented.
However potential could generate a lot of triggers to check the order of the list, which could be really harsh for mobile devices.
I guess the only work around is trigger it yourself by placing a variable in the listcondition which you change, I can't find the example anymore How i did it exactly, so you could try around a bit where it triggers. try to do this with the 30 as variable or something like this.
 
Greetings Chris
 

Date: Mon, 21 Jan 2013 00:07:44 -0800
From: bhay...@gmail.com
To: mo...@googlegroups.com
Subject: [mobl] "order by" clause does not result in list refreshing

Brian Hayward

unread,
Jan 21, 2013, 12:24:59 PM1/21/13
to mo...@googlegroups.com
Thanks Chris, the workaround worked well... Appreciate the help.

Would it still be too expensive if the list refresh triggers were only added for entity properties explicitly mentioned in an orderBy clause?

I went ahead and opened an issue.  If you mark it as wontfix, thats fine too.  People searching for similar issues may find it and not bug you again.


Thanks,
Brian

Chris Melman

unread,
Jan 21, 2013, 1:34:20 PM1/21/13
to mo...@googlegroups.com

 It might be that at some point we will fix this but not at the moment. Indeed that solution could be an option however i'm not sure if the current architecture allows us to implement this easily.
 
I'm happy that it works atleast this way and that you made an issue, which helps us track problems but also for feedback for users
 
Greetings Chris

Date: Mon, 21 Jan 2013 11:24:59 -0600
Subject: Re: [mobl] "order by" clause does not result in list refreshing
From: bhay...@gmail.com
To: mo...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages