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.

curious
  • 915
  • 4
  • 14
  • 27

1 Answers1

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

Community
  • 1
  • 1
Daniel
  • 36,833
  • 10
  • 119
  • 200
  • bean is session scoped. Navigation is working if i remove the eanbling feature. but not after i add the above code. – curious Feb 27 '12 at 09:14