mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -48,13 +48,27 @@ public final class DialogManager
|
||||
*/
|
||||
public void setCurrentDialog(DialogConfig config)
|
||||
{
|
||||
// make sure the managed bean is present
|
||||
String beanName = config.getManagedBean();
|
||||
IDialogBean dialog = (IDialogBean)FacesHelper.getManagedBean(
|
||||
FacesContext.getCurrentInstance(), beanName);
|
||||
|
||||
if (dialog == 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 dialog as managed bean '" + beanName +
|
||||
"' has not been defined");
|
||||
}
|
||||
|
||||
// make sure the bean implements the IDialogBean interface
|
||||
IDialogBean dialog = null;
|
||||
if (bean instanceof IDialogBean)
|
||||
{
|
||||
dialog = (IDialogBean)bean;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Failed to start dialog as managed bean '" + beanName +
|
||||
"' does not implement the required IDialogBean interface");
|
||||
}
|
||||
|
||||
// initialise the managed bean
|
||||
|
Reference in New Issue
Block a user