<div>Can i disable a button dynamically ?</div>
<div>&nbsp;</div>
<div>Where&#39;s the problem with my code?</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp; public String getSelectAllDisabled() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (viewItems == null || viewItems.length == 0) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return &quot;disabled&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return &quot;false&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp;&nbsp; }</div>
<div>&nbsp;</div>
<div>&lt;input id=&quot;selectAll&quot; type=&quot;button&quot; value=&quot;¤¹¤Ù¤Æßx’k&quot; class=&quot;button large&quot; style=&quot;&quot;&nbsp; disabled=&quot;&quot;/&gt;</div>
<div>&nbsp;</div>