mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to add explicity IDs to all components in Spaces and Content panels in Browse screen so they can be expanded/collapsed. Fix to allow page size of Spaces/Content panels to be changes on the fly
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3097 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -186,10 +186,6 @@ public class BrowseBean implements IContextListener
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dashboard");
|
||||
}
|
||||
else
|
||||
{
|
||||
navigateBrowseScreen();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,8 +202,25 @@ public class BrowseBean implements IContextListener
|
||||
public void setBrowsePageSize(int browsePageSize)
|
||||
{
|
||||
this.browsePageSize = browsePageSize;
|
||||
this.browsePageSizeString = Integer.toString(browsePageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return browsePageSizeString
|
||||
*/
|
||||
public String getBrowsePageSizeString()
|
||||
{
|
||||
return this.browsePageSizeString;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param browsePageSizeString to set
|
||||
*/
|
||||
public void setBrowsePageSizeString(String browsePageSizeString)
|
||||
{
|
||||
this.browsePageSizeString = browsePageSizeString;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the minimum length of a valid search string.
|
||||
*/
|
||||
@@ -489,14 +502,12 @@ public class BrowseBean implements IContextListener
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Browse view page size set to: " + getBrowsePageSize());
|
||||
|
||||
// in case we left for dashboard
|
||||
if (isDashboardView() == true)
|
||||
{
|
||||
setDashboardView(false);
|
||||
}
|
||||
setDashboardView(false);
|
||||
|
||||
// push the view mode into the lists
|
||||
setBrowseViewMode(viewMode);
|
||||
|
||||
navigateBrowseScreen();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1001,6 +1012,31 @@ public class BrowseBean implements IContextListener
|
||||
this.navigator.setCurrentNodeId( this.navigator.getCurrentNodeId() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update page size based on user selection
|
||||
*/
|
||||
public void updatePageSize(ActionEvent event)
|
||||
{
|
||||
try
|
||||
{
|
||||
int size = Integer.parseInt(this.browsePageSizeString);
|
||||
if (size >= 0)
|
||||
{
|
||||
this.browsePageSize = size;
|
||||
}
|
||||
else
|
||||
{
|
||||
// reset to known value if this occurs
|
||||
this.browsePageSizeString = Integer.toString(this.browsePageSize);
|
||||
}
|
||||
}
|
||||
catch (NumberFormatException err)
|
||||
{
|
||||
// reset to known value if this occurs
|
||||
this.browsePageSizeString = Integer.toString(this.browsePageSize);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Action called when a folder space is clicked.
|
||||
* Navigate into the space.
|
||||
@@ -1417,8 +1453,7 @@ public class BrowseBean implements IContextListener
|
||||
getConfigElement(ViewsConfigElement.CONFIG_ELEMENT_ID);
|
||||
|
||||
this.browseViewMode = this.viewsConfig.getDefaultView(PAGE_NAME_BROWSE);
|
||||
this.browsePageSize = this.viewsConfig.getDefaultPageSize(PAGE_NAME_BROWSE,
|
||||
this.browseViewMode);
|
||||
setBrowsePageSize(this.viewsConfig.getDefaultPageSize(PAGE_NAME_BROWSE, this.browseViewMode));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1706,6 +1741,7 @@ public class BrowseBean implements IContextListener
|
||||
|
||||
/** The current browse view page size */
|
||||
private int browsePageSize;
|
||||
private String browsePageSizeString;
|
||||
|
||||
/** True if current space has a dashboard (template) view available */
|
||||
private boolean dashboardView;
|
||||
|
Reference in New Issue
Block a user