June 2014
Intermediate to advanced
578 pages
12h 2m
English
In the previous example, you saw how to exploit <ui:param> for sending literal strings to a template or included page, but <ui:param> can be used for more than this. Let's suppose that we have the following code of the bean, TemplatesBean:
@Named @ViewScoped public class TemplatesBean implements Serializable { private String msgTopDefault=""; private String msgBottomDefault=""; private String msgCenterDefault="No center content ...press the below button!"; //getters and setters public void topAction(String msg){ this.msgTopDefault = msg; } public void bottomAction(String msg){ this.msgBottomDefault = msg; } public void centerAction(){ this.msgCenterDefault="This is default content"; } } ...Read now
Unlock full access