0

I am using JSF 2.0 and primefaces 3.0 I am trying to enable a command(Submit) button after a row select from datatable

     <p:datatable ....>
     <p:ajax event="rowUnselect" onstart="showImageButton.disable();" />
     <p:ajax event="rowSelect" onstart="showImageButton.enable();" />   
     </p:datatable>
        <p:commandButton id="commandbuttonid"    widgetVar="showImageButton"   action="#{bean.methodreturningapage}" value="Submit"
                ajax="false"  disabled="true" />   

after selecting the rows command button gets enabled but the action method is not firing.

1 Answer 1

0

Change the disabled attribute into something like #{bean.buttonDisabled}

take a look on this question

p:commandButton not working when disable=“true” initially

and this one

Re-enabled p:commandButton not firing ajax

Sign up to request clarification or add additional context in comments.

1 Comment

bean is session scoped. Navigation is working if i remove the eanbling feature. but not after i add the above code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.