Merged V1.4 to HEAD

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3925 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3965 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3966 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-09-29 07:45:33 +00:00
parent d4c5c3562a
commit cba5171884
23 changed files with 386 additions and 197 deletions

View File

@@ -56,13 +56,27 @@ public final class WizardManager
*/
public void setCurrentWizard(WizardConfig config)
{
// make sure the managed bean is present
String beanName = config.getManagedBean();
IWizardBean wizard = (IWizardBean)FacesHelper.getManagedBean(
FacesContext.getCurrentInstance(), beanName);
if (wizard == null)
Object bean = FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), beanName);
if (bean == null)
{
throw new AlfrescoRuntimeException("Failed to find managed bean '" + beanName + "'");
throw new AlfrescoRuntimeException("Failed to start wizard as managed bean '" + beanName +
"' has not been defined");
}
// make sure the bean implements the IWizardBean interface
IWizardBean wizard = null;
if (bean instanceof IWizardBean)
{
wizard = (IWizardBean)bean;
}
else
{
throw new AlfrescoRuntimeException("Failed to start wizard as managed bean '" + beanName +
"' does not implement the required IWizardBean interface");
}
// initialise the managed bean