mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- Added dynamic title and description support to dialog and wizard framework
- Rationalised debugging through workfllow pages git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3651 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -130,6 +130,16 @@ public abstract class BaseDialogBean implements IDialogBean
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param browseBean The BrowseBean to set.
|
||||
*/
|
||||
|
@@ -140,15 +140,23 @@ public final class DialogManager
|
||||
*/
|
||||
public String getTitle()
|
||||
{
|
||||
String title = this.currentDialogState.getConfig().getTitleId();
|
||||
// try and get the title directly from the dialog
|
||||
String title = this.currentDialogState.getDialog().getTitle();
|
||||
|
||||
if (title != null)
|
||||
if (title == null)
|
||||
{
|
||||
title = Application.getMessage(FacesContext.getCurrentInstance(), title);
|
||||
}
|
||||
else
|
||||
{
|
||||
title = this.currentDialogState.getConfig().getTitle();
|
||||
// try and get the title via a message bundle key
|
||||
title = this.currentDialogState.getConfig().getTitleId();
|
||||
|
||||
if (title != null)
|
||||
{
|
||||
title = Application.getMessage(FacesContext.getCurrentInstance(), title);
|
||||
}
|
||||
else
|
||||
{
|
||||
// try and get the title from the configuration
|
||||
title = this.currentDialogState.getConfig().getTitle();
|
||||
}
|
||||
}
|
||||
|
||||
return title;
|
||||
@@ -161,15 +169,23 @@ public final class DialogManager
|
||||
*/
|
||||
public String getDescription()
|
||||
{
|
||||
String desc = this.currentDialogState.getConfig().getDescriptionId();
|
||||
// try and get the description directly from the dialog
|
||||
String desc = this.currentDialogState.getDialog().getDescription();
|
||||
|
||||
if (desc != null)
|
||||
if (desc == null)
|
||||
{
|
||||
desc = Application.getMessage(FacesContext.getCurrentInstance(), desc);
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = this.currentDialogState.getConfig().getDescription();
|
||||
// try and get the description via a message bundle key
|
||||
desc = this.currentDialogState.getConfig().getDescriptionId();
|
||||
|
||||
if (desc != null)
|
||||
{
|
||||
desc = Application.getMessage(FacesContext.getCurrentInstance(), desc);
|
||||
}
|
||||
else
|
||||
{
|
||||
// try and get the description from the configuration
|
||||
desc = this.currentDialogState.getConfig().getDescription();
|
||||
}
|
||||
}
|
||||
|
||||
return desc;
|
||||
|
@@ -65,4 +65,22 @@ public interface IDialogBean
|
||||
* @return true if the button should be disabled
|
||||
*/
|
||||
public boolean getFinishButtonDisabled();
|
||||
|
||||
/**
|
||||
* Returns the title to be used for the dialog
|
||||
* <p>If this returns null the DialogManager will
|
||||
* lookup the title via the dialog configuration</p>
|
||||
*
|
||||
* @return The title or null if the title is to be acquired via configuration
|
||||
*/
|
||||
public String getTitle();
|
||||
|
||||
/**
|
||||
* Returns the description to be used for the dialog
|
||||
* <p>If this returns null the DialogManager will
|
||||
* lookup the description via the dialog configuration</p>
|
||||
*
|
||||
* @return The title or null if the title is to be acquired via configuration
|
||||
*/
|
||||
public String getDescription();
|
||||
}
|
||||
|
Reference in New Issue
Block a user