Performed refactoring
This commit is contained in:
parent
226c65ade6
commit
8d4b53388c
|
@ -764,7 +764,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
if (searchingFilter == null || getListOfRecordsEvent.isOnApplicationInit()
|
if (searchingFilter == null || getListOfRecordsEvent.isOnApplicationInit()
|
||||||
|| getListOfRecordsEvent.isReloadFilteringParameters()) {
|
|| getListOfRecordsEvent.isReloadFilteringParameters()) {
|
||||||
mainTabPanel.setFilteringParameters(seachingFilterParameters);
|
mainTabPanel.setFilteringParameters(seachingFilterParameters);
|
||||||
searchingFilter = mainTabPanel.getCurrentSearchingFilter();
|
searchingFilter = mainTabPanel.getCurrentProjectsSearchingFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO MUST MANAGE getListOfRecordsEvent.isReloadFilteringParameters()
|
// TODO MUST MANAGE getListOfRecordsEvent.isReloadFilteringParameters()
|
||||||
|
@ -898,7 +898,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
|
|
||||||
appManagerBus.fireEvent(new GetListOfRecordsEvent(false,
|
appManagerBus.fireEvent(new GetListOfRecordsEvent(false,
|
||||||
resultDocumentDV.getProfileID(),
|
resultDocumentDV.getProfileID(),
|
||||||
mainTabPanel.getCurrentSearchingFilter(), true));
|
mainTabPanel.getCurrentProjectsSearchingFilter(), true));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -951,7 +951,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
// mainTabPanel.getCurrentSortFilter()));
|
// mainTabPanel.getCurrentSortFilter()));
|
||||||
|
|
||||||
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, grpw.getProfileID(),
|
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, grpw.getProfileID(),
|
||||||
mainTabPanel.getCurrentSearchingFilter(), false));
|
mainTabPanel.getCurrentProjectsSearchingFilter(), false));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1209,7 +1209,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
|
|
||||||
appManagerBus.fireEvent(new GetListOfRecordsEvent(false,
|
appManagerBus.fireEvent(new GetListOfRecordsEvent(false,
|
||||||
resultDocumentDV.getProfileID(),
|
resultDocumentDV.getProfileID(),
|
||||||
mainTabPanel.getCurrentSearchingFilter(), false));
|
mainTabPanel.getCurrentProjectsSearchingFilter(), false));
|
||||||
} else {
|
} else {
|
||||||
modal.setTitle("Error");
|
modal.setTitle("Error");
|
||||||
Alert alert = new Alert(
|
Alert alert = new Alert(
|
||||||
|
|
|
@ -18,8 +18,8 @@ import org.gcube.portlets.user.geoportaldataentry.client.events.CreateNewProject
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.events.GetListOfRecordsEvent;
|
import org.gcube.portlets.user.geoportaldataentry.client.events.GetListOfRecordsEvent;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.events.OperationOnItemEvent;
|
import org.gcube.portlets.user.geoportaldataentry.client.events.OperationOnItemEvent;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.form.GeonaDataEntryMainForm;
|
import org.gcube.portlets.user.geoportaldataentry.client.ui.form.GeonaDataEntryMainForm;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.projects.ListOfProjectCenterPanel;
|
import org.gcube.portlets.user.geoportaldataentry.client.ui.projects.ListOfProjectTablePanel;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.projects.ListOfProjectNorthPanel;
|
import org.gcube.portlets.user.geoportaldataentry.client.ui.projects.ListOfProjectWorkflowActionsPanel;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.relation.CreateRelationProjectsPanel;
|
import org.gcube.portlets.user.geoportaldataentry.client.ui.relation.CreateRelationProjectsPanel;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.DialogInform;
|
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.DialogInform;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.LoaderIcon;
|
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.LoaderIcon;
|
||||||
|
@ -51,7 +51,7 @@ import com.google.gwt.user.client.ui.Widget;
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
*
|
*
|
||||||
* Aug 5, 2021
|
* Sep 21, 2022
|
||||||
*/
|
*/
|
||||||
public class GeonaMainTabPanel extends Composite {
|
public class GeonaMainTabPanel extends Composite {
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
*
|
*
|
||||||
* Aug 5, 2021
|
* Sep 21, 2022
|
||||||
*/
|
*/
|
||||||
interface GeonaMainTabPanelUiBinder extends UiBinder<Widget, GeonaMainTabPanel> {
|
interface GeonaMainTabPanelUiBinder extends UiBinder<Widget, GeonaMainTabPanel> {
|
||||||
}
|
}
|
||||||
|
@ -132,9 +132,9 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
|
|
||||||
private ScrollPanel detailsPanel = new ScrollPanel();
|
private ScrollPanel detailsPanel = new ScrollPanel();
|
||||||
|
|
||||||
private ListOfProjectCenterPanel listOfProjectCenterPanel;
|
private ListOfProjectTablePanel listOfProjectTablePanel;
|
||||||
|
|
||||||
private ListOfProjectNorthPanel listOfProjectNorthPanel;
|
private ListOfProjectWorkflowActionsPanel listOfProjectWorkflowActionsPanel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new geona main tab panel.
|
* Instantiates a new geona main tab panel.
|
||||||
|
@ -146,19 +146,19 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
this.appManagerBus = appManagerBus;
|
this.appManagerBus = appManagerBus;
|
||||||
bindEvents();
|
bindEvents();
|
||||||
|
|
||||||
listOfProjectNorthPanel = new ListOfProjectNorthPanel(appManagerBus);
|
listOfProjectWorkflowActionsPanel = new ListOfProjectWorkflowActionsPanel(appManagerBus);
|
||||||
|
|
||||||
// listOfProjectNorthPanel.setHeight("40px");
|
// listOfProjectWorkflowActionsPanel.setHeight("40px");
|
||||||
theDockLayoutPanel.addNorth(listOfProjectNorthPanel, 40);
|
theDockLayoutPanel.addNorth(listOfProjectWorkflowActionsPanel, 40);
|
||||||
theDockLayoutPanel.setWidgetHidden(listOfProjectNorthPanel, true);
|
theDockLayoutPanel.setWidgetHidden(listOfProjectWorkflowActionsPanel, true);
|
||||||
|
|
||||||
detailsPanel.addStyleName("theDetailsPanel");
|
detailsPanel.addStyleName("theDetailsPanel");
|
||||||
theDockLayoutPanel.addEast(detailsPanel, 500);
|
theDockLayoutPanel.addEast(detailsPanel, 500);
|
||||||
theDockLayoutPanel.setWidgetHidden(detailsPanel, true);
|
theDockLayoutPanel.setWidgetHidden(detailsPanel, true);
|
||||||
|
|
||||||
listOfProjectCenterPanel = new ListOfProjectCenterPanel(appManagerBus);
|
listOfProjectTablePanel = new ListOfProjectTablePanel(appManagerBus);
|
||||||
listOfProjectNorthPanel.setHeight("100%");
|
listOfProjectWorkflowActionsPanel.setHeight("100%");
|
||||||
theDockLayoutPanel.add(listOfProjectCenterPanel);
|
theDockLayoutPanel.add(listOfProjectTablePanel);
|
||||||
|
|
||||||
setLoaderVisible("", false);
|
setLoaderVisible("", false);
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
public void setFilteringParameters(CacheSearchingFilterParametersFromConfig sfp) {
|
public void setFilteringParameters(CacheSearchingFilterParametersFromConfig sfp) {
|
||||||
GWT.log("setFilteringParameters instancied");
|
GWT.log("setFilteringParameters instancied");
|
||||||
this.cacheSearchingFilterParameters = sfp;
|
this.cacheSearchingFilterParameters = sfp;
|
||||||
listOfProjectCenterPanel.setFilteringParameters(sfp);
|
this.listOfProjectTablePanel.setFilteringParameters(cacheSearchingFilterParameters);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,8 +282,7 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
/**
|
/**
|
||||||
* Sets the role label.
|
* Sets the role label.
|
||||||
*
|
*
|
||||||
* @param userRole the user role
|
* @param userRole the user role
|
||||||
* @param roleTitle the role title
|
|
||||||
*/
|
*/
|
||||||
public void setRole(GcubeUserRole userRole) {
|
public void setRole(GcubeUserRole userRole) {
|
||||||
this.userRole = userRole;
|
this.userRole = userRole;
|
||||||
|
@ -311,7 +310,7 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
*/
|
*/
|
||||||
public void showListOfConcessioniView(GeonaRecordsPaginatedView grpw) {
|
public void showListOfConcessioniView(GeonaRecordsPaginatedView grpw) {
|
||||||
this.grpw = grpw;
|
this.grpw = grpw;
|
||||||
listOfProjectCenterPanel.showListOfConcessioniView(grpw);
|
listOfProjectTablePanel.showListOfConcessioniView(grpw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -326,12 +325,12 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current sort filter.
|
* Gets the current projects searching filter.
|
||||||
*
|
*
|
||||||
* @return the current sort filter
|
* @return the current projects searching filter
|
||||||
*/
|
*/
|
||||||
public SearchingFilter getCurrentSearchingFilter() {
|
public SearchingFilter getCurrentProjectsSearchingFilter() {
|
||||||
return listOfProjectCenterPanel.builtSearchingFilter();
|
return listOfProjectTablePanel.builtSearchingFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -359,7 +358,7 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
*/
|
*/
|
||||||
public void instanceAndShowListOfProjects() {
|
public void instanceAndShowListOfProjects() {
|
||||||
GWT.log("instanceAndShowListOfProjects called");
|
GWT.log("instanceAndShowListOfProjects called");
|
||||||
listOfProjectCenterPanel.instanceAndShowListOfProjects(ucdProjectTypesForListingDataView);
|
listOfProjectTablePanel.instanceAndShowListOfProjects(ucdProjectTypesForListingDataView);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -371,7 +370,7 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
GWT.log("initMainAccordingToListUseCaseDescriptors: " + listUCDescriptors);
|
GWT.log("initMainAccordingToListUseCaseDescriptors: " + listUCDescriptors);
|
||||||
// this.listUCDescriptors = listUCDescriptors;
|
// this.listUCDescriptors = listUCDescriptors;
|
||||||
ddCreateNewProject.clear();
|
ddCreateNewProject.clear();
|
||||||
listOfProjectCenterPanel.projectTypeReset();
|
listOfProjectTablePanel.projectTypeReset();
|
||||||
|
|
||||||
ucdProjectTypesForListingDataView.clear();
|
ucdProjectTypesForListingDataView.clear();
|
||||||
|
|
||||||
|
@ -420,12 +419,12 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, ucd.getProfileID(),
|
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, ucd.getProfileID(),
|
||||||
getCurrentSearchingFilter(), true));
|
getCurrentProjectsSearchingFilter(), true));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ucdProjectTypesForListingDataView.add(ucd);
|
ucdProjectTypesForListingDataView.add(ucd);
|
||||||
|
|
||||||
listOfProjectCenterPanel.addProjectType(link);
|
listOfProjectTablePanel.addProjectType(link);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,16 +457,27 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inits the action list panel.
|
||||||
|
*
|
||||||
|
* @param ucd the ucd
|
||||||
|
*/
|
||||||
public void initActionListPanel(UseCaseDescriptorDV ucd) {
|
public void initActionListPanel(UseCaseDescriptorDV ucd) {
|
||||||
GWT.log("Init ActionListPanel for UCD: " + ucd);
|
GWT.log("Init ActionListPanel for UCD: " + ucd);
|
||||||
listOfProjectNorthPanel.initActionListPanel(ucd);
|
listOfProjectWorkflowActionsPanel.initActionListPanel(ucd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show actions on selected.
|
||||||
|
*
|
||||||
|
* @param <T> the generic type
|
||||||
|
* @param selectItems the select items
|
||||||
|
*/
|
||||||
public <T> void showActionsOnSelected(List<T> selectItems) {
|
public <T> void showActionsOnSelected(List<T> selectItems) {
|
||||||
|
|
||||||
theDockLayoutPanel.setWidgetHidden(listOfProjectNorthPanel, false);
|
theDockLayoutPanel.setWidgetHidden(listOfProjectWorkflowActionsPanel, false);
|
||||||
|
|
||||||
listOfProjectNorthPanel.showActionsOnSelected(selectItems, userRole);
|
listOfProjectWorkflowActionsPanel.showActionsOnSelected(selectItems, userRole);
|
||||||
|
|
||||||
if (createRelationProjectsPanel != null && createRelationProjectsPanel.isVisible()) {
|
if (createRelationProjectsPanel != null && createRelationProjectsPanel.isVisible()) {
|
||||||
createRelationProjectsPanel.selectedProject((ResultDocumentDV) selectItems.get(0));
|
createRelationProjectsPanel.selectedProject((ResultDocumentDV) selectItems.get(0));
|
||||||
|
@ -505,6 +515,12 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
this.pageHeaderDataEntry.setSubtext("New: " + hDV.getItemType());
|
this.pageHeaderDataEntry.setSubtext("New: " + hDV.getItemType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show create relation panel.
|
||||||
|
*
|
||||||
|
* @param bool the bool
|
||||||
|
* @param resultDocumentDV the result document DV
|
||||||
|
*/
|
||||||
public void showCreateRelationPanel(boolean bool, ResultDocumentDV resultDocumentDV) {
|
public void showCreateRelationPanel(boolean bool, ResultDocumentDV resultDocumentDV) {
|
||||||
detailsPanel.clear();
|
detailsPanel.clear();
|
||||||
// theDetailsPanel.setVisible(bool);
|
// theDetailsPanel.setVisible(bool);
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
}
|
}
|
||||||
</ui:style>
|
</ui:style>
|
||||||
<g:HTMLPanel ui:field="actionListBasePanel" addStyleNames="{style.action-panel-style}">
|
<g:HTMLPanel ui:field="actionListBasePanel" addStyleNames="{style.action-panel-style}">
|
||||||
<g:Label>MANAGE</g:Label>
|
<g:Label>WORKFLOW ACTIONS</g:Label>
|
||||||
<g:HTMLPanel ui:field="actionListContainer"></g:HTMLPanel>
|
<g:HTMLPanel ui:field="actionListContainer"></g:HTMLPanel>
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
</ui:UiBinder>
|
</ui:UiBinder>
|
|
@ -9,7 +9,6 @@ import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter.LOGICAL_OP;
|
import org.gcube.application.geoportalcommon.shared.SearchingFilter.LOGICAL_OP;
|
||||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter.ORDER;
|
import org.gcube.application.geoportalcommon.shared.SearchingFilter.ORDER;
|
||||||
import org.gcube.application.geoportalcommon.shared.WhereClause;
|
import org.gcube.application.geoportalcommon.shared.WhereClause;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ConfigurationDV;
|
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalClientCaches.CacheSearchingFilterParametersFromConfig;
|
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalClientCaches.CacheSearchingFilterParametersFromConfig;
|
||||||
|
@ -38,7 +37,14 @@ import com.google.gwt.user.client.ui.HTMLPanel;
|
||||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
|
||||||
public class ListOfProjectCenterPanel extends Composite {
|
/**
|
||||||
|
* The Class ListOfProjectTablePanel.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Sep 21, 2022
|
||||||
|
*/
|
||||||
|
public class ListOfProjectTablePanel extends Composite {
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
Dropdown dropdownSortBy;
|
Dropdown dropdownSortBy;
|
||||||
|
@ -87,12 +93,24 @@ public class ListOfProjectCenterPanel extends Composite {
|
||||||
|
|
||||||
private GeonaRecordsPaginatedView grpw;
|
private GeonaRecordsPaginatedView grpw;
|
||||||
|
|
||||||
private static ListOfProjectCenterPanelUiBinder uiBinder = GWT.create(ListOfProjectCenterPanelUiBinder.class);
|
private static ListOfProjectTablePanelUiBinder uiBinder = GWT.create(ListOfProjectTablePanelUiBinder.class);
|
||||||
|
|
||||||
interface ListOfProjectCenterPanelUiBinder extends UiBinder<Widget, ListOfProjectCenterPanel> {
|
/**
|
||||||
|
* The Interface ListOfProjectTablePanelUiBinder.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Sep 21, 2022
|
||||||
|
*/
|
||||||
|
interface ListOfProjectTablePanelUiBinder extends UiBinder<Widget, ListOfProjectTablePanel> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListOfProjectCenterPanel(HandlerManager appManagerBus) {
|
/**
|
||||||
|
* Instantiates a new list of project table panel.
|
||||||
|
*
|
||||||
|
* @param appManagerBus the app manager bus
|
||||||
|
*/
|
||||||
|
public ListOfProjectTablePanel(HandlerManager appManagerBus) {
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
||||||
this.appManagerBus = appManagerBus;
|
this.appManagerBus = appManagerBus;
|
||||||
|
|
||||||
|
@ -111,13 +129,68 @@ public class ListOfProjectCenterPanel extends Composite {
|
||||||
bindEvents();
|
bindEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bind events.
|
||||||
|
*/
|
||||||
|
private void bindEvents() {
|
||||||
|
|
||||||
|
buttonReloadProjects.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
|
UseCaseDescriptorDV singleUCD = getSelectProjectType();
|
||||||
|
if (singleUCD != null) {
|
||||||
|
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, singleUCD.getProfileID(),
|
||||||
|
getCurrentSearchingFilter(), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
searchField.addKeyPressHandler(new KeyPressHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onKeyPress(KeyPressEvent event) {
|
||||||
|
GWT.log("CHAR CODE: " + event.getCharCode());
|
||||||
|
if (com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER == event.getCharCode()) {
|
||||||
|
GWT.log(searchField.getText());
|
||||||
|
doSearchEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
resetSearch.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
searchField.setText("");
|
||||||
|
|
||||||
|
UseCaseDescriptorDV singleUCD = getSelectProjectType();
|
||||||
|
if (singleUCD != null) {
|
||||||
|
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, singleUCD.getProfileID(),
|
||||||
|
getCurrentSearchingFilter(), false));
|
||||||
|
}
|
||||||
|
|
||||||
|
resetSearch.setVisible(false);
|
||||||
|
|
||||||
|
// Window.alert("resetSearch MUST BE REVISITED");
|
||||||
|
/*
|
||||||
|
* appManagerBus.fireEvent(new GetListOfRecordsEvent(RECORD_TYPE.CONCESSIONE,
|
||||||
|
* getCurrentSortFilter())); resetSearch.setVisible(false);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the filtering parameters.
|
* Sets the filtering parameters.
|
||||||
*
|
*
|
||||||
* @param sfp the sfp
|
* @param sfp the sfp
|
||||||
*/
|
*/
|
||||||
public void setFilteringParameters(CacheSearchingFilterParametersFromConfig sfp) {
|
public void setFilteringParameters(CacheSearchingFilterParametersFromConfig sfp) {
|
||||||
GWT.log("setFilteringParameters instancied");
|
GWT.log("ListOfProjectTablePanel setFilteringParameters called");
|
||||||
this.cacheSearchingFilterParameters = sfp;
|
this.cacheSearchingFilterParameters = sfp;
|
||||||
List<ItemFieldDV> sortByFields = sfp.getOrderByFields();
|
List<ItemFieldDV> sortByFields = sfp.getOrderByFields();
|
||||||
List<ItemFieldDV> searchForFields = sfp.getSearchByFields();
|
List<ItemFieldDV> searchForFields = sfp.getSearchByFields();
|
||||||
|
@ -201,8 +274,8 @@ public class ListOfProjectCenterPanel extends Composite {
|
||||||
* @param labelFilter the label filter
|
* @param labelFilter the label filter
|
||||||
* @return the searching filter
|
* @return the searching filter
|
||||||
*/
|
*/
|
||||||
public SearchingFilter toSortFilter(String labelFilter) {
|
private SearchingFilter toSortFilter(String labelFilter) {
|
||||||
GWT.log("toSortFilter for label " + labelFilter);
|
GWT.log("ListOfProjectTablePanel toSortFilter for label " + labelFilter);
|
||||||
String[] array = labelFilter.split(LABEL_FILTER_SEPARATOR);
|
String[] array = labelFilter.split(LABEL_FILTER_SEPARATOR);
|
||||||
|
|
||||||
GWT.log("label filter: " + array[0]);
|
GWT.log("label filter: " + array[0]);
|
||||||
|
@ -230,10 +303,12 @@ public class ListOfProjectCenterPanel extends Composite {
|
||||||
/**
|
/**
|
||||||
* Dirty solution. I created this one because I had problem on firing click
|
* Dirty solution. I created this one because I had problem on firing click
|
||||||
* event for Tab element
|
* event for Tab element
|
||||||
*
|
*
|
||||||
|
* @param ucdProjectTypesForListingDataView the ucd project types for listing
|
||||||
|
* data view
|
||||||
*/
|
*/
|
||||||
public void instanceAndShowListOfProjects(List<UseCaseDescriptorDV> ucdProjectTypesForListingDataView) {
|
public void instanceAndShowListOfProjects(List<UseCaseDescriptorDV> ucdProjectTypesForListingDataView) {
|
||||||
GWT.log("ListOfProjectCenterPanel.instanceAndShowListOfProjects called");
|
GWT.log("ListOfProjectTablePanel instanceAndShowListOfProjects called");
|
||||||
this.ucdProjectTypesForListingDataView = ucdProjectTypesForListingDataView;
|
this.ucdProjectTypesForListingDataView = ucdProjectTypesForListingDataView;
|
||||||
// If the list of UCDProjectType for listing is not empty.. FIRE THE EVENT OF
|
// If the list of UCDProjectType for listing is not empty.. FIRE THE EVENT OF
|
||||||
// SELECTION on the first item
|
// SELECTION on the first item
|
||||||
|
@ -247,23 +322,23 @@ public class ListOfProjectCenterPanel extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* To list item fields.
|
// * To list item fields.
|
||||||
*
|
// *
|
||||||
* @param config the config
|
// * @param config the config
|
||||||
* @return the list
|
// * @return the list
|
||||||
*/
|
// */
|
||||||
private List<ItemFieldDV> toListItemFields(ConfigurationDV<?> config) {
|
// private List<ItemFieldDV> toListItemFields(ConfigurationDV<?> config) {
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
return (List<ItemFieldDV>) config.getConfiguration();
|
// return (List<ItemFieldDV>) config.getConfiguration();
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
GWT.log("Error on casting " + ConfigurationDV.class.getName() + " to List of "
|
// GWT.log("Error on casting " + ConfigurationDV.class.getName() + " to List of "
|
||||||
+ ItemFieldDV.class.getName());
|
// + ItemFieldDV.class.getName());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Built searching filter.
|
* Built searching filter.
|
||||||
|
@ -310,9 +385,7 @@ public class ListOfProjectCenterPanel extends Composite {
|
||||||
*/
|
*/
|
||||||
public SearchingFilter getCurrentSearchingFilter() {
|
public SearchingFilter getCurrentSearchingFilter() {
|
||||||
currentSearchingFilter = builtSearchingFilter();
|
currentSearchingFilter = builtSearchingFilter();
|
||||||
|
GWT.log("ListOfProjectTablePanel getCurrentSearchingFilter: " + currentSearchingFilter);
|
||||||
// currentSearchingFilter.setProjection(cacheSearchingFilterParameters.getProjection());
|
|
||||||
GWT.log("getCurrentSearchingFilter: " + currentSearchingFilter);
|
|
||||||
return currentSearchingFilter;
|
return currentSearchingFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,65 +452,18 @@ public class ListOfProjectCenterPanel extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bind events.
|
* Project type reset.
|
||||||
*/
|
*/
|
||||||
private void bindEvents() {
|
|
||||||
|
|
||||||
buttonReloadProjects.addClickHandler(new ClickHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(ClickEvent event) {
|
|
||||||
|
|
||||||
UseCaseDescriptorDV singleUCD = getSelectProjectType();
|
|
||||||
if (singleUCD != null) {
|
|
||||||
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, singleUCD.getProfileID(),
|
|
||||||
getCurrentSearchingFilter(), true));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
searchField.addKeyPressHandler(new KeyPressHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onKeyPress(KeyPressEvent event) {
|
|
||||||
GWT.log("CHAR CODE: " + event.getCharCode());
|
|
||||||
if (com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER == event.getCharCode()) {
|
|
||||||
GWT.log(searchField.getText());
|
|
||||||
doSearchEvent();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
resetSearch.addClickHandler(new ClickHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(ClickEvent event) {
|
|
||||||
searchField.setText("");
|
|
||||||
|
|
||||||
UseCaseDescriptorDV singleUCD = getSelectProjectType();
|
|
||||||
if (singleUCD != null) {
|
|
||||||
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, singleUCD.getProfileID(),
|
|
||||||
getCurrentSearchingFilter(), false));
|
|
||||||
}
|
|
||||||
|
|
||||||
resetSearch.setVisible(false);
|
|
||||||
|
|
||||||
// Window.alert("resetSearch MUST BE REVISITED");
|
|
||||||
/*
|
|
||||||
* appManagerBus.fireEvent(new GetListOfRecordsEvent(RECORD_TYPE.CONCESSIONE,
|
|
||||||
* getCurrentSortFilter())); resetSearch.setVisible(false);
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void projectTypeReset() {
|
public void projectTypeReset() {
|
||||||
ddProjectType.clear();
|
ddProjectType.clear();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the project type.
|
||||||
|
*
|
||||||
|
* @param link the link
|
||||||
|
*/
|
||||||
public void addProjectType(NavLink link) {
|
public void addProjectType(NavLink link) {
|
||||||
ddProjectType.add(link);
|
ddProjectType.add(link);
|
||||||
|
|
|
@ -19,25 +19,50 @@ import com.google.gwt.user.client.ui.Composite;
|
||||||
import com.google.gwt.user.client.ui.FlowPanel;
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
|
||||||
public class ListOfProjectNorthPanel extends Composite {
|
/**
|
||||||
|
* The Class ListOfProjectWorkflowActionsPanel.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Sep 21, 2022
|
||||||
|
*/
|
||||||
|
public class ListOfProjectWorkflowActionsPanel extends Composite {
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
FlowPanel actionListMainPanel;
|
FlowPanel actionListMainPanel;
|
||||||
|
|
||||||
private ActionListPanel actionListPanel;
|
private ActionListPanel actionListPanel;
|
||||||
|
|
||||||
private HandlerManager appManagerBus;
|
private HandlerManager appManagerBus;
|
||||||
|
|
||||||
private static ListOfProjectNorthPanelUiBinder uiBinder = GWT.create(ListOfProjectNorthPanelUiBinder.class);
|
private static ListOfProjectWorkflowActionsPanelUiBinder uiBinder = GWT
|
||||||
|
.create(ListOfProjectWorkflowActionsPanelUiBinder.class);
|
||||||
|
|
||||||
interface ListOfProjectNorthPanelUiBinder extends UiBinder<Widget, ListOfProjectNorthPanel> {
|
/**
|
||||||
|
* The Interface ListOfProjectWorkflowActionsPanelUiBinder.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Sep 21, 2022
|
||||||
|
*/
|
||||||
|
interface ListOfProjectWorkflowActionsPanelUiBinder extends UiBinder<Widget, ListOfProjectWorkflowActionsPanel> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListOfProjectNorthPanel(HandlerManager appManagerBus) {
|
/**
|
||||||
|
* Instantiates a new list of project workflow actions panel.
|
||||||
|
*
|
||||||
|
* @param appManagerBus the app manager bus
|
||||||
|
*/
|
||||||
|
public ListOfProjectWorkflowActionsPanel(HandlerManager appManagerBus) {
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
||||||
this.appManagerBus = appManagerBus;
|
this.appManagerBus = appManagerBus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inits the action list panel.
|
||||||
|
*
|
||||||
|
* @param ucd the ucd
|
||||||
|
*/
|
||||||
public void initActionListPanel(UseCaseDescriptorDV ucd) {
|
public void initActionListPanel(UseCaseDescriptorDV ucd) {
|
||||||
GWT.log("Init ActionListPanel for UCD: " + ucd);
|
GWT.log("Init ActionListPanel for UCD: " + ucd);
|
||||||
|
|
||||||
|
@ -58,7 +83,7 @@ public class ListOfProjectNorthPanel extends Composite {
|
||||||
actionListMainPanel.setVisible(false);
|
actionListMainPanel.setVisible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To list action definition.
|
* To list action definition.
|
||||||
*
|
*
|
||||||
|
@ -77,9 +102,16 @@ public class ListOfProjectNorthPanel extends Composite {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show actions on selected.
|
||||||
|
*
|
||||||
|
* @param <T> the generic type
|
||||||
|
* @param selectItems the select items
|
||||||
|
* @param userRole the user role
|
||||||
|
*/
|
||||||
public <T> void showActionsOnSelected(List<T> selectItems, GcubeUserRole userRole) {
|
public <T> void showActionsOnSelected(List<T> selectItems, GcubeUserRole userRole) {
|
||||||
actionListPanel.showActionsOnSelected(selectItems, userRole);
|
actionListPanel.showActionsOnSelected(selectItems, userRole);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,10 +1,8 @@
|
||||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui"
|
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||||
xmlns:m="urn:import:org.gcube.portlets.user.geoportaldataentry.client.ui"
|
|
||||||
xmlns:r="urn:import:org.gcube.portlets.user.geoportaldataentry.client.ui.utils">
|
|
||||||
|
|
||||||
<ui:style>
|
<ui:style>
|
||||||
.important {
|
.important {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
Loading…
Reference in New Issue