Added dedicated EventBus. Separated from Portlet EventBus
This commit is contained in:
parent
0417f98149
commit
89ae69d54b
|
@ -0,0 +1,50 @@
|
||||||
|
package org.gcube.portlets.widgets.ckandatapublisherwidget.client.events;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class ReloadDatasetPageEvent.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Feb 13, 2024
|
||||||
|
*/
|
||||||
|
public class ReloadDatasetPageEvent extends GwtEvent<ReloadDatasetPageEventHandler> {
|
||||||
|
public static Type<ReloadDatasetPageEventHandler> TYPE = new Type<ReloadDatasetPageEventHandler>();
|
||||||
|
|
||||||
|
private String datasetIDorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new reload dataset page event.
|
||||||
|
*
|
||||||
|
* @param resource the resource
|
||||||
|
*/
|
||||||
|
public ReloadDatasetPageEvent(String datasetIDorName) {
|
||||||
|
this.datasetIDorName = datasetIDorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the associated type.
|
||||||
|
*
|
||||||
|
* @return the associated type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Type<ReloadDatasetPageEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dispatch.
|
||||||
|
*
|
||||||
|
* @param handler the handler
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void dispatch(ReloadDatasetPageEventHandler handler) {
|
||||||
|
handler.onReloadDatasetPage(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDatasetIDorName() {
|
||||||
|
return datasetIDorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package org.gcube.portlets.widgets.ckandatapublisherwidget.client.events;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Interface ReloadDatasetPageEventHandler.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Feb 13, 2024
|
||||||
|
*/
|
||||||
|
public interface ReloadDatasetPageEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On added resource.
|
||||||
|
*
|
||||||
|
* @param addResourceEvent the add resource event
|
||||||
|
*/
|
||||||
|
void onReloadDatasetPage(ReloadDatasetPageEvent addResourceEvent);
|
||||||
|
}
|
|
@ -274,7 +274,10 @@ public class CreateDatasetForm extends Composite {
|
||||||
private List<LicenseBean> licenseBean;
|
private List<LicenseBean> licenseBean;
|
||||||
|
|
||||||
// event bus
|
// event bus
|
||||||
private HandlerManager eventBus;
|
private HandlerManager eventBusPublisherWidget = new HandlerManager(null);
|
||||||
|
|
||||||
|
// event bus of the principal application (it is the Catalogue Portlet)
|
||||||
|
private HandlerManager eventBusMainApplication;
|
||||||
|
|
||||||
// added custom field entries (by the user)
|
// added custom field entries (by the user)
|
||||||
private List<CustomFieldEntry> customFieldEntriesList = new ArrayList<CustomFieldEntry>();
|
private List<CustomFieldEntry> customFieldEntriesList = new ArrayList<CustomFieldEntry>();
|
||||||
|
@ -305,29 +308,29 @@ public class CreateDatasetForm extends Composite {
|
||||||
/**
|
/**
|
||||||
* Invoked in the most general case
|
* Invoked in the most general case
|
||||||
*
|
*
|
||||||
* @param eventBus the event bus
|
* @param eventBusPublisherWidget the event bus
|
||||||
*/
|
*/
|
||||||
public CreateDatasetForm(HandlerManager eventBus) {
|
public CreateDatasetForm(HandlerManager eventBusMainApplication) {
|
||||||
createDatasetFormBody(false, null, eventBus, OPERATION.NEW);
|
createDatasetFormBody(false, null, eventBusMainApplication, OPERATION.NEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked in the most general case
|
* Invoked in the most general case
|
||||||
*
|
*
|
||||||
* @param eventBus the event bus
|
* @param eventBusPublisherWidget the event bus
|
||||||
*/
|
*/
|
||||||
public CreateDatasetForm(HandlerManager eventBus, OPERATION operation) {
|
public CreateDatasetForm(HandlerManager eventBusMainApplication, OPERATION operation) {
|
||||||
createDatasetFormBody(false, null, eventBus, operation);
|
createDatasetFormBody(false, null, eventBusMainApplication, operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked when the workspace is used
|
* Invoked when the workspace is used
|
||||||
*
|
*
|
||||||
* @param idFolderWorkspace
|
* @param idFolderWorkspace
|
||||||
* @param eventBus the event bus
|
* @param eventBusPublisherWidget the event bus
|
||||||
*/
|
*/
|
||||||
public CreateDatasetForm(String idFolderOrFileWorkspace, HandlerManager eventBus) {
|
public CreateDatasetForm(String idFolderOrFileWorkspace, HandlerManager eventBusMainApplication) {
|
||||||
createDatasetFormBody(true, idFolderOrFileWorkspace, eventBus, OPERATION.NEW);
|
createDatasetFormBody(true, idFolderOrFileWorkspace, eventBusMainApplication, OPERATION.NEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -335,7 +338,7 @@ public class CreateDatasetForm extends Composite {
|
||||||
*/
|
*/
|
||||||
private void bind() {
|
private void bind() {
|
||||||
// when a custom field is removed, remove it from the list
|
// when a custom field is removed, remove it from the list
|
||||||
eventBus.addHandler(DeleteCustomFieldEvent.TYPE, new DeleteCustomFieldEventHandler() {
|
eventBusPublisherWidget.addHandler(DeleteCustomFieldEvent.TYPE, new DeleteCustomFieldEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRemoveEntry(DeleteCustomFieldEvent event) {
|
public void onRemoveEntry(DeleteCustomFieldEvent event) {
|
||||||
|
@ -345,7 +348,7 @@ public class CreateDatasetForm extends Composite {
|
||||||
});
|
});
|
||||||
|
|
||||||
// on close form
|
// on close form
|
||||||
eventBus.addHandler(CloseCreationFormEvent.TYPE, new CloseCreationFormEventHandler() {
|
eventBusPublisherWidget.addHandler(CloseCreationFormEvent.TYPE, new CloseCreationFormEventHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onClose(CloseCreationFormEvent event) {
|
public void onClose(CloseCreationFormEvent event) {
|
||||||
InfoIconsLabels.closeDialogBox(popupOpenedIds);
|
InfoIconsLabels.closeDialogBox(popupOpenedIds);
|
||||||
|
@ -359,13 +362,13 @@ public class CreateDatasetForm extends Composite {
|
||||||
* @param isWorkspaceRequest
|
* @param isWorkspaceRequest
|
||||||
* @param idFolderWorkspace
|
* @param idFolderWorkspace
|
||||||
* @param owner
|
* @param owner
|
||||||
* @param eventBus
|
* @param eventBusPublisherWidget
|
||||||
*/
|
*/
|
||||||
private void createDatasetFormBody(final boolean isWorkspaceRequest, final String idFolderOrFileWorkspace,
|
private void createDatasetFormBody(final boolean isWorkspaceRequest, final String idFolderOrFileWorkspace,
|
||||||
final HandlerManager eventBus, final OPERATION operation) {
|
final HandlerManager eventBusMainApplication, final OPERATION operation) {
|
||||||
|
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
||||||
this.eventBus = eventBus;
|
this.eventBusMainApplication = eventBusMainApplication;
|
||||||
this.isWorkspaceRequest = isWorkspaceRequest;
|
this.isWorkspaceRequest = isWorkspaceRequest;
|
||||||
|
|
||||||
iconSpinner.setSpin(true);
|
iconSpinner.setSpin(true);
|
||||||
|
@ -460,8 +463,8 @@ public class CreateDatasetForm extends Composite {
|
||||||
|
|
||||||
for (String value : values) {
|
for (String value : values) {
|
||||||
// these are fixed key, variable value custom fields
|
// these are fixed key, variable value custom fields
|
||||||
CustomFieldEntry toAdd = new CustomFieldEntry(eventBus, entry.getKey(),
|
CustomFieldEntry toAdd = new CustomFieldEntry(eventBusPublisherWidget,
|
||||||
value, false);
|
entry.getKey(), value, false);
|
||||||
customFieldEntriesList.add(toAdd);
|
customFieldEntriesList.add(toAdd);
|
||||||
customFields.add(toAdd);
|
customFields.add(toAdd);
|
||||||
|
|
||||||
|
@ -856,10 +859,10 @@ public class CreateDatasetForm extends Composite {
|
||||||
|
|
||||||
if (categories == null || categories.isEmpty()) {
|
if (categories == null || categories.isEmpty()) {
|
||||||
for (MetadataFieldWrapper field : fields) {
|
for (MetadataFieldWrapper field : fields) {
|
||||||
|
|
||||||
MetaDataField fieldWidget;
|
MetaDataField fieldWidget;
|
||||||
try {
|
try {
|
||||||
fieldWidget = new MetaDataField(field, eventBus, operation);
|
fieldWidget = new MetaDataField(field, eventBusPublisherWidget, operation);
|
||||||
metadataFieldsPanel.add(fieldWidget);
|
metadataFieldsPanel.add(fieldWidget);
|
||||||
listOfMetadataFields.add(fieldWidget);
|
listOfMetadataFields.add(fieldWidget);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -883,7 +886,8 @@ public class CreateDatasetForm extends Composite {
|
||||||
|
|
||||||
MetaDataField fieldWidget;
|
MetaDataField fieldWidget;
|
||||||
try {
|
try {
|
||||||
fieldWidget = new MetaDataField(metadataFieldWrapper, eventBus, operation);
|
fieldWidget = new MetaDataField(metadataFieldWrapper, eventBusPublisherWidget,
|
||||||
|
operation);
|
||||||
cp.addField(fieldWidget);
|
cp.addField(fieldWidget);
|
||||||
listOfMetadataFields.add(fieldWidget);
|
listOfMetadataFields.add(fieldWidget);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -900,7 +904,7 @@ public class CreateDatasetForm extends Composite {
|
||||||
|
|
||||||
MetaDataField fieldWidget;
|
MetaDataField fieldWidget;
|
||||||
try {
|
try {
|
||||||
fieldWidget = new MetaDataField(field, eventBus, operation);
|
fieldWidget = new MetaDataField(field, eventBusPublisherWidget, operation);
|
||||||
extrasCategory.addField(fieldWidget);
|
extrasCategory.addField(fieldWidget);
|
||||||
listOfMetadataFields.add(fieldWidget);
|
listOfMetadataFields.add(fieldWidget);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -917,7 +921,7 @@ public class CreateDatasetForm extends Composite {
|
||||||
@UiHandler("addCustomFieldButton")
|
@UiHandler("addCustomFieldButton")
|
||||||
void addCustomFieldEvent(ClickEvent e) {
|
void addCustomFieldEvent(ClickEvent e) {
|
||||||
|
|
||||||
CustomFieldEntry toAdd = new CustomFieldEntry(eventBus, "", "", true);
|
CustomFieldEntry toAdd = new CustomFieldEntry(eventBusPublisherWidget, "", "", true);
|
||||||
customFieldEntriesList.add(toAdd);
|
customFieldEntriesList.add(toAdd);
|
||||||
customFields.add(toAdd);
|
customFields.add(toAdd);
|
||||||
|
|
||||||
|
@ -1252,7 +1256,8 @@ public class CreateDatasetForm extends Composite {
|
||||||
|
|
||||||
// remove content of the main panel
|
// remove content of the main panel
|
||||||
createDatasetMainPanel.clear();
|
createDatasetMainPanel.clear();
|
||||||
ManageResources manageResources = new ManageResources(eventBus, createdDatasetBean, datasetUrl);
|
ManageResources manageResources = new ManageResources(eventBusPublisherWidget,
|
||||||
|
createdDatasetBean, datasetUrl);
|
||||||
createDatasetMainPanel.add(manageResources);
|
createDatasetMainPanel.add(manageResources);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,6 +18,8 @@ import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.CloseCre
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.CloseCreationFormEventHandler;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.CloseCreationFormEventHandler;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.DeleteCustomFieldEvent;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.DeleteCustomFieldEvent;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.DeleteCustomFieldEventHandler;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.DeleteCustomFieldEventHandler;
|
||||||
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.ReloadDatasetPageEvent;
|
||||||
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.ReloadDatasetPageEventHandler;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.CustomFieldEntry;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.CustomFieldEntry;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources.AddResourceToDataset;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources.AddResourceToDataset;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources.ManageResources;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources.ManageResources;
|
||||||
|
@ -291,8 +293,10 @@ public class UpdateDatasetForm extends Composite {
|
||||||
// the licenses
|
// the licenses
|
||||||
private List<LicenseBean> licenseBean;
|
private List<LicenseBean> licenseBean;
|
||||||
|
|
||||||
// event bus
|
// event bus of the principal application (it is the Catalogue Portlet)
|
||||||
private HandlerManager eventBus;
|
private HandlerManager eventBusMainApplication;
|
||||||
|
|
||||||
|
private HandlerManager eventBusPublisherWidget = new HandlerManager(null);
|
||||||
|
|
||||||
// added custom field entries (by the user)
|
// added custom field entries (by the user)
|
||||||
private List<CustomFieldEntry> customFieldEntriesList = new ArrayList<CustomFieldEntry>();
|
private List<CustomFieldEntry> customFieldEntriesList = new ArrayList<CustomFieldEntry>();
|
||||||
|
@ -315,17 +319,17 @@ public class UpdateDatasetForm extends Composite {
|
||||||
private WizardCreator wizCreator;
|
private WizardCreator wizCreator;
|
||||||
|
|
||||||
private boolean isWorkspaceRequest = false;
|
private boolean isWorkspaceRequest = false;
|
||||||
|
|
||||||
private String datasetIdOrName = null;
|
private String datasetIdOrName = null;
|
||||||
// private DatasetBean theDataset = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new update dataset form.
|
* Instantiates a new update dataset form.
|
||||||
*
|
*
|
||||||
* @param eventBus the event bus
|
* @param eventBusMainApplication the event bus
|
||||||
* @param itemId the item id
|
* @param itemId the item id
|
||||||
*/
|
*/
|
||||||
public UpdateDatasetForm(HandlerManager eventBus, String itemId) {
|
public UpdateDatasetForm(HandlerManager mainApplicationBusRef, String itemId) {
|
||||||
updateDatasetFormBody(eventBus, itemId, OPERATION.UPDATE);
|
updateDatasetFormBody(mainApplicationBusRef, itemId, OPERATION.UPDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -333,7 +337,7 @@ public class UpdateDatasetForm extends Composite {
|
||||||
*/
|
*/
|
||||||
private void bind() {
|
private void bind() {
|
||||||
// when a custom field is removed, remove it from the list
|
// when a custom field is removed, remove it from the list
|
||||||
eventBus.addHandler(DeleteCustomFieldEvent.TYPE, new DeleteCustomFieldEventHandler() {
|
eventBusPublisherWidget.addHandler(DeleteCustomFieldEvent.TYPE, new DeleteCustomFieldEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRemoveEntry(DeleteCustomFieldEvent event) {
|
public void onRemoveEntry(DeleteCustomFieldEvent event) {
|
||||||
|
@ -343,26 +347,41 @@ public class UpdateDatasetForm extends Composite {
|
||||||
});
|
});
|
||||||
|
|
||||||
// on close form
|
// on close form
|
||||||
eventBus.addHandler(CloseCreationFormEvent.TYPE, new CloseCreationFormEventHandler() {
|
eventBusPublisherWidget.addHandler(CloseCreationFormEvent.TYPE, new CloseCreationFormEventHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onClose(CloseCreationFormEvent event) {
|
public void onClose(CloseCreationFormEvent event) {
|
||||||
InfoIconsLabels.closeDialogBox(popupOpenedIds);
|
InfoIconsLabels.closeDialogBox(popupOpenedIds);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eventBusPublisherWidget.addHandler(ReloadDatasetPageEvent.TYPE, new ReloadDatasetPageEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReloadDatasetPage(ReloadDatasetPageEvent addResourceEvent) {
|
||||||
|
|
||||||
|
// Firing the event on the main application bus
|
||||||
|
if (addResourceEvent.getDatasetIDorName() != null) {
|
||||||
|
eventBusMainApplication
|
||||||
|
.fireEvent(new ReloadDatasetPageEvent(addResourceEvent.getDatasetIDorName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The real constructor.
|
* The real constructor.
|
||||||
*
|
*
|
||||||
* @param eventBus the event bus
|
* @param eventBusMainApplication the event bus
|
||||||
* @param datasetIdOrName the item id
|
* @param datasetIdOrName the item id
|
||||||
* @param operation the operation
|
* @param operation the operation
|
||||||
*/
|
*/
|
||||||
private void updateDatasetFormBody(final HandlerManager eventBus, final String datasetIdOrName,
|
private void updateDatasetFormBody(final HandlerManager mainApplicationBusRef, final String datasetIdOrName,
|
||||||
final OPERATION operation) {
|
final OPERATION operation) {
|
||||||
|
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
||||||
this.eventBus = eventBus;
|
|
||||||
|
this.eventBusMainApplication = mainApplicationBusRef;
|
||||||
this.datasetIdOrName = datasetIdOrName;
|
this.datasetIdOrName = datasetIdOrName;
|
||||||
|
|
||||||
iconSpinner.setSpin(true);
|
iconSpinner.setSpin(true);
|
||||||
|
@ -459,8 +478,8 @@ public class UpdateDatasetForm extends Composite {
|
||||||
|
|
||||||
for (String value : values) {
|
for (String value : values) {
|
||||||
// these are fixed key, variable value custom fields
|
// these are fixed key, variable value custom fields
|
||||||
CustomFieldEntry toAdd = new CustomFieldEntry(eventBus, entry.getKey(),
|
CustomFieldEntry toAdd = new CustomFieldEntry(eventBusPublisherWidget,
|
||||||
value, false);
|
entry.getKey(), value, false);
|
||||||
customFieldEntriesList.add(toAdd);
|
customFieldEntriesList.add(toAdd);
|
||||||
customFields.add(toAdd);
|
customFields.add(toAdd);
|
||||||
|
|
||||||
|
@ -665,7 +684,8 @@ public class UpdateDatasetForm extends Composite {
|
||||||
|
|
||||||
for (String value : values) {
|
for (String value : values) {
|
||||||
// these are fixed key, variable value custom fields
|
// these are fixed key, variable value custom fields
|
||||||
CustomFieldEntry toAdd = new CustomFieldEntry(eventBus, entry.getKey(), value, false);
|
CustomFieldEntry toAdd = new CustomFieldEntry(eventBusPublisherWidget, entry.getKey(), value,
|
||||||
|
false);
|
||||||
customFieldEntriesList.add(toAdd);
|
customFieldEntriesList.add(toAdd);
|
||||||
customFields.add(toAdd);
|
customFields.add(toAdd);
|
||||||
}
|
}
|
||||||
|
@ -897,7 +917,7 @@ public class UpdateDatasetForm extends Composite {
|
||||||
|
|
||||||
MetaDataField fieldWidget;
|
MetaDataField fieldWidget;
|
||||||
try {
|
try {
|
||||||
fieldWidget = new MetaDataField(field, eventBus, operation);
|
fieldWidget = new MetaDataField(field, eventBusPublisherWidget, operation);
|
||||||
metadataFieldsPanel.add(fieldWidget);
|
metadataFieldsPanel.add(fieldWidget);
|
||||||
listOfMetadataFields.add(fieldWidget);
|
listOfMetadataFields.add(fieldWidget);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -921,7 +941,8 @@ public class UpdateDatasetForm extends Composite {
|
||||||
|
|
||||||
MetaDataField fieldWidget;
|
MetaDataField fieldWidget;
|
||||||
try {
|
try {
|
||||||
fieldWidget = new MetaDataField(metadataFieldWrapper, eventBus, operation);
|
fieldWidget = new MetaDataField(metadataFieldWrapper, eventBusPublisherWidget,
|
||||||
|
operation);
|
||||||
cp.addField(fieldWidget);
|
cp.addField(fieldWidget);
|
||||||
listOfMetadataFields.add(fieldWidget);
|
listOfMetadataFields.add(fieldWidget);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -938,7 +959,7 @@ public class UpdateDatasetForm extends Composite {
|
||||||
|
|
||||||
MetaDataField fieldWidget;
|
MetaDataField fieldWidget;
|
||||||
try {
|
try {
|
||||||
fieldWidget = new MetaDataField(field, eventBus, operation);
|
fieldWidget = new MetaDataField(field, eventBusPublisherWidget, operation);
|
||||||
extrasCategory.addField(fieldWidget);
|
extrasCategory.addField(fieldWidget);
|
||||||
listOfMetadataFields.add(fieldWidget);
|
listOfMetadataFields.add(fieldWidget);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -960,7 +981,7 @@ public class UpdateDatasetForm extends Composite {
|
||||||
@UiHandler("addCustomFieldButton")
|
@UiHandler("addCustomFieldButton")
|
||||||
void addCustomFieldEvent(ClickEvent e) {
|
void addCustomFieldEvent(ClickEvent e) {
|
||||||
|
|
||||||
CustomFieldEntry toAdd = new CustomFieldEntry(eventBus, "", "", true);
|
CustomFieldEntry toAdd = new CustomFieldEntry(eventBusPublisherWidget, "", "", true);
|
||||||
customFieldEntriesList.add(toAdd);
|
customFieldEntriesList.add(toAdd);
|
||||||
customFields.add(toAdd);
|
customFields.add(toAdd);
|
||||||
|
|
||||||
|
@ -1336,7 +1357,7 @@ public class UpdateDatasetForm extends Composite {
|
||||||
GWT.log("bindManageResources on dataset: " + theDatasetBean.getCkanName());
|
GWT.log("bindManageResources on dataset: " + theDatasetBean.getCkanName());
|
||||||
|
|
||||||
if (step == 1) {
|
if (step == 1) {
|
||||||
//addResourcesButtonStep1.clear();
|
// addResourcesButtonStep1.clear();
|
||||||
addResourcesButtonStep1.setVisible(true);
|
addResourcesButtonStep1.setVisible(true);
|
||||||
addResourcesButtonStep1.addClickHandler(new ClickHandler() {
|
addResourcesButtonStep1.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@ -1350,7 +1371,7 @@ public class UpdateDatasetForm extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (step == 3) {
|
if (step == 3) {
|
||||||
//addResourcesButtonStep3.clear();
|
// addResourcesButtonStep3.clear();
|
||||||
addResourcesButtonStep3.setVisible(true);
|
addResourcesButtonStep3.setVisible(true);
|
||||||
addResourcesButtonStep3.addClickHandler(new ClickHandler() {
|
addResourcesButtonStep3.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@ -1370,7 +1391,7 @@ public class UpdateDatasetForm extends Composite {
|
||||||
// remove content of the main panel
|
// remove content of the main panel
|
||||||
createDatasetMainPanel.clear();
|
createDatasetMainPanel.clear();
|
||||||
|
|
||||||
ManageResources manageResources = new ManageResources(eventBus, theDatasetBean, datasetUrl);
|
ManageResources manageResources = new ManageResources(eventBusPublisherWidget, theDatasetBean, datasetUrl);
|
||||||
|
|
||||||
// form container
|
// form container
|
||||||
// AddResourceContainer container = new AddResourceContainer(datasetUrl);
|
// AddResourceContainer container = new AddResourceContainer(datasetUrl);
|
||||||
|
|
Loading…
Reference in New Issue