added information when resolving shared link
This commit is contained in:
parent
fb7a80bb2f
commit
b86439cba6
|
@ -110,6 +110,7 @@ import com.google.gwt.user.client.Timer;
|
||||||
import com.google.gwt.user.client.Window;
|
import com.google.gwt.user.client.Window;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.gwt.user.client.ui.Anchor;
|
import com.google.gwt.user.client.ui.Anchor;
|
||||||
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
import com.google.gwt.user.client.ui.HTML;
|
||||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||||
import com.google.gwt.user.client.ui.Image;
|
import com.google.gwt.user.client.ui.Image;
|
||||||
|
@ -172,6 +173,8 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
|
|
||||||
private boolean canCreateNewItem = false;
|
private boolean canCreateNewItem = false;
|
||||||
|
|
||||||
|
private GNADataEntryExtendedConfigProfile gNADataEntryPresentationConfig = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the entry point method.
|
* This is the entry point method.
|
||||||
*/
|
*/
|
||||||
|
@ -198,6 +201,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
ConstantsGeoPortalDataEntryApp.ROOT_PANEL_DIV_PORTLET.getElement()
|
ConstantsGeoPortalDataEntryApp.ROOT_PANEL_DIV_PORTLET.getElement()
|
||||||
.addClassName(ConstantsGeoPortalDataEntryApp.CSS_CLASS_ANIMATE_FADE_IN_OUT);
|
.addClassName(ConstantsGeoPortalDataEntryApp.CSS_CLASS_ANIMATE_FADE_IN_OUT);
|
||||||
|
|
||||||
|
// Loads Geoportal init configurations
|
||||||
Command commandGeonaInitConfig = new Command() {
|
Command commandGeonaInitConfig = new Command() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -239,6 +243,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Loads data entry presetentation configurations
|
||||||
Command commandReadDataViewerConfig = new Command() {
|
Command commandReadDataViewerConfig = new Command() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -246,7 +251,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
GWT.log("Execute commandReadDataViewerConfig...");
|
GWT.log("Execute commandReadDataViewerConfig...");
|
||||||
// Loading Geoportal Configurations from IS
|
// Loading Geoportal Configurations from IS
|
||||||
GeoportalDataEntryServiceAsync.Util.getInstance()
|
GeoportalDataEntryServiceAsync.Util.getInstance()
|
||||||
.readDataViewerConfig(new AsyncCallback<GNADataEntryExtendedConfigProfile>() {
|
.readDataEntryPresentationConfig(new AsyncCallback<GNADataEntryExtendedConfigProfile>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
@ -272,6 +277,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
GWT.log(GNADataEntryExtendedConfigProfile.class.getSimpleName() + " loaded: "
|
GWT.log(GNADataEntryExtendedConfigProfile.class.getSimpleName() + " loaded: "
|
||||||
+ gNADataEntryConfig);
|
+ gNADataEntryConfig);
|
||||||
|
|
||||||
|
gNADataEntryPresentationConfig = gNADataEntryConfig;
|
||||||
try {
|
try {
|
||||||
ConstantsGeoPortalDataEntryApp.ROOT_PANEL_DIV_LOADERS.remove(loaderApplication);
|
ConstantsGeoPortalDataEntryApp.ROOT_PANEL_DIV_LOADERS.remove(loaderApplication);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -307,6 +313,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
|
|
||||||
Command commandInitOnItem = null;
|
Command commandInitOnItem = null;
|
||||||
|
|
||||||
|
// Resolves the gid={ITEM_ID}&git={PROFILE_ID}
|
||||||
if (paramGeonaItemType != null && paramGeonaItemID != null) {
|
if (paramGeonaItemType != null && paramGeonaItemID != null) {
|
||||||
|
|
||||||
commandInitOnItem = new Command() {
|
commandInitOnItem = new Command() {
|
||||||
|
@ -327,19 +334,18 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(final ResultDocumentDV result) {
|
public void onSuccess(final ResultDocumentDV result) {
|
||||||
GWT.log("commandInitOnItem success: " + result);
|
GWT.log("commandInitOnItem success: " + result);
|
||||||
Integer attempts = 0;
|
|
||||||
|
|
||||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
appManagerBus.fireEvent(new OperationOnItemEvent<DocumentDV>(
|
|
||||||
Arrays.asList(result), OPERATION_ON_ITEM.VIEW_PROJECT_AS_DOCUMENT));
|
|
||||||
|
|
||||||
|
// appManagerBus.fireEvent(new OperationOnItemEvent<DocumentDV>(
|
||||||
|
// Arrays.asList(result), OPERATION_ON_ITEM.VIEW_PROJECT_AS_DOCUMENT));
|
||||||
|
|
||||||
Timer timer = new Timer() {
|
Timer timer = new Timer() {
|
||||||
int attempts = 0;
|
int attempts = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
attempts++;
|
attempts++;
|
||||||
|
@ -357,22 +363,47 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
|
|
||||||
if (filterUCD.size() == 1) {
|
if (filterUCD.size() == 1) {
|
||||||
GWT.log("FilterUCD");
|
GWT.log("FilterUCD");
|
||||||
|
|
||||||
UseCaseDescriptorDV ucd = filterUCD.get(0);
|
UseCaseDescriptorDV ucd = filterUCD.get(0);
|
||||||
|
|
||||||
ListOfProjectTablePanel listProjectPanel = mainTabPanel.getListOfProjectTablePanel();
|
ListOfProjectTablePanel listProjectPanel = mainTabPanel
|
||||||
|
.getListOfProjectTablePanel();
|
||||||
SearchingFilter searchingFilter = new SearchingFilter();
|
SearchingFilter searchingFilter = new SearchingFilter();
|
||||||
searchingFilter.setGetForIDs(result.getProfileID(), result.getProjectID());
|
searchingFilter.setGetForIDs(result.getProfileID(),
|
||||||
//searchFilter.setConditions(null);
|
result.getProjectID());
|
||||||
//searchFilter.setGetForIDs(result.getProfileID(), result.getProjectID());
|
// searchFilter.setConditions(null);
|
||||||
|
// searchFilter.setGetForIDs(result.getProfileID(),
|
||||||
GetListOfRecordsEvent event = new GetListOfRecordsEvent(true, ucd.getProfileID(),
|
// result.getProjectID());
|
||||||
searchingFilter, true);
|
|
||||||
|
GetListOfRecordsEvent event = new GetListOfRecordsEvent(
|
||||||
listProjectPanel.setSearchTypeAndFire(filterUCD.get(0).getName(), event);
|
true, ucd.getProfileID(), searchingFilter, true);
|
||||||
|
|
||||||
|
listProjectPanel.setSearchTypeAndFire(
|
||||||
|
filterUCD.get(0).getName(), event);
|
||||||
|
|
||||||
|
Modal errorModal = new Modal(true, true);
|
||||||
|
// errorModal.setWidth("800px");
|
||||||
|
errorModal.setCloseVisible(true);
|
||||||
|
errorModal.setTitle("Information...");
|
||||||
|
Image geoportalError = new Image(Images.ICONS.info());
|
||||||
|
geoportalError.setWidth("128px");
|
||||||
|
FlowPanel errorPanelMsg = new FlowPanel();
|
||||||
|
errorPanelMsg.getElement().addClassName("general_info");
|
||||||
|
errorPanelMsg.add(geoportalError);
|
||||||
|
errorPanelMsg.add(new HTML(gNADataEntryPresentationConfig
|
||||||
|
.getDataEntryGUIPresentation().getHeader()
|
||||||
|
.getTitle()));
|
||||||
|
HTML erroMessage = new HTML(
|
||||||
|
"The <span class='general_info_facility'>List of Projects</span> only shows the <br/><br/><b>\""
|
||||||
|
+ result.getFirstEntryOfMap().getValue()
|
||||||
|
+ "\"</b><br/><br/>project resolved by shared link<br/><br/>To view all projects select <span class='general_info_facility'>Reload Projects</span> button");
|
||||||
|
errorPanelMsg.add(erroMessage);
|
||||||
|
errorModal.add(errorPanelMsg);
|
||||||
|
errorModal.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(attempts>30) {
|
if (attempts > 20) {
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -930,7 +961,6 @@ 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);
|
||||||
|
|
||||||
|
|
||||||
// Searching in the cache if the list of relationship definition is present
|
// Searching in the cache if the list of relationship definition is present
|
||||||
List<RelationshipDefinitionDV> listRelationshipsDef = geoportalCaches
|
List<RelationshipDefinitionDV> listRelationshipsDef = geoportalCaches
|
||||||
|
@ -956,8 +986,8 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(searchingFilter == null ) {
|
if (searchingFilter == null) {
|
||||||
searchingFilter = mainTabPanel.getCurrentProjectsSearchingFilter();
|
searchingFilter = mainTabPanel.getCurrentProjectsSearchingFilter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ public interface GeoportalDataEntryService extends RemoteService {
|
||||||
* @return the GNA data entry ext config profile
|
* @return the GNA data entry ext config profile
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
GNADataEntryExtendedConfigProfile readDataViewerConfig() throws Exception;
|
GNADataEntryExtendedConfigProfile readDataEntryPresentationConfig() throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the list use case descriptors.
|
* Gets the list use case descriptors.
|
||||||
|
|
|
@ -70,7 +70,7 @@ public interface GeoportalDataEntryServiceAsync {
|
||||||
|
|
||||||
void updateRecord(String profileID, String projectID, String jsonUpdate, AsyncCallback<ProjectDV> callback);
|
void updateRecord(String profileID, String projectID, String jsonUpdate, AsyncCallback<ProjectDV> callback);
|
||||||
|
|
||||||
void readDataViewerConfig(AsyncCallback<GNADataEntryExtendedConfigProfile> asyncCallback);
|
void readDataEntryPresentationConfig(AsyncCallback<GNADataEntryExtendedConfigProfile> asyncCallback);
|
||||||
|
|
||||||
void getListUseCaseDescriptors(List<String> handlersIds, AsyncCallback<List<UseCaseDescriptorDV>> callback);
|
void getListUseCaseDescriptors(List<String> handlersIds, AsyncCallback<List<UseCaseDescriptorDV>> callback);
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,7 @@ public interface Images extends ClientBundle {
|
||||||
|
|
||||||
@Source("one-finger-icon.png")
|
@Source("one-finger-icon.png")
|
||||||
ImageResource oneFingerIcon();
|
ImageResource oneFingerIcon();
|
||||||
|
|
||||||
|
@Source("information_icon.png")
|
||||||
|
ImageResource info();
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -1088,7 +1088,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public GNADataEntryExtendedConfigProfile readDataViewerConfig() throws Exception {
|
public GNADataEntryExtendedConfigProfile readDataEntryPresentationConfig() throws Exception {
|
||||||
LOG.info("readDataViewerConfig called");
|
LOG.info("readDataViewerConfig called");
|
||||||
|
|
||||||
GCubeUser user = null;
|
GCubeUser user = null;
|
||||||
|
|
|
@ -315,4 +315,21 @@ h1 {
|
||||||
font-size: 12px !important;
|
font-size: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** END OVERRDING legend-style into 'metadata-profile-form-builder-widget' */
|
/** END OVERRDING legend-style into 'metadata-profile-form-builder-widget' */
|
||||||
|
|
||||||
|
|
||||||
|
.general_info {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_info div {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_info_facility {
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #3e6eac;
|
||||||
|
font-family: Helvetica, Arial;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue