Re: disabled f:ajax / not working (?)
Hi I have been thinking about it, and look the issue from other point of view is valid too. I have an ajax button, and I disable the ajax behavior, why the button should magically convert into a normal submit button. Also, there are considerations from performance perspective, because that means we should evaluate disable property for every client behavior before call the submit script code, so at the end we should evaluate twice that attribute, one to check and the second one to render the script. After the previous considerations, it sounds better let it as is. regards, Leonardo Uribe 2012/7/3 Dennis Hörsch hoer...@his.de: Hi So, what to do next? Should I make a ticket at MyFaces? Greetings, dennis Am 29.06.2012 15:12, schrieb Leonardo Uribe: Hi Probably that's something not explicitly specified, but I think at first view it has sense what you say. If the client behavior is disabled, it should not generate any scripts, and the submit should work as usual. regards, Leonardo Uribe 2012/6/29 Dennis Hörschhoer...@his.de: Hi, I tested to disable allf: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=#{flash.show} value=true / /h:commandButton 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 AjaxBehavior.getHints(). getHints(): This method returns an unmodifiable Set containing the ClientBehaviorHint SUBMITTING. (http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/behavior/AjaxBehavior.html) 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 expected. Greetings dennis -- HIS Hochschul-Informations-System GmbH Goseriede 9 | 30159 Hannover |www.his.de Dennis Hörsch Unternehmensbereich Hochschul-IT Arbeitsbereich Personalmanagement Telefon +49 (0)511 1220-403 e-mailhoer...@his.de Registergericht: Amtsgericht Hannover, HRB 6489 Geschäftsführer: Prof. Dr. Martin Leitner Vorsitzender des Aufsichtsrats: Prof. Dr. Andreas Geiger
Re: disabled f:ajax / not working (?)
Hi, on the one hand I can understand this and I am not 'contra'. But on the other for my thinking it is a _button_, with additional ajax behavior. Not an ajax-button. If I disable the ajax behavior I want to disable that, not the button. Maybe I am too new in JSF2-ajaxified thinking ;-) However, I do not need this for normal working, it has only been nice for 'debugging' / testing. Greetings dennis Am 04.07.2012 09:52, schrieb Leonardo Uribe: Hi I have been thinking about it, and look the issue from other point of view is valid too. I have an ajax button, and I disable the ajax behavior, why the button should magically convert into a normal submit button. Also, there are considerations from performance perspective, because that means we should evaluate disable property for every client behavior before call the submit script code, so at the end we should evaluate twice that attribute, one to check and the second one to render the script. After the previous considerations, it sounds better let it as is. regards, Leonardo Uribe 2012/7/3 Dennis Hörschhoer...@his.de: Hi So, what to do next? Should I make a ticket at MyFaces? Greetings, dennis Am 29.06.2012 15:12, schrieb Leonardo Uribe: Hi Probably that's something not explicitly specified, but I think at first view it has sense what you say. If the client behavior is disabled, it should not generate any scripts, and the submit should work as usual. regards, Leonardo Uribe 2012/6/29 Dennis Hörschhoer...@his.de: Hi, I tested to disable allf: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=#{flash.show} value=true / /h:commandButton 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 AjaxBehavior.getHints(). getHints(): This method returns an unmodifiable Set containing the ClientBehaviorHint SUBMITTING. (http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/behavior/AjaxBehavior.html) 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 expected. Greetings dennis -- HIS Hochschul-Informations-System GmbH Goseriede 9 | 30159 Hannover |www.his.de Dennis Hörsch Unternehmensbereich Hochschul-IT Arbeitsbereich Personalmanagement Telefon +49 (0)511 1220-403 e-mailhoer...@his.de Registergericht: Amtsgericht Hannover, HRB 6489 Geschäftsführer: Prof. Dr. Martin Leitner Vorsitzender des Aufsichtsrats: Prof. Dr. Andreas Geiger
Re: disabled f:ajax / not working (?)
Hi So, what to do next? Should I make a ticket at MyFaces? Greetings, dennis Am 29.06.2012 15:12, schrieb Leonardo Uribe: Hi Probably that's something not explicitly specified, but I think at first view it has sense what you say. If the client behavior is disabled, it should not generate any scripts, and the submit should work as usual. regards, Leonardo Uribe 2012/6/29 Dennis Hörschhoer...@his.de: Hi, I tested to disable allf: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=#{flash.show} value=true / /h:commandButton 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 AjaxBehavior.getHints(). getHints(): This method returns an unmodifiable Set containing the ClientBehaviorHint SUBMITTING. (http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/behavior/AjaxBehavior.html) 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 expected. Greetings dennis -- HIS Hochschul-Informations-System GmbH Goseriede 9 | 30159 Hannover |www.his.de Dennis Hörsch Unternehmensbereich Hochschul-IT Arbeitsbereich Personalmanagement Telefon +49 (0)511 1220-403 e-mailhoer...@his.de Registergericht: Amtsgericht Hannover, HRB 6489 Geschäftsführer: Prof. Dr. Martin Leitner Vorsitzender des Aufsichtsrats: Prof. Dr. Andreas Geiger
disabled f:ajax / not working (?)
Hi, 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=#{flash.show} value=true / /h:commandButton 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 AjaxBehavior.getHints(). getHints(): This method returns an unmodifiable Set containing the ClientBehaviorHint SUBMITTING. (http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/behavior/AjaxBehavior.html) 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 expected. Greetings dennis -- HIS Hochschul-Informations-System GmbH Goseriede 9 | 30159 Hannover | www.his.de Dennis Hörsch Unternehmensbereich Hochschul-IT Arbeitsbereich Personalmanagement Telefon +49 (0)511 1220-403 E-Mail hoer...@his.de Registergericht: Amtsgericht Hannover, HRB 6489 Geschäftsführer: Prof. Dr. Martin Leitner Vorsitzender des Aufsichtsrats: Prof. Dr. Andreas Geiger
Re: disabled f:ajax / not working (?)
Hi Probably that's something not explicitly specified, but I think at first view it has sense what you say. If the client behavior is disabled, it should not generate any scripts, and the submit should work as usual. regards, Leonardo Uribe 2012/6/29 Dennis Hörsch hoer...@his.de: Hi, 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=#{flash.show} value=true / /h:commandButton 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 AjaxBehavior.getHints(). getHints(): This method returns an unmodifiable Set containing the ClientBehaviorHint SUBMITTING. (http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/behavior/AjaxBehavior.html) 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 expected. Greetings dennis -- HIS Hochschul-Informations-System GmbH Goseriede 9 | 30159 Hannover | www.his.de Dennis Hörsch Unternehmensbereich Hochschul-IT Arbeitsbereich Personalmanagement Telefon +49 (0)511 1220-403 E-Mail hoer...@his.de Registergericht: Amtsgericht Hannover, HRB 6489 Geschäftsführer: Prof. Dr. Martin Leitner Vorsitzender des Aufsichtsrats: Prof. Dr. Andreas Geiger