Search code examples
jsfajax4jsfjspx

enable save button when there is an update


I have to enable the 'save button' only when there is an update in my form page, otherwise it should be disabled. Here after the code I am using for :

<a4j:commandButton styleClass="boutonAction buttonSave"
    value="#{messages['btn.save.label']}"
    update="editForm"
    action="#{Action.save()}"

    ajaxSingle="false" immediate="false" limitToList="true"
    reRender="msg" />

I think in this case I need to include a JS ?


Solution

  • I resolved the issue by using this :

    disabled="#{editForm.editAccess == 'false'}"
    

    I tried with IE it works. Apparently firefox do not make darken the button.