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