开发者

Rendering of <h:commandbutton> in Firefox?

When we set disabled attribute for is set as true,开发者_如何学JAVA in Firefox the button still looks like it is enabled but in IE it is working fine. Is it a limitation with Firefox or JSF.


All JSF does is generating HTML/CSS/JS. Webbrowsers doesn't retrieve/understand JSF code at all. Style and look'n'feel is usually controlled using CSS. All you could do is to view the generated HTML/CSS/JS code for pointers related to the style of a disabled button. You could maybe create a plain vanilla HTML page to do some quick tests to exclude the one and other.

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Test</title>
    </head>
    <body>
        <input type="submit" disabled>
    </body>
</html>

You can select a disabled submit button using the attribute selector [name=value] in CSS like so:

input[type=submit][disabled] {
    background: pink;
}

Test it like follows:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Test</title>
        <style>input[type=submit][disabled] { background: pink; }</style>
    </head>
    <body>
        <input type="submit" disabled>
    </body>
</html>

And apply the learnt things in JSF side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜