mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V1.3 to HEAD (3064:3067)
svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3064 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3067 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3341 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -95,6 +95,24 @@ public class CreateSpaceWizard extends BaseWizardBean
|
|||||||
this.saveAsTemplate = false;
|
this.saveAsTemplate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String next()
|
||||||
|
{
|
||||||
|
// if the user has chosen to create the space from an existing
|
||||||
|
// space or from a template we need to find it's type to show
|
||||||
|
// the current set of icons.
|
||||||
|
if (this.createFrom.equals("existing") && this.existingSpaceId != null)
|
||||||
|
{
|
||||||
|
this.spaceType = this.nodeService.getType(this.existingSpaceId).toString();
|
||||||
|
}
|
||||||
|
else if (this.createFrom.equals("template") && this.templateSpaceId != null)
|
||||||
|
{
|
||||||
|
NodeRef templateNode = new NodeRef(Repository.getStoreRef(), this.templateSpaceId);
|
||||||
|
this.spaceType = this.nodeService.getType(templateNode).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||||
{
|
{
|
||||||
@@ -611,6 +629,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
|||||||
// which the user can change during the advanced space wizard
|
// which the user can change during the advanced space wizard
|
||||||
|
|
||||||
List<UIListItem> icons = null;
|
List<UIListItem> icons = null;
|
||||||
|
List<String> iconNames = new ArrayList<String>(8);
|
||||||
|
|
||||||
QName type = QName.createQName(this.spaceType);
|
QName type = QName.createQName(this.spaceType);
|
||||||
String typePrefixForm = type.toPrefixString(this.namespaceService);
|
String typePrefixForm = type.toPrefixString(this.namespaceService);
|
||||||
@@ -648,6 +667,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
|||||||
item.setValue(iconName);
|
item.setValue(iconName);
|
||||||
item.getAttributes().put("image", iconPath);
|
item.getAttributes().put("image", iconPath);
|
||||||
icons.add(item);
|
icons.add(item);
|
||||||
|
iconNames.add(iconName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -660,9 +680,17 @@ public class CreateSpaceWizard extends BaseWizardBean
|
|||||||
this.icon = DEFAULT_SPACE_ICON_NAME;
|
this.icon = DEFAULT_SPACE_ICON_NAME;
|
||||||
|
|
||||||
UIListItem item = new UIListItem();
|
UIListItem item = new UIListItem();
|
||||||
item.setValue("space-icon-default");
|
item.setValue(DEFAULT_SPACE_ICON_NAME);
|
||||||
item.getAttributes().put("image", "/images/icons/space-icon-default.gif");
|
item.getAttributes().put("image", "/images/icons/space-icon-default.gif");
|
||||||
icons.add(item);
|
icons.add(item);
|
||||||
|
iconNames.add(DEFAULT_SPACE_ICON_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
// make sure the current value for the icon is valid for the
|
||||||
|
// current list of icons about to be displayed
|
||||||
|
if (iconNames.contains(this.icon) == false)
|
||||||
|
{
|
||||||
|
this.icon = iconNames.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return icons;
|
return icons;
|
||||||
|
@@ -15,6 +15,16 @@ public abstract class BaseWizardBean extends BaseDialogBean implements IWizardBe
|
|||||||
{
|
{
|
||||||
private static final String MSG_NOT_SET = "value_not_set";
|
private static final String MSG_NOT_SET = "value_not_set";
|
||||||
|
|
||||||
|
public String next()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String back()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean getNextButtonDisabled()
|
public boolean getNextButtonDisabled()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -9,6 +9,20 @@ import org.alfresco.web.bean.dialog.IDialogBean;
|
|||||||
*/
|
*/
|
||||||
public interface IWizardBean extends IDialogBean
|
public interface IWizardBean extends IDialogBean
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Called when the next button is pressed by the user
|
||||||
|
*
|
||||||
|
* @return Reserved for future use
|
||||||
|
*/
|
||||||
|
public String next();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the back button is pressed by the user
|
||||||
|
*
|
||||||
|
* @return Reserved for future use
|
||||||
|
*/
|
||||||
|
public String back();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the label to use for the next button
|
* Returns the label to use for the next button
|
||||||
*
|
*
|
||||||
|
@@ -412,8 +412,8 @@ public class WizardManager
|
|||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
logger.debug("next called, current step is now: " + this.currentStep);
|
logger.debug("next called, current step is now: " + this.currentStep);
|
||||||
|
|
||||||
// TODO: place a hook in here to call the wizard bean so it can override
|
// tell the wizard the next button has been pressed
|
||||||
// what step comes next thus overrriding the wizard manager
|
this.currentWizard.next();
|
||||||
|
|
||||||
determineCurrentPage();
|
determineCurrentPage();
|
||||||
}
|
}
|
||||||
@@ -430,8 +430,8 @@ public class WizardManager
|
|||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
logger.debug("back called, current step is now: " + this.currentStep);
|
logger.debug("back called, current step is now: " + this.currentStep);
|
||||||
|
|
||||||
// TODO: place a hook in here to call the wizard bean so it can override
|
// tell the wizard the back button has been pressed
|
||||||
// what step comes next thus overrriding the wizard manager
|
this.currentWizard.back();
|
||||||
|
|
||||||
determineCurrentPage();
|
determineCurrentPage();
|
||||||
}
|
}
|
||||||
|
@@ -65,7 +65,7 @@ public class UISortLink extends UICommand
|
|||||||
boolean bPreviouslySorted = false;
|
boolean bPreviouslySorted = false;
|
||||||
boolean descending = true;
|
boolean descending = true;
|
||||||
String lastSortedColumn = dataContainer.getCurrentSortColumn();
|
String lastSortedColumn = dataContainer.getCurrentSortColumn();
|
||||||
if (lastSortedColumn.equals(getValue()))
|
if (lastSortedColumn != null && lastSortedColumn.equals(getValue()))
|
||||||
{
|
{
|
||||||
descending = !dataContainer.isCurrentSortDescending();
|
descending = !dataContainer.isCurrentSortDescending();
|
||||||
bPreviouslySorted = true;
|
bPreviouslySorted = true;
|
||||||
|
Reference in New Issue
Block a user