jQuery in Action, 3rd edition
The moose likes JSF and the fly likes disabled attribute not rendered in commandButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "disabled attribute not rendered in commandButton" Watch "disabled attribute not rendered in commandButton" New topic

disabled attribute not rendered in commandButton

Sagar Salimath

Joined: Jul 01, 2010
Posts: 4


I am facing a wiered issue.
I am using JSF commandButton for some links on a portlet. I have diabled attribute in the tag to handle role based access.
The tag looks like this,

Here the disabled is set to true.
But when this page is rendered, I get this,

As you can see, the disabled attribute does not get rendered. And I DONT KNOW WHY?

Anyone has any answer to this? Is onclick creating an issue here?

Sagar Salimath
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17148

Nothing is obviously wrong, although I'm rather appalled at the style attribute value. Something that complex deserves its own class definition. And while I THINK css is case-insensitive, the convention is to use lower-case names for the style elements.

But as for your REAL problem, all I can say is "check the return value from the bean's property accessor and make sure its signature is as follows:

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link: http://aspose.com/file-tools
subject: disabled attribute not rendered in commandButton
It's not a secret anymore!