The moose likes JSF and the fly likes Enabling and disabling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Enabling and disabling" Watch "Enabling and disabling" New topic

Enabling and disabling

Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
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,
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
<h:commandButton value="blah" immediate="true" disabled="#{yourBackingBean.someProperty}" />

MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
I agree. Here's the link:
subject: Enabling and disabling
It's not a secret anymore!