include a refresh button belonging to the list of customer
and subcontractor communications, in order to update the selected filter.
This commit is contained in:
parent
bcce43a35c
commit
72dabb9cc9
4 changed files with 25 additions and 0 deletions
|
|
@ -98,7 +98,10 @@ public class CustomerCommunicationCRUDController extends GenericForwardComposer
|
|||
|
||||
public void setCurrentFilterItem(FilterCommunicationEnum selected) {
|
||||
customerCommunicationModel.setCurrentFilter(selected);
|
||||
refreshCustomerCommunicationsList();
|
||||
}
|
||||
|
||||
private void refreshCustomerCommunicationsList(){
|
||||
// update the customer communication list
|
||||
listing.setModel(new SimpleListModel(getCustomerCommunications()));
|
||||
listing.invalidate();
|
||||
|
|
@ -198,4 +201,11 @@ public class CustomerCommunicationCRUDController extends GenericForwardComposer
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply filter to customers communications
|
||||
* @param event
|
||||
*/
|
||||
public void onApplyFilter(Event event) {
|
||||
refreshCustomerCommunicationsList();
|
||||
}
|
||||
}
|
||||
|
|
@ -109,7 +109,10 @@ public class SubcontractorCommunicationCRUDController extends GenericForwardComp
|
|||
|
||||
public void setCurrentFilterItem(FilterCommunicationEnum selected) {
|
||||
subcontractorCommunicationModel.setCurrentFilter(selected);
|
||||
refreshSubcontractorCommunicationsList();
|
||||
}
|
||||
|
||||
private void refreshSubcontractorCommunicationsList() {
|
||||
// update the subcontractor communication list
|
||||
listing.setModel(new SimpleListModel(getSubcontractorCommunications()));
|
||||
listing.invalidate();
|
||||
|
|
@ -233,4 +236,12 @@ public class SubcontractorCommunicationCRUDController extends GenericForwardComp
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply filter to subcontractors communications
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
public void onApplyFilter(Event event) {
|
||||
refreshSubcontractorCommunicationsList();
|
||||
}
|
||||
}
|
||||
|
|
@ -39,6 +39,8 @@
|
|||
selectedItem="@{controller.currentFilterItem}"
|
||||
itemRenderer="org.libreplan.web.common.EnumsListitemRenderer">
|
||||
</listbox>
|
||||
<button label="${i18n:_('Refresh')}" style="margin-top: -4px"
|
||||
onClick="controller.onApplyFilter(event)"/>
|
||||
</div>
|
||||
<separator bar="false" spacing="20px" orient="horizontal"/>
|
||||
<grid id="listing"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@
|
|||
selectedItem="@{controller.currentFilterItem}"
|
||||
itemRenderer="org.libreplan.web.common.EnumsListitemRenderer">
|
||||
</listbox>
|
||||
<button label="${i18n:_('Refresh')}" style="margin-top: -4px"
|
||||
onClick="controller.onApplyFilter(event)"/>
|
||||
</div>
|
||||
<separator bar="false" spacing="20px" orient="horizontal"/>
|
||||
<grid id="listing"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue