This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
Similar Threads
need help in jquery
Having trouble with a javascript assignment
Load text field based on another
Regarding readOnly property of input type control in html.
Edit Multiple rows in a table