edit_facility_26115 #3
|
@ -1,5 +1,5 @@
|
||||||
package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CustomFieldEntry;
|
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CustomFieldEntryProfile;
|
||||||
|
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
|
||||||
|
@ -10,13 +10,13 @@ import com.google.gwt.event.shared.GwtEvent;
|
||||||
public class DeleteCustomFieldEvent extends GwtEvent<DeleteCustomFieldEventHandler> {
|
public class DeleteCustomFieldEvent extends GwtEvent<DeleteCustomFieldEventHandler> {
|
||||||
public static Type<DeleteCustomFieldEventHandler> TYPE = new Type<DeleteCustomFieldEventHandler>();
|
public static Type<DeleteCustomFieldEventHandler> TYPE = new Type<DeleteCustomFieldEventHandler>();
|
||||||
|
|
||||||
private CustomFieldEntry removedEntry;
|
private CustomFieldEntryProfile removedEntry;
|
||||||
|
|
||||||
public DeleteCustomFieldEvent(CustomFieldEntry removedEntry) {
|
public DeleteCustomFieldEvent(CustomFieldEntryProfile removedEntry) {
|
||||||
this.removedEntry = removedEntry;
|
this.removedEntry = removedEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CustomFieldEntry getRemovedEntry() {
|
public CustomFieldEntryProfile getRemovedEntry() {
|
||||||
return removedEntry;
|
return removedEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
//import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteCustomFieldEventHandler;
|
//import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteCustomFieldEventHandler;
|
||||||
//import org.gcube.portlets.widgets.mpformbuilder.client.form.MetaDataField;
|
//import org.gcube.portlets.widgets.mpformbuilder.client.form.MetaDataField;
|
||||||
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CategoryPanel;
|
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CategoryPanel;
|
||||||
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CustomFieldEntry;
|
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CustomFieldEntryProfile;
|
||||||
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.MetaDataFieldSkeleton;
|
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.MetaDataFieldSkeleton;
|
||||||
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.resources.AddResourceContainer;
|
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.resources.AddResourceContainer;
|
||||||
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.resources.AddResourceToDataset;
|
//import org.gcube.portlets.widgets.mpformbuilder.client.ui.resources.AddResourceToDataset;
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
// private HandlerManager eventBus;
|
// private HandlerManager eventBus;
|
||||||
//
|
//
|
||||||
// // added custom field entries (by the user)
|
// // added custom field entries (by the user)
|
||||||
// private List<CustomFieldEntry> customFieldEntriesList = new ArrayList<CustomFieldEntry>();
|
// private List<CustomFieldEntryProfile> customFieldEntriesList = new ArrayList<CustomFieldEntryProfile>();
|
||||||
//
|
//
|
||||||
// // the list of MetaDataField added
|
// // the list of MetaDataField added
|
||||||
// private List<MetaDataField> listOfMetadataFields = new ArrayList<MetaDataField>();
|
// private List<MetaDataField> listOfMetadataFields = new ArrayList<MetaDataField>();
|
||||||
|
@ -342,7 +342,7 @@
|
||||||
//
|
//
|
||||||
// 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);
|
// CustomFieldEntryProfile toAdd = new CustomFieldEntryProfile(eventBus, entry.getKey(), value, false);
|
||||||
// customFieldEntriesList.add(toAdd);
|
// customFieldEntriesList.add(toAdd);
|
||||||
// customFields.add(toAdd);
|
// customFields.add(toAdd);
|
||||||
//
|
//
|
||||||
|
@ -796,7 +796,7 @@
|
||||||
// @UiHandler("addCustomFieldButton")
|
// @UiHandler("addCustomFieldButton")
|
||||||
// void addCustomFieldEvent(ClickEvent e){
|
// void addCustomFieldEvent(ClickEvent e){
|
||||||
//
|
//
|
||||||
// CustomFieldEntry toAdd = new CustomFieldEntry(eventBus, "", "", true);
|
// CustomFieldEntryProfile toAdd = new CustomFieldEntryProfile(eventBus, "", "", true);
|
||||||
// customFieldEntriesList.add(toAdd);
|
// customFieldEntriesList.add(toAdd);
|
||||||
// customFields.add(toAdd);
|
// customFields.add(toAdd);
|
||||||
//
|
//
|
||||||
|
@ -993,7 +993,7 @@
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// for(CustomFieldEntry customEntry : customFieldEntriesList){
|
// for(CustomFieldEntryProfile customEntry : customFieldEntriesList){
|
||||||
// String key = customEntry.getKey();
|
// String key = customEntry.getKey();
|
||||||
// String value = customEntry.getValue();
|
// String value = customEntry.getValue();
|
||||||
// if(value != null && !value.isEmpty()){
|
// if(value != null && !value.isEmpty()){
|
||||||
|
@ -1454,7 +1454,7 @@
|
||||||
// groupsListbox.setItemSelected(i, false);
|
// groupsListbox.setItemSelected(i, false);
|
||||||
//
|
//
|
||||||
// // delete custom fields
|
// // delete custom fields
|
||||||
// for (CustomFieldEntry customField : customFieldEntriesList) {
|
// for (CustomFieldEntryProfile customField : customFieldEntriesList) {
|
||||||
// customField.removeFromParent();
|
// customField.removeFromParent();
|
||||||
// }
|
// }
|
||||||
// customFieldEntriesList.clear();
|
// customFieldEntriesList.clear();
|
||||||
|
@ -1478,7 +1478,7 @@
|
||||||
// metadataTypeListbox.setEnabled(false);
|
// metadataTypeListbox.setEnabled(false);
|
||||||
// groupsListbox.setEnabled(false);
|
// groupsListbox.setEnabled(false);
|
||||||
//
|
//
|
||||||
// for(CustomFieldEntry ce: customFieldEntriesList)
|
// for(CustomFieldEntryProfile ce: customFieldEntriesList)
|
||||||
// ce.freeze();
|
// ce.freeze();
|
||||||
//
|
//
|
||||||
// // disable profile fields
|
// // disable profile fields
|
||||||
|
|
|
@ -16,7 +16,7 @@ import org.gcube.portlets.widgets.mpformbuilder.client.form.MetaDataField;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.form.generic.GenericFormEvents.GenericFormEventsListener;
|
import org.gcube.portlets.widgets.mpformbuilder.client.form.generic.GenericFormEvents.GenericFormEventsListener;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.form.generic.GenericFormEvents.HasGenericFormListenerRegistration;
|
import org.gcube.portlets.widgets.mpformbuilder.client.form.generic.GenericFormEvents.HasGenericFormListenerRegistration;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CategoryPanel;
|
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CategoryPanel;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CustomFieldEntry;
|
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.CustomFieldEntryProfile;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.MetaDataFieldSkeleton;
|
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.MetaDataFieldSkeleton;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.resources.AddResourceToDataset;
|
import org.gcube.portlets.widgets.mpformbuilder.client.ui.resources.AddResourceToDataset;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.twincolumnselection.TwinColumnSelectionMainPanel;
|
import org.gcube.portlets.widgets.mpformbuilder.client.ui.twincolumnselection.TwinColumnSelectionMainPanel;
|
||||||
|
@ -205,9 +205,6 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
|
||||||
/** The Constant TRYING_TO_CREATE_PRODUCT. */
|
/** The Constant TRYING_TO_CREATE_PRODUCT. */
|
||||||
private static final String DATA_FORM_FILLED_IN_CORRECTLY = "Very well!!! Data form filled in correclty!";
|
private static final String DATA_FORM_FILLED_IN_CORRECTLY = "Very well!!! Data form filled in correclty!";
|
||||||
|
|
||||||
/** The Constant MISSING_PUBLISH_RIGHTS. */
|
|
||||||
protected static final String MISSING_PUBLISH_RIGHTS = "It seems you are not authorized to publish on catalogue. Request it to the VRE manager or the portal administrator.";
|
|
||||||
|
|
||||||
/** The tab panel. */
|
/** The tab panel. */
|
||||||
// tab panel
|
// tab panel
|
||||||
private TabPanel tabPanel;
|
private TabPanel tabPanel;
|
||||||
|
@ -228,7 +225,7 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
|
||||||
|
|
||||||
/** The custom field entries list. */
|
/** The custom field entries list. */
|
||||||
// added custom field entries (by the user)
|
// added custom field entries (by the user)
|
||||||
private List<CustomFieldEntry> customFieldEntriesList = new ArrayList<CustomFieldEntry>();
|
private List<CustomFieldEntryProfile> customFieldEntriesList = new ArrayList<CustomFieldEntryProfile>();
|
||||||
|
|
||||||
/** The list of metadata fields. */
|
/** The list of metadata fields. */
|
||||||
// the list of MetaDataField added
|
// the list of MetaDataField added
|
||||||
|
@ -611,7 +608,7 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
|
||||||
@UiHandler("addCustomFieldButton")
|
@UiHandler("addCustomFieldButton")
|
||||||
void addCustomFieldEvent(ClickEvent e) {
|
void addCustomFieldEvent(ClickEvent e) {
|
||||||
|
|
||||||
CustomFieldEntry toAdd = new CustomFieldEntry(uiBus, "", "", true);
|
CustomFieldEntryProfile toAdd = new CustomFieldEntryProfile(uiBus, "", "", true);
|
||||||
customFieldEntriesList.add(toAdd);
|
customFieldEntriesList.add(toAdd);
|
||||||
customFields.add(toAdd);
|
customFields.add(toAdd);
|
||||||
|
|
||||||
|
@ -686,7 +683,7 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (CustomFieldEntry customEntry : customFieldEntriesList) {
|
for (CustomFieldEntryProfile customEntry : customFieldEntriesList) {
|
||||||
String key = customEntry.getKey();
|
String key = customEntry.getKey();
|
||||||
String value = customEntry.getValue();
|
String value = customEntry.getValue();
|
||||||
if (value != null && !value.isEmpty()) {
|
if (value != null && !value.isEmpty()) {
|
||||||
|
@ -856,7 +853,7 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
|
||||||
/*
|
/*
|
||||||
* @UiHandler("resetButton") void resetFormEvent(ClickEvent e){
|
* @UiHandler("resetButton") void resetFormEvent(ClickEvent e){
|
||||||
*
|
*
|
||||||
* // delete custom fields for (CustomFieldEntry customField :
|
* // delete custom fields for (CustomFieldEntryProfile customField :
|
||||||
* customFieldEntriesList) { customField.removeFromParent(); }
|
* customFieldEntriesList) { customField.removeFromParent(); }
|
||||||
* customFieldEntriesList.clear(); }
|
* customFieldEntriesList.clear(); }
|
||||||
*/
|
*/
|
||||||
|
@ -871,7 +868,7 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
|
||||||
addCustomFieldButton.setEnabled(!bool);
|
addCustomFieldButton.setEnabled(!bool);
|
||||||
metadataTypeListbox.setEnabled(!bool);
|
metadataTypeListbox.setEnabled(!bool);
|
||||||
|
|
||||||
for (CustomFieldEntry ce : customFieldEntriesList)
|
for (CustomFieldEntryProfile ce : customFieldEntriesList)
|
||||||
ce.freeze(!bool);
|
ce.freeze(!bool);
|
||||||
|
|
||||||
// disable profile fields
|
// disable profile fields
|
||||||
|
|
|
@ -18,13 +18,13 @@ import com.google.gwt.user.client.ui.Widget;
|
||||||
* A custom field entry that has two textboxes, one for the key value and the other for the value.
|
* A custom field entry that has two textboxes, one for the key value and the other for the value.
|
||||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||||
*/
|
*/
|
||||||
public class CustomFieldEntry extends Composite {
|
public class CustomFieldEntryProfile extends Composite {
|
||||||
|
|
||||||
private static CustomFieldEntryUiBinder uiBinder = GWT
|
private static CustomFieldEntryUiBinder uiBinder = GWT
|
||||||
.create(CustomFieldEntryUiBinder.class);
|
.create(CustomFieldEntryUiBinder.class);
|
||||||
|
|
||||||
interface CustomFieldEntryUiBinder extends
|
interface CustomFieldEntryUiBinder extends
|
||||||
UiBinder<Widget, CustomFieldEntry> {
|
UiBinder<Widget, CustomFieldEntryProfile> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@UiField InputAddOn keyFieldPrepend;
|
@UiField InputAddOn keyFieldPrepend;
|
||||||
|
@ -39,7 +39,7 @@ public class CustomFieldEntry extends Composite {
|
||||||
// event bus
|
// event bus
|
||||||
private HandlerManager eventBus;
|
private HandlerManager eventBus;
|
||||||
|
|
||||||
public CustomFieldEntry(HandlerManager eventBus, String key, String value, boolean isCustomCreatedByUser) {
|
public CustomFieldEntryProfile(HandlerManager eventBus, String key, String value, boolean isCustomCreatedByUser) {
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
||||||
|
|
||||||
// save information
|
// save information
|
Loading…
Reference in New Issue