myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Hörsch <>
Subject disabled <f:ajax /> not working (?)
Date Fri, 29 Jun 2012 08:56:02 GMT

I tested to disable all <f:ajax /> temporally on my page 
(programatically, for testing reasons).
The behavior that I would expect is that the button then submits as 
without the f:ajax tag.

But instead of this, the whole button is kind of disabled. This is also 
the case if I disable the f:ajax directly:
<h:commandButton value="Show">
<f:ajax execute="@this" render="@form" disabled="true" />
<f:setPropertyActionListener target="#{}" value="true" />

In the HTML the button has an onclick with 'return false'. Is this the 
desired  behavior?
As I discovered so far this 'return false' is in the end depend on 

"getHints(): This method returns an unmodifiable Set containing the 
ClientBehaviorHint SUBMITTING."

But why does the AjaxBehavior pretend to be 'SUBMITTING' while 
generating no script?

If I change it to return an empty set if it is disabled it works as 


HIS Hochschul-Informations-System GmbH
Goseriede 9 | 30159 Hannover |

Dennis Hörsch
Unternehmensbereich Hochschul-IT
Arbeitsbereich Personalmanagement
Telefon +49 (0)511 1220-403

Registergericht: Amtsgericht Hannover, HRB 6489
Geschäftsführer: Prof. Dr. Martin Leitner
Vorsitzender des Aufsichtsrats: Prof. Dr. Andreas Geiger

View raw message