mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2577 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
40 lines
899 B
Java
40 lines
899 B
Java
package org.alfresco.web.bean.dialog;
|
|
|
|
import javax.faces.context.FacesContext;
|
|
|
|
import org.alfresco.web.app.Application;
|
|
import org.alfresco.web.app.context.UIContextService;
|
|
|
|
/**
|
|
* Base class for all dialog beans providing common functionality
|
|
*
|
|
* @author gavinc
|
|
*/
|
|
public abstract class BaseDialogBean implements IDialogBean
|
|
{
|
|
protected static final String DIALOG_CLOSE = "dialog:close";
|
|
|
|
public abstract String finish();
|
|
|
|
public void init()
|
|
{
|
|
// tell any beans to update themselves so the UI gets refreshed
|
|
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
|
|
}
|
|
|
|
public String cancel()
|
|
{
|
|
return DIALOG_CLOSE;
|
|
}
|
|
|
|
public boolean getFinishButtonDisabled()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public String getFinishButtonLabel()
|
|
{
|
|
return Application.getMessage(FacesContext.getCurrentInstance(), "ok");
|
|
}
|
|
}
|