improved behaviour on searching stage
This commit is contained in:
parent
474832a663
commit
c8ad962dfe
|
@ -388,6 +388,9 @@ public class GeoportalDataViewer implements EntryPoint {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
GWT.log("Product with id: " + projectID + " found? " + found);
|
GWT.log("Product with id: " + projectID + " found? " + found);
|
||||||
|
|
||||||
|
if (!showDetailsEvent.isEventFromTimeline())
|
||||||
|
timelineMS.hideTimelineProjectRelations();
|
||||||
|
|
||||||
GeoportalDataViewerServiceAsync.Util.getInstance().getProjectViewForId(profileID, projectID,
|
GeoportalDataViewerServiceAsync.Util.getInstance().getProjectViewForId(profileID, projectID,
|
||||||
new AsyncCallback<ProjectView>() {
|
new AsyncCallback<ProjectView>() {
|
||||||
|
|
||||||
|
@ -646,7 +649,8 @@ public class GeoportalDataViewer implements EntryPoint {
|
||||||
String layerName = null;
|
String layerName = null;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
GCubeCollection toOpen = viewerConfig.getAvailableCollections().get(searchPerformedEvent.getProfileID());
|
GCubeCollection toOpen = viewerConfig.getAvailableCollections()
|
||||||
|
.get(searchPerformedEvent.getProfileID());
|
||||||
// Check if indexes is empty
|
// Check if indexes is empty
|
||||||
if (toOpen.getIndexes() == null || toOpen.getIndexes().isEmpty()) {
|
if (toOpen.getIndexes() == null || toOpen.getIndexes().isEmpty()) {
|
||||||
GWT.log("SearchPerformedEvent Unexpected empty indexes in collection " + toOpen);
|
GWT.log("SearchPerformedEvent Unexpected empty indexes in collection " + toOpen);
|
||||||
|
|
|
@ -20,6 +20,7 @@ public class ShowDetailsEvent extends GwtEvent<ShowDetailsEventHandler> {
|
||||||
private String profileID;
|
private String profileID;
|
||||||
private String projectID;
|
private String projectID;
|
||||||
private boolean loadTimelineRelationships;
|
private boolean loadTimelineRelationships;
|
||||||
|
private boolean isEventFromTimeline;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new show details event.
|
* Instantiates a new show details event.
|
||||||
|
@ -54,6 +55,24 @@ public class ShowDetailsEvent extends GwtEvent<ShowDetailsEventHandler> {
|
||||||
this.loadTimelineRelationships = loadTimelineRelationships;
|
this.loadTimelineRelationships = loadTimelineRelationships;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event from timeline.
|
||||||
|
*
|
||||||
|
* @param bool the bool
|
||||||
|
*/
|
||||||
|
public void setEventFromTimeline(boolean bool) {
|
||||||
|
this.isEventFromTimeline = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if is event from timeline.
|
||||||
|
*
|
||||||
|
* @return true, if is event from timeline
|
||||||
|
*/
|
||||||
|
public boolean isEventFromTimeline() {
|
||||||
|
return isEventFromTimeline;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the type.
|
* Gets the type.
|
||||||
*
|
*
|
||||||
|
|
|
@ -61,7 +61,6 @@ public class TimelineManagerStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void hideTimelineProjectRelations() {
|
public void hideTimelineProjectRelations() {
|
||||||
GWT.log("hideTimelineProjectRelations");
|
GWT.log("hideTimelineProjectRelations");
|
||||||
RootPanel.get(GeoportalDataViewer.DIV_TIMELINE_DATA).setVisible(false);
|
RootPanel.get(GeoportalDataViewer.DIV_TIMELINE_DATA).setVisible(false);
|
||||||
|
|
|
@ -144,7 +144,8 @@ public class TimelineRelationPanel extends Composite {
|
||||||
final String theProjectID = references[1];
|
final String theProjectID = references[1];
|
||||||
GeoportalItemReferences gir = new GeoportalItemReferences(theProjectID, thePofileID);
|
GeoportalItemReferences gir = new GeoportalItemReferences(theProjectID, thePofileID);
|
||||||
ShowDetailsEvent showDetailsEvent = new ShowDetailsEvent(gir, null, false);
|
ShowDetailsEvent showDetailsEvent = new ShowDetailsEvent(gir, null, false);
|
||||||
GWT.log("fireEvetn: " + showDetailsEvent);
|
showDetailsEvent.setEventFromTimeline(true);
|
||||||
|
GWT.log("fireEvent: " + showDetailsEvent);
|
||||||
|
|
||||||
applicationBus.fireEvent(showDetailsEvent);
|
applicationBus.fireEvent(showDetailsEvent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue