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:
60
source/java/org/alfresco/web/bean/wizard/BaseWizardBean.java
Normal file
60
source/java/org/alfresco/web/bean/wizard/BaseWizardBean.java
Normal file
@@ -0,0 +1,60 @@
|
||||
package org.alfresco.web.bean.wizard;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
|
||||
|
||||
/**
|
||||
* Base class for all wizard beans providing common functionality
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public abstract class BaseWizardBean implements IWizardBean
|
||||
{
|
||||
protected static final String WIZARD_CLOSE = "wizard: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 boolean getNextButtonDisabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean getBackButtonDisabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean getFinishButtonDisabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getNextButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), "next_button");
|
||||
}
|
||||
|
||||
public String getBackButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), "back_button");
|
||||
}
|
||||
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), "finish_button");
|
||||
}
|
||||
|
||||
public String cancel()
|
||||
{
|
||||
return WIZARD_CLOSE;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user