ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

listbox: how to enable a toolbarbutton when the corresponding row is selected?

marcomistroni
29 Dec 2011 13:47:15 GMT
29 Dec 2011 13:47:15 GMT

hi all
i have following listbox (in ZK 5.0.6)

<listbox id="myListbox"' model="mymodel" selectedItem="@{mycomposer,currentItem">
   <listhead>
     <listheader label="fieldone"/>
     <listheader label="fieldtwo"/>
     <listheader label=""/>
  </listhead>
  <listitem self="@{each=myItem}">
     <listcell label="@{myItem.fieldOne"/>
    <listcell label="@{myItem.fieldTwo"/>
    <listcell>
                        <toolbarbutton id="removeButton" image="~./trash_16.gif"
                          forward="onClick=onDeleteItem" disabled="true" /> 
                      </listcell>
    </listitem>
</listbox>

what i want to do is to enable the toolbar button once the listbox row is clicked .
Somehow, when i hover with the mouse over the listbox, the listitem changes color (and to the user it will look like the row has been selected).......

could anyone assist pls?
w/kindest regards
marco