2 Replies Latest reply on Mar 23, 2008 7:20 AM by jadtn

    datagrid with selectBooleanCheckbox jsfunit test problem

    jadtn

      I use a datagrid to display result of search (of messages)
      At it message i propose a checkbox in the header to delete it.
      In my Test code i try to use a HtmlSelectBooleanCheckbox , but when i execute 'ajaxClient.ajaxSubmit(componentId)', the checkbox is never updated on server side.
      Anybody has example for datagrid with jsfunit?
      Thanks for your help

      TEST jsfunit
      ------------
      assertEquals(1, getDataGridRowCount());
      HtmlSelectBooleanCheckbox msg = getInDataGridHtmlSelectBooleanCheckbox(indexrow);
      msg.setValue(true);
      msg.setSelected(true);

      ajaxClient.ajaxSubmit(componentId)

      int rowcount = getDataGridRowCount();
      for (int i = 0; i < rowcount; i++) {
      log.info("---> "+getDataInDataGrid(0));

      }
      assertEquals(0, getDataGridRowCount()); // HERE I found 2 row what s wrong ?!!!!

      JSP
      -----------
      <rich:dataGrid value="#{resultsHolder.msgs}" id="msgDatas" var="msg" columns="1" elements="#{resultsHolder.msgs.size}" rowKeyVar="ni">
      <rich:panel id="mp" style="width:100%">
      <f:facet name="header">
      <h:panelGroup id="pgheader">
      <h:selectBooleanCheckbox id="del" title="Supprimer" value="#{resultsHolder.messageEJBToDeleteBoolean[msg]}" />

      </h:panelGroup>
      </f:facet>

      <h:outputText value="TEST #{msg.timestampSend}">
      <f:convertDateTime dateStyle="short" locale="fr" type="date" />
      </h:outputText>

      </rich:panel>
      </rich:dataGrid>