UICommand: reenabled after disableOnAjax when disabled on server side in request
See original GitHub issueDescribe the bug
When a command button action willingly sets the disabled state of the button, the visual state of the button is still enabled. After another page update, this is reflected properly.
Reproducer
Please clone: https://github.com/stolp/primefaces-test/tree/PF-9038
Form:
<h:form id="frmTest">
<p>It is expected, that the first button disables itself after its action, but it doesn't.</p>
<p>The second button only refreshes the form to prove that the disabled setting is indeed present.</p>
<p:commandButton disabled="#{testView.isDisabled()}"
value="Button Action disables this button" action="#{testView.sleep()}" partialSubmit="true" update="@form" />
<p:commandButton
value="Button Action updates the page" action="#{testView.refresh()}" partialSubmit="true" update="@form" />
</h:form>
Expected behavior
The button state should be disabled after the action finishes.
PrimeFaces edition
Community
PrimeFaces version
12.0.0-RC2
Theme
any
JSF implementation
All
JSF version
2.3
Browser(s)
No response
Issue Analytics
- State:
- Created a year ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Re enable Ajax after disabling it on client side - Telerik
I'm using a RadGrid within a RajAjaxManager. On a specific LinkButton, I need to export the content of the grid to CSV. So...
Read more >Re-Enable Submit button after success in AJAX - Stack Overflow
This will re-enable the button $( "#submit" ).prop( "disabled", true ); //disable when ajax call starts jQuery.ajax({ url: ...
Read more >Unable to disable #mySubmit button - Codecademy
I have most of this exercise figured out except for the step where I need to disable the #mySubmit button before the $.ajax...
Read more >Re-enabling a disable commandButton does not fire ajax call
I have two command buttons, buttonA and buttonB. buttonA is enable and buttonB is disable (it can enable based on some conditions. it...
Read more >BootsFaces-OSP/BootsFaces.jsfdsl at master - GitHub
ajax Boolean "Whether the Button submits the form with AJAX." delay "Delays the AJAX request." onclick "The onclick attribute." oncomplete "JavaScript ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for fixing!
No, that’s not needed, it is deprecated now.