disabled attribute on p:ajax sampled only once

UI Components for JSF
Post Reply
Soupdragon
Posts: 16
Joined: 22 Jul 2011, 10:50

16 Nov 2011, 18:57

Updating the component with the p:ajax behaviour does not seem to cause the disabled attribute to be updated. Looking at the source, the AjaxBehaviour object stores the attribute value directly, rather than saving it per view instance as is done for normal component classes. Presumably the attribute is read as the UIComponent tree is built.

If this is true, I can't see much point in having such an attribute.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

16 Nov 2011, 22:49

Hi,

I think I know what you mean. That's true. Attributes don't get evaluted in postbacks. This is a lack in the implementation. AjaxBehaviorHandler should create ValueExpression(s) each time the component tree gets created / restored. We have solved a similar issue in PrimeFaces Extensions project and can provide a hint for PF developers if they're interested in.
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

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 43 guests