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

=?GB2312?B?wO7A1g==?= [E-MAIL ADDRESS DELETED]
2007年 10月 12日 (金) 20:27:53 JST


I have done it in another way like this.

    public boolean getSelectAllDisabled() {
        boolean flag = false;
        if (viewItems == null || viewItems.length == 0) {
            flag = true;
        }
        return flag;
    }

Thank you all the same!
¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹£¡


2007/10/12, Yasuo Higa <[E-MAIL ADDRESS DELETED]>:
>
> 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 mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: http://ml.seasar.org/archives/seasar-user/attachments/20071012/4adb38a0/attachment.html 


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