<%@ page language="java" %> 
<%@taglib uri="/WEB-INF/tld/com_iplanet_jato/jato.tld" prefix="jato"%> 
<%@taglib uri="/WEB-INF/tld/com_sun_web_ui/cc.tld" prefix="cc"%>
<%@taglib uri="/WEB-INF/lib/sa.tld" prefix="sa"%>

<jato:useViewBean className="com.sun.netstorage.mgmt.fm.storade.ui.viewbeans.diagnostics.TestListViewBean">

<script language="javascript">
// This function will toggle the disabled state of action buttons
// depending on single or multiple selections.
function toggleDisabledState() {
   // Action button and menu names.
   var actionButton = "TestList.RunTestButton";

   // Element name (prefix) of selection checkbox/radiobutton.
   var elementName = "TestList.TestListTable.Selection";
  
   // Document form.
   var form = document.testListForm;
 
   // Flag indicating to disable action button and menu options.
   var disabled = true;
 
   // Set flags according to single or multiple selections.
   for (i = 0; i < form.elements.length; i++) {
        var e = form.elements[i];

        if (e.name.indexOf(elementName) != -1) {
             if (e.checked) {
                disabled = false;
            break;
            }
        }
   }
  
   // Toggle action button disabled state.
   ccSetButtonDisabled(actionButton, "testListForm", disabled);
}
</script>

<jato:form name="testListForm" method="post">

<sa:primarymasthead name="Masthead" showDefaultPageTitle="withBarOnly"/>

<cc:spacer name="spacer" height="15" newline="true"/>

<cc:actiontable 
 name="TestListTable" 
 bundleID="appBundle" 
 title="table.title.testList" 
 summary="table.summary.testList" 
 empty="table.empty.testList" 
 selectionType="single"
 selectionJavascript="toggleDisabledState()"
 showAdvancedSortingIcon="true" 
 showLowerActions="true" 
 showPaginationControls="true" 
 showPaginationIcon="true" 
 showSelectionIcons="true" 
 page="1" />

<cc:hidden name="assetID" />

</jato:form>
</jato:useViewBean>
