Hi,
today i faced a problem when i bind an expression for example to onstart on p:ajax.
On the first request, the expression is evaluated without problems but if updates the component, which includes the p:ajax, the expression is not evaluated again. (I also checked the response and if my setter is getting called)
Is this an known limitation?
Best regards
Thomas
re-evaluation of expresssions on p:ajax attributes
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Last edited by tandraschko on 12 Oct 2011, 10:09, edited 1 time in total.
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
I think somebody has already reported this issue. Looks like a bug in PrimeFaces. PrimeFaces saves the state as String with
and Mojarra e.g. saves it for f:ajax as ValueExpression by calling eval method
The first evaluation is always ok because EL gets evaluated during first rendering. After that the evaluated value is stored as String.
Code: Select all
getStateHelper().put(PropertyKeys.onstart, _onstart);
Code: Select all
private Object eval(String propertyName, Object value) {
if (value != null) {
return value;
}
ValueExpression expression = getValueExpression(propertyName);
if (expression != null) {
FacesContext ctx = FacesContext.getCurrentInstance();
return expression.getValue(ctx.getELContext());
}
return null;
}
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Information
-
Who is online
Users browsing this forum: No registered users and 20 guests