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="/src/main/java"/>
<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">
<dependency-type>uses</dependency-type>
</dependent-module>

View File

@ -608,7 +608,7 @@ public class AppController implements SubscriberInterface {
loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB
}
boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
boolean selected = wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
if(selected)
new InfoDisplay("Info", "The searched element was selected");
@ -1134,8 +1134,9 @@ public class AppController implements SubscriberInterface {
this.wsPortlet = new WorskpacePortlet(instanceWithGrouping);
}
else{
if(searchParameter!=null && !searchParameter.isEmpty())
if(searchParameter!=null && !searchParameter.isEmpty()) {
isSearch = true;
}
if(itemIdParameter!=null && !itemIdParameter.isEmpty()){
isSearch = true;
@ -1173,7 +1174,7 @@ public class AppController implements SubscriberInterface {
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;
@ -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){
boolean displayFeatures = readCookieWorkspaceAvailableFeatures();
boolean selectTreeRoot = true;
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(searchParameter!=null && !searchParameter.isEmpty() && !isSearchForItemId){
selectTreeRoot = false;
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
@ -1251,7 +1254,7 @@ public class AppController implements SubscriberInterface {
}
});
} else if(itemIdParameter!=null && !itemIdParameter.isEmpty()){ //SEARCH FOR ITEM ID
selectTreeRoot = false;
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
@ -1277,6 +1280,8 @@ public class AppController implements SubscriberInterface {
updateWorksapaceSize(false);
}
});
AppControllerExplorer.getEventBus().fireEvent(new LoadTreeEvent(selectTreeRoot)); //LOAD THE TREE
rootPanel.add(wsQuotesView);
}