Refactor ResourceLoadController
Now each filter has its own class. FEA: ItEr75S11PreventLooseChangesWIP
This commit is contained in:
parent
9c366dc1fa
commit
0efe2782ca
3 changed files with 668 additions and 352 deletions
|
|
@ -95,7 +95,7 @@ public class ResourcesLoadPanel extends HtmlMacroComponent {
|
|||
private int filterByNamePosition = 0;
|
||||
private int numberOfGroupsByName = 10;
|
||||
private int lastSelectedName = 0;
|
||||
private PaginationType paginationType;
|
||||
private final PaginationType paginationType;
|
||||
|
||||
private WeakReferencedListeners<IPaginationFilterChangedListener> nameFilterListener =
|
||||
WeakReferencedListeners.create();
|
||||
|
|
@ -540,14 +540,14 @@ public class ResourcesLoadPanel extends HtmlMacroComponent {
|
|||
|
||||
public void setInternalPaginationDisabled(boolean disabled) {
|
||||
Combobox combo = ((Combobox) getFellow("filterByNameCombo"));
|
||||
if(combo.isDisabled() != disabled) {
|
||||
if (combo != null && combo.isDisabled() != disabled) {
|
||||
filterByNamePosition = disabled? -1 :
|
||||
((Integer)combo.getSelectedItemApi().getValue()).intValue();
|
||||
combo.setDisabled(disabled);
|
||||
}
|
||||
}
|
||||
|
||||
public void addNameFilterListener(
|
||||
public void addPaginationFilterListener(
|
||||
IPaginationFilterChangedListener iFilterChangedListener) {
|
||||
nameFilterListener.addListener(iFilterChangedListener);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -350,6 +350,13 @@ public class ResourceLoadModel implements IResourceLoadModel {
|
|||
return date.toDateTimeAtStartOfDay().toDate();
|
||||
}
|
||||
|
||||
public static LocalDate toLocal(Date date) {
|
||||
if (date == null) {
|
||||
return null;
|
||||
}
|
||||
return LocalDate.fromDateFields(date);
|
||||
}
|
||||
|
||||
private void reattachCriteriaToShow() {
|
||||
for (Criterion each : criteriaToShowList) {
|
||||
criterionDAO.reattachUnmodifiedEntity(each);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue