bug fixing portlet init on 'gotofolder' action

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@181818 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-09-23 10:07:23 +00:00
parent d6391d5cdb
commit 2e06b91fe1
2 changed files with 9 additions and 7 deletions

View File

@ -5,9 +5,6 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<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="ckan-metadata-publisher-widget-1.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-metadata-publisher-widget-TRUNK/ckan-metadata-publisher-widget-TRUNK">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="workspace-tree-widget-6.27.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree-TRUNK/WorkspaceTree-TRUNK"> <dependent-module archiveName="workspace-tree-widget-6.27.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree-TRUNK/WorkspaceTree-TRUNK">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>

View File

@ -608,7 +608,7 @@ public class AppController implements SubscriberInterface {
loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB
} }
boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId); boolean selected = wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
if(selected) if(selected)
new InfoDisplay("Info", "The searched element was selected"); new InfoDisplay("Info", "The searched element was selected");
@ -1134,8 +1134,9 @@ public class AppController implements SubscriberInterface {
this.wsPortlet = new WorskpacePortlet(instanceWithGrouping); this.wsPortlet = new WorskpacePortlet(instanceWithGrouping);
} }
else{ else{
if(searchParameter!=null && !searchParameter.isEmpty()) if(searchParameter!=null && !searchParameter.isEmpty()) {
isSearch = true; isSearch = true;
}
if(itemIdParameter!=null && !itemIdParameter.isEmpty()){ if(itemIdParameter!=null && !itemIdParameter.isEmpty()){
isSearch = true; isSearch = true;
@ -1173,7 +1174,7 @@ public class AppController implements SubscriberInterface {
dnd.addWorkspaceUploadNotificationListener(listener); dnd.addWorkspaceUploadNotificationListener(listener);
AppControllerExplorer.getEventBus().fireEvent(new LoadTreeEvent(true)); //LOAD THE TREE //AppControllerExplorer.getEventBus().fireEvent(new LoadTreeEvent(true)); //LOAD THE TREE
} }
final boolean searchingForItemId = isSearchForItemId; final boolean searchingForItemId = isSearchForItemId;
@ -1224,6 +1225,7 @@ public class AppController implements SubscriberInterface {
private void initPortlet(final HasWidgets rootPanel, final boolean instanceWithGrouping, boolean isSearchForItemId, final String searchParameter, final String itemIdParameter, final String operationParameter){ private void initPortlet(final HasWidgets rootPanel, final boolean instanceWithGrouping, boolean isSearchForItemId, final String searchParameter, final String itemIdParameter, final String operationParameter){
boolean displayFeatures = readCookieWorkspaceAvailableFeatures(); boolean displayFeatures = readCookieWorkspaceAvailableFeatures();
boolean selectTreeRoot = true;
GWT.log("Display features? "+displayFeatures); GWT.log("Display features? "+displayFeatures);
@ -1243,6 +1245,7 @@ public class AppController implements SubscriberInterface {
//IF IS SEARCH and IS NOT SEARCH FOR ITEM ID - fire event search text //IF IS SEARCH and IS NOT SEARCH FOR ITEM ID - fire event search text
if(searchParameter!=null && !searchParameter.isEmpty() && !isSearchForItemId){ if(searchParameter!=null && !searchParameter.isEmpty() && !isSearchForItemId){
selectTreeRoot = false;
Scheduler.get().scheduleDeferred(new ScheduledCommand() { Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override @Override
public void execute() { public void execute() {
@ -1251,7 +1254,7 @@ public class AppController implements SubscriberInterface {
} }
}); });
} else if(itemIdParameter!=null && !itemIdParameter.isEmpty()){ //SEARCH FOR ITEM ID } else if(itemIdParameter!=null && !itemIdParameter.isEmpty()){ //SEARCH FOR ITEM ID
selectTreeRoot = false;
Scheduler.get().scheduleDeferred(new ScheduledCommand() { Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override @Override
public void execute() { public void execute() {
@ -1277,6 +1280,8 @@ public class AppController implements SubscriberInterface {
updateWorksapaceSize(false); updateWorksapaceSize(false);
} }
}); });
AppControllerExplorer.getEventBus().fireEvent(new LoadTreeEvent(selectTreeRoot)); //LOAD THE TREE
rootPanel.add(wsQuotesView); rootPanel.add(wsQuotesView);
} }