[Seasar-user:10970] Re: disable a button

Yasuo Higa [E-MAIL ADDRESS DELETED]
2007年 10月 12日 (金) 14:49:47 JST


Hi, guys.
> 
> Can i disable a button dynamically ?
> 
> Where's the problem with my code?
> 
>     public String getSelectAllDisabled() {
>         if (viewItems == null || viewItems.length == 0) {
>             return "disabled";
>         } else {
>             return "false";
>         }
>     }
> 
disabled="false" has same meaning of disabled="disabled".
So, you should define your method as follows:

public String getSelectAllDisabled() {

    if (viewItems == null || viewItems.length == 0) {

        return "disabled";

    } else {

        return null;

    }

}

--
Yasuo Higa
[E-MAIL ADDRESS DELETED]



Seasar-user メーリングリストの案内