mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
First cut of dialog/wizard framework
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2577 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
39
source/java/org/alfresco/web/bean/dialog/BaseDialogBean.java
Normal file
39
source/java/org/alfresco/web/bean/dialog/BaseDialogBean.java
Normal file
@@ -0,0 +1,39 @@
|
||||
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");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user