Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-926

selectBooleanCheckbox inside tree2 inside dataTable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.1.3, 1.1.5-SNAPSHOT
    • None
    • Tree2
    • None
    • win XP SP2, jdk1.5.0, tomcat-5.5.20

    Description

      My usecase is a dataTable contaning checkedNodes trees.

      The checkBoxes events are managed correctly when there is 1 row.

      From two rows, problems happened:

      for this 2 rows structure:
      -[]folder1
      -[]file1
      -[]file2
      ---------------------------------------------------
      -[]folder2
      -[]file3
      -[]file4

      If I check folder1 node, folder 1 is unchecked by backend actions (if folder1 is expanded, it expands folder2).
      log:
      folder2.selectedValueChange(), oldValue: false, newValue: true
      folder2.setSelected(true) HAS CHANGED !
      folder2.setSelected(true)
      folder2.setSelected(false) HAS CHANGED !

      If I check folder2 node (all folder collapsed), folder 2 is checked by backend actions.
      log:
      folder2.selectedValueChange(), oldValue: false, newValue: true
      folder2.setSelected(true) HAS CHANGED !
      folder2.setSelected(false) HAS CHANGED !
      folder2.setSelected(true) HAS CHANGED !

      Here is the page structure:
      <pre>
      <h:dataTable var="tableItem" id="table" value="#

      {table.data}

      "
      preserveDataModel="false" preserveSort="false" sortable="false"
      styleClass="standardTable" headerClass="standardTable_Header"
      footerClass="standardTable_Header"
      rowClasses="standardTable_Row1,standardTable_Row2"
      columnClasses="standardTable_Column, standardTable_ColumnCentered, standardTable_Column">
      <ui:param name="sortedCol" value="#

      {table.sortedColumn}

      " />
      <t:column defaultSorted="true" >
      <f:facet name="header">
      <h:outputText value="#

      {bundle.tableColumnName}

      " />
      </f:facet>
      <h:panelGroup rendered="#

      {tableItem.type=='folder' && tableItem.node.childs}

      ">
      <t:tree2 value="#

      {tableItem.node}

      "
      var="subnode"
      showLines="false" >
      <f:facet name="folder">
      <h:panelGroup>
      <h:selectBooleanCheckbox
      id="_check"
      value="#

      {subnode.infoBean.selected}"
      valueChangeListener="#{subnode.infoBean.selectedValueChange}"
      onclick="this.form.submit()"/>
      <h:outputText value="#{subnode.description}" />
      </h:panelGroup>
      </f:facet>
      <f:facet name="file">
      <h:panelGroup>
      <h:selectBooleanCheckbox
      id="_check"
      value="#{subnode.infoBean.selected}

      "
      valueChangeListener="#

      {subnode.infoBean.selectedValueChange}

      "
      onclick="this.form.submit()"/>
      <h:outputText value="#

      {subnode.description}

      " />
      </h:panelGroup>
      </f:facet>
      </t:tree2>
      </h:panelGroup>
      </t:column>
      </h:dataTable>
      </pre>

      Attachments

        1. checkNodeTable.xhtml
          2 kB
          Sébastien LEVER

        Activity

          People

            Unassigned Unassigned
            slever Sébastien LEVER
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: