From 6de99eb7a799965b6bbc7745258318afabb2bab8 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Mon, 9 Nov 2020 15:44:07 +0100 Subject: [PATCH] Bug fixes #20092 --- .classpath | 4 +- .settings/org.eclipse.wst.common.component | 136 ++---------------- ....eclipse.wst.common.project.facet.core.xml | 2 +- CHANGELOG.md | 9 +- pom.xml | 2 +- .../client/GeoPortalDataEntryApp.java | 2 +- .../client/ui/card/MetadataFormCard.java | 13 +- 7 files changed, 34 insertions(+), 134 deletions(-) diff --git a/.classpath b/.classpath index 9de8301..d34fd2d 100644 --- a/.classpath +++ b/.classpath @@ -6,7 +6,7 @@ - + @@ -35,5 +35,5 @@ - + diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index d895209..a54565a 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,129 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + uses + - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index d5270ce..1727216 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -3,5 +3,5 @@ - + diff --git a/CHANGELOG.md b/CHANGELOG.md index d51a196..8a6da95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,14 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v1.0.1-SNAPSHOT] - 2020-11-04 +## [v1.0.2-SNAPSHOT] - 2020-11-09 + +#### Bug fixes + +[#20092] Repeatible form: validate the card after the create event is fired + + +## [v1.0.1] - 2020-11-04 #### Bug fixes diff --git a/pom.xml b/pom.xml index 447df2e..f342e6a 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.gcube.portlets.user geoportal-data-entry-app war - 1.0.1-SNAPSHOT + 1.0.2-SNAPSHOT GeoPortal Data Entry App The GeoPortal Data Entry App is an application to build the web forms for data entries needed to GeoNa project diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java index ba49642..3929c42 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/GeoPortalDataEntryApp.java @@ -127,7 +127,7 @@ public class GeoPortalDataEntryApp implements EntryPoint { for (GeoNaFormCardModel geonaForm : orderedCards) { //TODO TO TEST - //if(geonaForm.getFormCardTitle().equals(ConcessioniFormCardTitle.RELAZIONE_DI_SCAVO)){ + //if(geonaForm.getFormCardTitle().equals(ConcessioniFormCardTitle.IMMAGINI_RAPPRESENTATIVE)){ CreateMetadataForm baseForm = new CreateMetadataForm(Arrays.asList(geonaForm.getMetadataProfileBean()),appManagerBus); geonaForm.setMetadataForm(baseForm); diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/card/MetadataFormCard.java b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/card/MetadataFormCard.java index ca9d64c..4ce7777 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/card/MetadataFormCard.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/card/MetadataFormCard.java @@ -10,6 +10,7 @@ import org.gcube.portlets.widgets.mpformbuilder.shared.GenericDatasetBean; import com.github.gwtbootstrap.client.ui.Button; import com.github.gwtbootstrap.client.ui.Tab; import com.github.gwtbootstrap.client.ui.constants.IconType; +import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.shared.HandlerManager; @@ -109,7 +110,7 @@ public class MetadataFormCard { this.appManagerBus = appManagerBus; this.repeatible = geonaFormModel.getFormCardTitle().isInternalRepeatibleForm(); this.buildCard(geonaFormModel.getMetadataForm()); - geonaFormModel.getMetadataForm().addListener(formCardEventHandler); + //geonaFormModel.getMetadataForm().addListener(formCardEventHandler); } /** @@ -128,6 +129,7 @@ public class MetadataFormCard { @Override public void onClick(ClickEvent event) { CreateMetadataForm newForm = new CreateMetadataForm(createMetadataForm.getMetadataProfiles(),appManagerBus); + //newForm.addListener(formCardEventHandler); addNewForm(newForm); //newForm.getCreateButton().setFocus(true); } @@ -162,6 +164,8 @@ public class MetadataFormCard { } }); } + + newForm.addListener(formCardEventHandler); } /** @@ -190,8 +194,11 @@ public class MetadataFormCard { */ public boolean validateForm() { for (CreateMetadataForm createMetadataForm : listForms) { - if(!createMetadataForm.isFormDataValid()) + boolean isFormDataValid = createMetadataForm.isFormDataValid(); + GWT.log("Is form data valid: "+isFormDataValid); + if(!isFormDataValid) { return false; + } } return true; } @@ -209,6 +216,7 @@ public class MetadataFormCard { } else { tab.setIcon(IconType.MINUS_SIGN); + tab.asWidget().getElement().removeClassName("green-text"); tab.asWidget().getElement().addClassName("red-text"); } @@ -226,6 +234,7 @@ public class MetadataFormCard { } else { tab.setIcon(IconType.MINUS_SIGN); + tab.asWidget().getElement().removeClassName("red-text"); tab.asWidget().getElement().addClassName("red-text"); } }