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:
Gavin Cornwell
2006-03-27 10:40:39 +00:00
parent cb69c74d73
commit 9be6273144
25 changed files with 1628 additions and 169 deletions

View 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");
}
}