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:
Derek Hulley
2006-07-18 15:28:12 +00:00
parent 1147bcf949
commit 383c8028a0
5 changed files with 58 additions and 6 deletions

View File

@@ -95,6 +95,24 @@ public class CreateSpaceWizard extends BaseWizardBean
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
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
List<UIListItem> icons = null;
List<String> iconNames = new ArrayList<String>(8);
QName type = QName.createQName(this.spaceType);
String typePrefixForm = type.toPrefixString(this.namespaceService);
@@ -648,6 +667,7 @@ public class CreateSpaceWizard extends BaseWizardBean
item.setValue(iconName);
item.getAttributes().put("image", iconPath);
icons.add(item);
iconNames.add(iconName);
}
}
}
@@ -660,9 +680,17 @@ public class CreateSpaceWizard extends BaseWizardBean
this.icon = DEFAULT_SPACE_ICON_NAME;
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");
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;

View File

@@ -15,6 +15,16 @@ public abstract class BaseWizardBean extends BaseDialogBean implements IWizardBe
{
private static final String MSG_NOT_SET = "value_not_set";
public String next()
{
return null;
}
public String back()
{
return null;
}
public boolean getNextButtonDisabled()
{
return false;

View File

@@ -9,6 +9,20 @@ import org.alfresco.web.bean.dialog.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
*

View File

@@ -412,8 +412,8 @@ public class WizardManager
if (logger.isDebugEnabled())
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
// what step comes next thus overrriding the wizard manager
// tell the wizard the next button has been pressed
this.currentWizard.next();
determineCurrentPage();
}
@@ -430,8 +430,8 @@ public class WizardManager
if (logger.isDebugEnabled())
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
// what step comes next thus overrriding the wizard manager
// tell the wizard the back button has been pressed
this.currentWizard.back();
determineCurrentPage();
}

View File

@@ -65,7 +65,7 @@ public class UISortLink extends UICommand
boolean bPreviouslySorted = false;
boolean descending = true;
String lastSortedColumn = dataContainer.getCurrentSortColumn();
if (lastSortedColumn.equals(getValue()))
if (lastSortedColumn != null && lastSortedColumn.equals(getValue()))
{
descending = !dataContainer.isCurrentSortDescending();
bPreviouslySorted = true;