Vojtech Szocs has posted comments on this change.

Change subject: webadmin: Fix server-side column sort clash with 'sortby' in 
search
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.ovirt.org/#/c/28557/2/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SearchableListModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/SearchableListModel.java:

Line 781:      */
Line 782:     protected String applySortOptions(String searchQuery) {
Line 783:         String result = searchQuery;
Line 784: 
Line 785:         if (sortBy != null && isSearchComplete(searchQuery) && 
!searchContainsSortByPart(searchQuery)) {
> I assumed you would also clear sortBy if you cleared the column sort select
> I assumed you would also clear sortBy if you cleared the column sort 
> selection. This should make sure that sortBy != null iff a column is marked 
> to as sorted.

You are right, I missed this assumption :-)

Question is, how difficult is to clear sortBy on specific (main tab) list model 
upon applying search string (which is generally managed by CommonModel), but 
I'll try to pursue this approach.

> So if you also made sure that a column were only marked as sorted if the 
> search string didn't contradict it, the two conditions combined should 
> guarantee that sortBy != null only if the search string doesn't contradict 
> click-triggered sorting.

Correct, seems like the right approach.
Line 786:             result += " " + SyntaxChecker.SORTBY + " " + sortBy 
//$NON-NLS-1$ //$NON-NLS-2$
Line 787:                     + " " + (sortAscending ? 
SyntaxChecker.SORTDIR_ASC : SyntaxChecker.SORTDIR_DESC); //$NON-NLS-1$
Line 788:         }
Line 789: 


-- 
To view, visit http://gerrit.ovirt.org/28557
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7ce39a4e2b6323e6e0276a3a462a3f9da005344b
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to