Newly converted dialogs now make use of the new subtitle feature of the dialog framework.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6850 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2007-09-21 12:18:17 +00:00
parent 3e5670ef4c
commit 403f7b3a04
6 changed files with 338 additions and 290 deletions

View File

@@ -29,40 +29,54 @@ import javax.faces.context.FacesContext;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.dialog.BaseDialogBean;
/**
* Implementation for the SystemInfo dialog.
*
* @author gavinc
*/
public class ShowSystemInfoDialog extends BaseDialogBean
{
private final static String MSG_CURRENT_USER = "current_user";
private static final String LBL_CLOSE = "close";
private static final String MSG_CURRENT_USER = "current_user";
private static final String MSG_CLOSE = "close";
private static final String MSG_VERSION = "version";
private NavigationBean navigationBean;
protected AboutBean aboutBean;
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
return null;
}
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
return null;
}
public NavigationBean getNavigationBean()
{
return navigationBean;
}
public void setAboutBean(AboutBean aboutBean)
{
this.aboutBean = aboutBean;
}
public void setNavigationBean(NavigationBean navigationBean)
{
this.navigationBean = navigationBean;
}
@Override
public String getContainerSubTitle()
{
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CURRENT_USER) + ": " +
this.navigator.getCurrentUser().getUserName();
}
@Override
public String getContainerDescription()
{
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CURRENT_USER) + " '" + navigationBean.getCurrentUser().getUserName() + "'";
}
@Override
public String getContainerDescription()
{
StringBuilder builder = new StringBuilder(Application.getMessage(
FacesContext.getCurrentInstance(), MSG_VERSION));
builder.append(": ");
builder.append(this.aboutBean.getEdition());
builder.append(" - v");
builder.append(this.aboutBean.getVersion());
return builder.toString();
}
@Override
public String getCancelButtonLabel()
{
return Application.getMessage(FacesContext.getCurrentInstance(), LBL_CLOSE);
}
@Override
public String getCancelButtonLabel()
{
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE);
}
}