Fixing. AVOIDING CACHING OF GeoNaFormCardModel. Reloading profiles from
server
This commit is contained in:
parent
96955abaea
commit
38660a489a
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,7 +60,9 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="geoportal-data-entry-app-3.0.0-SNAPSHOT">
|
<wb-module deploy-name="geoportal-data-entry-app-3.0.0-SNAPSHOT">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,7 +121,9 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,7 +182,9 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -235,7 +243,9 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +256,12 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
<dependent-module archiveName="geoportal-data-common-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -305,7 +320,9 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="geoportal-data-entry-app"/>
|
<property name="context-root" value="geoportal-data-entry-app"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -364,7 +381,9 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -423,7 +442,9 @@
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -352,25 +352,9 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
mainTabPanel.initMainAccordingToListUseCaseDescriptors(listUCDescriptors);
|
mainTabPanel.initMainAccordingToListUseCaseDescriptors(listUCDescriptors);
|
||||||
|
|
||||||
for (final UseCaseDescriptorDV ucdDV : listUCDescriptors) {
|
for (final UseCaseDescriptorDV ucdDV : listUCDescriptors) {
|
||||||
|
|
||||||
// List<ConfigurationDV<?>> listConfigurations = geoportalCaches
|
|
||||||
// .getHandlerConfigurationsForProfileId(ucdDV.getProfileID());
|
|
||||||
//
|
|
||||||
// if (listConfigurations == null) {
|
|
||||||
// listConfigurations = new ArrayList<ConfigurationDV<?>>();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// for (HandlerDeclarationDV handler : ucdDV.getHandlers()) {
|
|
||||||
// ConfigurationDV<?> config = handler.getConfiguration();
|
|
||||||
// listConfigurations.add(config);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// geoportalCaches.putHandlerConfigurationsForProfileId(ucdDV.getProfileID(), listConfigurations);
|
|
||||||
geoportalCaches.putUCDForProfileId(ucdDV.getProfileID(), ucdDV);
|
geoportalCaches.putUCDForProfileId(ucdDV.getProfileID(), ucdDV);
|
||||||
}
|
}
|
||||||
|
|
||||||
//geoportalCaches.printCacheHandlerConfigurations();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -402,17 +386,19 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
mainTabPanel.setLoaderVisible("Loading...", true);
|
mainTabPanel.setLoaderVisible("Loading...", true);
|
||||||
// orderedCards.clear();
|
// orderedCards.clear();
|
||||||
resetUI();
|
resetUI();
|
||||||
|
|
||||||
List<GeoNaFormCardModel> cardsPerIT = geoportalCaches
|
|
||||||
.getGcubeProfilePerItemType(handlerDeclarationDV.getItemType());
|
|
||||||
mainTabPanel.setPageHeader(handlerDeclarationDV);
|
mainTabPanel.setPageHeader(handlerDeclarationDV);
|
||||||
|
|
||||||
if (cardsPerIT != null) {
|
//TODO AVOIDING THE CACHE
|
||||||
GWT.log("Profiles/Cards per Item Type are: " + cardsPerIT);
|
//TODO I NEED TO CHECK WHY THE BY USING THE CACHE THE WEB-FORM IS FULL (EQUAL TO PREVIOUS ONE) AND NOT RESET PERFORMED
|
||||||
// orderedCards.addAll(cardsPerIT);
|
|
||||||
buildNewCards(profileID, handlerDeclarationDV.getItemType(), new ArrayList<GeoNaFormCardModel>(cardsPerIT));
|
|
||||||
return;
|
// List<GeoNaFormCardModel> cardsPerIT = geoportalCaches.getGcubeProfilePerItemType(handlerDeclarationDV.getItemType());
|
||||||
}
|
// if (cardsPerIT != null) {
|
||||||
|
// GWT.log("Profiles/Cards per Item Type are: " + cardsPerIT);
|
||||||
|
// // orderedCards.addAll(cardsPerIT);
|
||||||
|
// buildNewCards(profileID, handlerDeclarationDV.getItemType(), new ArrayList<GeoNaFormCardModel>(cardsPerIT));
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
numberOfCards = 0;
|
numberOfCards = 0;
|
||||||
expectedCards = listGPs.size();
|
expectedCards = listGPs.size();
|
||||||
|
@ -451,11 +437,12 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
// ordered values
|
// ordered values
|
||||||
Collection<GeoNaFormCardModel> gnaCardsModels = treemapOrderedGNAProfiles.values();
|
Collection<GeoNaFormCardModel> gnaCardsModels = treemapOrderedGNAProfiles.values();
|
||||||
GWT.log("TreeMap values: " + gnaCardsModels);
|
GWT.log("TreeMap values: " + gnaCardsModels);
|
||||||
|
List<GeoNaFormCardModel> listGNAFormCardModel = new ArrayList<GeoNaFormCardModel>(gnaCardsModels);
|
||||||
geoportalCaches.putGcubeProfilePerItemType(handlerDeclarationDV.getItemType(),
|
geoportalCaches.putGcubeProfilePerItemType(handlerDeclarationDV.getItemType(),
|
||||||
new ArrayList<GeoNaFormCardModel>(gnaCardsModels));
|
listGNAFormCardModel);
|
||||||
// orderedCards.addAll(new ArrayList<GeoNaFormCardModel>(gnaCardsModels));
|
// orderedCards.addAll(new ArrayList<GeoNaFormCardModel>(gnaCardsModels));
|
||||||
buildNewCards(profileID, handlerDeclarationDV.getItemType(),
|
buildNewCards(profileID, handlerDeclarationDV.getItemType(),
|
||||||
new ArrayList<GeoNaFormCardModel>(gnaCardsModels));
|
listGNAFormCardModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,6 +493,8 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
mainTabPanel.setLoaderVisible("Loading...", true);
|
mainTabPanel.setLoaderVisible("Loading...", true);
|
||||||
geoNaMainForm.setVisibleFormActions(true);
|
geoNaMainForm.setVisibleFormActions(true);
|
||||||
resetUI();
|
resetUI();
|
||||||
|
//geoNaMainForm.removeTree(treeItemPanel);
|
||||||
|
|
||||||
geoNaMainForm.enableButtonSave(true);
|
geoNaMainForm.enableButtonSave(true);
|
||||||
mainTabPanel.setLoaderVisible("", false);
|
mainTabPanel.setLoaderVisible("", false);
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class GeonaDataEntryMainForm extends Composite {
|
||||||
try {
|
try {
|
||||||
treePanel.remove(treeItemPanel.getTree());
|
treePanel.remove(treeItemPanel.getTree());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
GWT.log("error: "+e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,12 @@ public class GeonaDataEntryMainForm extends Composite {
|
||||||
mapForms.clear();
|
mapForms.clear();
|
||||||
// mainHTMLPanel.clear();
|
// mainHTMLPanel.clear();
|
||||||
inputPanel.clear();
|
inputPanel.clear();
|
||||||
|
//inputPanel = new ScrollPanel();
|
||||||
|
//removeTree(treeItemPanel);
|
||||||
treePanel.clear();
|
treePanel.clear();
|
||||||
|
alertFormAction.clear();
|
||||||
|
alertFormAction.setVisible(false);
|
||||||
|
//treePanel = new ScrollPanel();
|
||||||
// treePanel = new ScrollPanel();
|
// treePanel = new ScrollPanel();
|
||||||
// listTabs.clear();
|
// listTabs.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue