<div>I have done it in another way like this.</div>
<div> </div>
<div> public boolean getSelectAllDisabled() {<br> boolean flag = false;<br> if (viewItems == null || viewItems.length == 0) {<br> flag = true;<br> } <br> return flag;<br> }</div>
<div> </div>
<div>Thank you all the same!</div>
<div>¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹£¡<br><br> </div>
<div><span class="gmail_quote">2007/10/12, Yasuo Higa <<a href="mailto:higa@isid.co.jp">higa@isid.co.jp</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi, guys.<br>><br>> Can i disable a button dynamically ?<br>><br>> Where's the problem with my code?
<br>><br>> public String getSelectAllDisabled() {<br>> if (viewItems == null || viewItems.length == 0) {<br>> return "disabled";<br>> } else {<br>> return "false";
<br>> }<br>> }<br>><br>disabled="false" has same meaning of disabled="disabled".<br>So, you should define your method as follows:<br><br>public String getSelectAllDisabled() {<br><br>
if (viewItems == null || viewItems.length == 0) {<br><br> return "disabled";<br><br> } else {<br><br> return null;<br><br> }<br><br>}<br><br>--<br>Yasuo Higa<br><a href="mailto:higa@isid.co.jp">
higa@isid.co.jp</a><br>_______________________________________________<br>Seasar-user mailing list<br><a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br><a href="https://ml.seasar.org/mailman/listinfo/seasar-user">
https://ml.seasar.org/mailman/listinfo/seasar-user</a><br></blockquote></div><br>