mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Big honkin' merge from head. Sheesh!
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3617 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -42,7 +42,7 @@ import org.dom4j.io.XMLWriter;
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
final class PageConfig
|
||||
public final class PageConfig
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(DashboardManager.class);
|
||||
|
||||
@@ -55,7 +55,7 @@ final class PageConfig
|
||||
private static final String ATTR_REFID = "idref";
|
||||
|
||||
private List<Page> pages = new ArrayList<Page>(4);
|
||||
private int currentPageIndex = 0;
|
||||
private Page currentPage = null;
|
||||
|
||||
|
||||
/**
|
||||
@@ -86,13 +86,30 @@ final class PageConfig
|
||||
*/
|
||||
public Page getCurrentPage()
|
||||
{
|
||||
if (currentPageIndex < pages.size())
|
||||
if (this.currentPage == null)
|
||||
{
|
||||
return pages.get(currentPageIndex);
|
||||
if (this.pages.size() != 0)
|
||||
{
|
||||
this.currentPage = pages.get(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
return this.currentPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current Page for the cnfig
|
||||
*
|
||||
* @param pageId ID of the page to set as current
|
||||
*/
|
||||
public void setCurrentPage(String pageId)
|
||||
{
|
||||
for (Page page : pages)
|
||||
{
|
||||
return null;
|
||||
if (page.getId().equals(pageId))
|
||||
{
|
||||
this.currentPage = page;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user