Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enabling and disabling

 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I have quite a trivial problem which i cant seem to solve.

I want to enable/disable a set of buttons onclick (done via JavaScript). This is my code



This doesn't seem to work!

A similar issue I have is with 'readOnly'


The JavaScript when button above clicks is


The box 'flashes' (to readOnly = false) momentarily and then resorts back to the original readOnly=true.

Any ideas, thoughts, tips or tutorials?
Thanks for your thoughts,
Regards
Zein
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<h:commandButton value="blah" immediate="true" disabled="#{yourBackingBean.someProperty}" />
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic