Skip to content

Commit

Permalink
HUsToPickViewFactory: initial sorted by best before date
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Dec 5, 2017
1 parent afe619d commit 05e191e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import de.metas.ui.web.view.json.JSONViewDataType;
import de.metas.ui.web.window.datatypes.WindowId;
import de.metas.ui.web.window.descriptor.factory.standard.LayoutFactory;
import de.metas.ui.web.window.model.DocumentQueryOrderBy;

/*
* #%L
Expand Down Expand Up @@ -84,10 +85,9 @@ protected void customizeHUEditorViewRepository(final SqlHUEditorViewRepositoryBu
@Override
protected void customizeHUEditorView(HUEditorViewBuilder huViewBuilder)
{
// TODO: check if this is working...
// huViewBuilder
// .clearOrderBys()
// .orderBy(DocumentQueryOrderBy.byFieldName(HUEditorRow.FIELDNAME_BestBeforeDate))
// .orderBy(DocumentQueryOrderBy.byFieldName(HUEditorRow.FIELDNAME_M_HU_ID));
huViewBuilder
.clearOrderBys()
.orderBy(DocumentQueryOrderBy.builder().fieldName(HUEditorRow.FIELDNAME_BestBeforeDate).ascending(true).nullsLast(true).build())
.orderBy(DocumentQueryOrderBy.byFieldName(HUEditorRow.FIELDNAME_M_HU_ID));
}
}

0 comments on commit 05e191e

Please sign in to comment.