我删除了导航案例faces-config.xml
并切换到隐式导航。
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage(null, new FacesMessage("Successful", "Datacenter " + ndc.componentStatsId + " is created!"));
if (result == 1)
{
return "DatacentersList.xhtml?faces-redirect=true";
}
if (result == 2)
{
return "NewDatacenter.xhtml?faces-redirect=true";
}
return null;
导航运行良好,但事实证明不再显示人脸消息。这是如何引起的,我该如何解决?