I have been using JSF with Primefaces for a project. While I'm working on the project, I have come across lots of challenges. I would like to share them as FAQs for others to get benefited from my experience.
1) How to give a space in between primefaces JSF components?
<p:spacer width="20" height="20" />
2) I want to show success / Error message. How to do that?
The first argument tells the severity. The second one is for High level message("Your record has been updated"), the second one is for detailed message(" Mr. X, Eno: 1234 ).
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, "Detail");
FacesContext.getCurrentInstance().addMessage("successInfo", facesMsg);
1) How to give a space in between primefaces JSF components?
<p:spacer width="20" height="20" />
2) I want to show success / Error message. How to do that?
The first argument tells the severity. The second one is for High level message("Your record has been updated"), the second one is for detailed message(" Mr. X, Eno: 1234 ).
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, "Detail");
FacesContext.getCurrentInstance().addMessage("successInfo", facesMsg);
No comments:
Post a Comment