added construtor to no folder selectable

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@174477 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-11-29 16:25:41 +00:00
parent ca4c6e626a
commit 98d96f545c
5 changed files with 14 additions and 3 deletions

View File

@ -29,6 +29,8 @@ public class WorkspaceExplorerConstants {
public static final String WORKSPACE_FOLDER_EMPTY_MESSAGE = "This folder is empty";
public static final String NO_FOLDER = "No folder";
// DIALOGS
public static final String SAVE = "Save";
public static final String MAX_HEIGHT_DIALOG = "500px";

View File

@ -149,6 +149,7 @@ public class WorkspaceResourcesExplorerPanel extends DockPanel implements HasWor
itemsType[2] = ItemType.SHARED_FOLDER;
itemsType[3] = ItemType.VRE_FOLDER;
initExplorer(folderId, "", itemsType, itemsType, null, null, false, null);
wsExplorer.getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
}else{
initExplorer(folderId, "", ItemType.values(), ItemType.values(), null, null, false, null);
}
@ -172,6 +173,7 @@ public class WorkspaceResourcesExplorerPanel extends DockPanel implements HasWor
itemsType[2] = ItemType.SHARED_FOLDER;
itemsType[3] = ItemType.VRE_FOLDER;
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, false, null);
wsExplorer.getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
}else{
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, false, null);
}
@ -197,6 +199,7 @@ public class WorkspaceResourcesExplorerPanel extends DockPanel implements HasWor
itemsType[2] = ItemType.SHARED_FOLDER;
itemsType[3] = ItemType.VRE_FOLDER;
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, showGcubeInfo, sortByColumn);
wsExplorer.getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
}else{
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, showGcubeInfo, sortByColumn);
}
@ -224,6 +227,7 @@ public class WorkspaceResourcesExplorerPanel extends DockPanel implements HasWor
itemsType[2] = ItemType.SHARED_FOLDER;
itemsType[3] = ItemType.VRE_FOLDER;
initExplorer(folderId, "", itemsType, itemsType, showProperties, filter, showGcubeInfo, sortByColumn, displayFields);
wsExplorer.getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
}else{
initExplorer(folderId, "", ItemType.values(), ItemType.values(), showProperties, filter, showGcubeInfo, sortByColumn, displayFields);
}

View File

@ -41,6 +41,10 @@ import com.google.gwt.user.client.Event;
*/
public class WorkspaceExplorerSelectDialog extends Modal implements HasWorskpaceExplorerSelectNotificationListener{
/**
*
*/
private Button selectButton;
private WorkspaceExplorerSelectDialog INSTANCE = this;
private boolean isSelect = false;
@ -265,7 +269,7 @@ public class WorkspaceExplorerSelectDialog extends Modal implements HasWorskpace
private void customizeEmptyMessage(boolean showOnlyFolders){
//AFTER THE INIT I'M CHANGING THE MESSAGE IN CASE OF ONLY FOLDER ARE SHWOWN
if(showOnlyFolders)
controller.getWsExplorer().getItTables().setEmptyTableMessage("No folder selectable here");
controller.getWsExplorer().getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
}
/**

View File

@ -138,6 +138,7 @@ public class WorkspaceExplorerSelectPanel extends ScrollPanel implements HasWors
setSelectableTypes(itemsType);
setShowableTypes(itemsType);
}
loadExplorer(captionTxt, null);
customizeEmptyMessage(showOnlyFolders);
}
@ -169,7 +170,7 @@ public class WorkspaceExplorerSelectPanel extends ScrollPanel implements HasWors
private void customizeEmptyMessage(boolean showOnlyFolders){
//AFTER THE INIT I'M CHANGING THE MESSAGE IN CASE OF ONLY FOLDER ARE SHWOWN
if(showOnlyFolders)
controller.getWsExplorer().getItTables().setEmptyTableMessage("No folder selectable here");
controller.getWsExplorer().getItTables().setEmptyTableMessage(WorkspaceExplorerConstants.NO_FOLDER);
}
/**

View File

@ -490,7 +490,7 @@ public class ItemsTable<T extends Item> extends AbstractItemsCellTable<T> implem
* @param msg the new empty table message
*/
public void setEmptyTableMessage(String msg){
msg = msg!=null&&!msg.isEmpty()?msg:WorkspaceExplorerConstants.WORKSPACE_FOLDER_EMPTY_MESSAGE;
msg = msg!=null?msg:WorkspaceExplorerConstants.WORKSPACE_FOLDER_EMPTY_MESSAGE;
if(sortedCellTable!=null)
sortedCellTable.setEmptyTableWidget(new Label(msg));
}