Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-933

Allow refusal to open a TreeView branch

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: wtk, wtk-terra
    • Labels:
      None
    • Environment:
      All

      Description

      In some cases (i.e., doing lazy loading of contents of a tree branch) an error might occur that precludes getting the information for the branch. In this case it would be better to simply refuse to open the branch because the information is inaccurate or not available, rather than show a (potentially misleading) empty list.

      This is a simple change to add a method to TreeViewBranchListener called "previewBranchExpandedChange" that returns a Vote as to whether or not to expand/collapse the branch, similarly to the way Rollups and Accordions work. The Adapter will return Vote.APPROVE so (most) existing apps will continue to work as before (unless they directly implement the TreeViewBranchListener interface instead of subclassing the Adapter). Will also need to implement the "branchExpandedChangeVetoed" method to be consistent (although there is currently no use for it in the skin).

      Adding this in a point release (2.1) instead of a maintenance release (2.0.4) because the API is changing.

        Attachments

        1. branch.patch
          7 kB
          Roger Lee Whitcomb

          Activity

            People

            • Assignee:
              rwhitcomb Roger Lee Whitcomb
              Reporter:
              rwhitcomb Roger Lee Whitcomb
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: