Merge remote-tracking branch 'origin/pr/583' into pr/582-tayo-jsf-3

This commit is contained in:
slavisa-baeldung 2016-08-07 08:19:38 +02:00
commit 5b06a350ad
1 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,7 @@ public class ELSampleBean {
private String firstName; private String firstName;
private String lastName; private String lastName;
private String pageDescription = "This page demos JSF EL Basics"; private String pageDescription = "This page demos JSF EL Basics";
public static final String constantField = "THIS_IS_NOT_CHANGING_ANYTIME_SOON";
private int pageCounter; private int pageCounter;
private Random randomIntGen = new Random(); private Random randomIntGen = new Random();
@ -27,11 +28,19 @@ public class ELSampleBean {
public void save() { public void save() {
} }
public static String getConstantField() {
return constantField;
}
public void saveFirstName(String firstName) { public void saveFirstName(String firstName) {
this.firstName = firstName; this.firstName = firstName;
} }
public String multiplyValue(LambdaExpression expr){
String theResult = (String) expr.invoke(FacesContext.getCurrentInstance().getELContext(), pageCounter);
return theResult;
}
public void saveByELEvaluation() { public void saveByELEvaluation() {
firstName = (String) evaluateEL("#{firstName.value}", String.class); firstName = (String) evaluateEL("#{firstName.value}", String.class);