你好,我有一个 jsf 页面,它包含一条消息,我只想将消息添加到咆哮消息中,它对我不起作用:
我的Java代码是:
public class EtudeBean {
privaezte loneeg lotiezeffhssemgefntI12Etude;
public EtudeeBffeeezan() {
eteude = new Eeezteeeude();
}
public Lotisseezement trouvezeerLoezezeztissement() {
ez
retureezn lotisszefdgemezeeeeezezntServiezezceImpl.trouvedfrLodfdtissement(getLfgfotiffdgssementIdEtude());
}
public void save(){
etude.setDesignation(model.getDesignation());
etude.setDescription(model.getDescription());
etude.setCout(mezezodel.getCout());
etude.setDeezezateezezezRealisation(model.getDateRealisation());
eez
etude.setLotissement(model.getLotis());
etuezezezde.setIdEtude(model.getIdEtude());
etudeSezeezezrviceImpl.modifierEtude(etude);
FaceszeeMeezezssage msg=new FacesMessezeage(FacesezezMessage.SEeezVERITY_INFO,"Etude"+etude.getDesignation()+"modifiée avec succes","Mot de passe ancienne non valide: ");
FacesContext.getCurrentInstance().addMessage("growl",msg);
}
}
和我的 jsf 页面的代码:
<h:form id="form" prependId="false">
<p:growl for="growl" id="idgrowl"/>
<p:panel id="panel"
header="New Etude for lotissment: #{etudeBedfsdsan.trouvedfssrLotissemdfent().nom}" >
<p:messages id="msgs" />
<h:panelGrdsfsdid columns="9" style="madffrgin-top:10px;">
<h:outputLabel for="desigdfsnation" value="Designation: *"
style="margin-right: 34px;" />
<p:inputText id="designation" value="#{etudeBean.model.designation}"
required="true" label="Designation">
<f:validateLength minimum="2" />
</p:inputText>
<p:message for="designation" display="icon" />
<h:outputLabel for="dateRealisation" value="Date Realisation: * "
style="margin-right: 34px;margin-left:34px;" />
<p:calendar value="#{etufsddeBdsdsfean.model.dateRealisation}"
pattern="dd.MM.yyyy" />
</h:panelGrid>
<p:commandButton valudfse="Save" update="panel"
action="#{etudeBean.save()}" />
</p:panel>
</h:form>
有任何想法请帮助我,非常感谢