Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-760

selected tree item getting set after the selectionAction is run

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • V1Alpha, V1Beta
    • None
    • NetUI
    • None

    Description

      TreeRootElement getSelectedNode() and TreeHelpers findSelectedNode(TreeElement root) are both a selection item behind the currently selected item.

      Example tree:
      Item0
      Item0.0

      JPF code snippet:
      TreeRootElement myTree;
      TreeHelpers myHelper;

      @Jpf.Action(forwards =

      { @Jpf.Forward(name = "success", navigateTo=Jpf.NavigateTo.currentPage) }

      )
      protected Forward selectionAction()

      { TreeElement selected = myHelper.findSelected(myTree); System.out.println("SELECTED: " + selected.getName()); return new Forward("success"); }

      Repro steps with above snippets:
      1) If I click on Item0, the println is null and an error/warning is given
      2) If I then click on Item0.0, the following will be printed:
      SELECTED: 0
      3) If I click on Item0.0 again, the following will be printed:
      SELECTED: 0.0
      Continue clicking and you will notice that the printed out selectedItem from the selection action is always one selection behind what was actually clicked.

      Attachments

        1. j760javadoc.txt
          2 kB
          Howard Carlin Rogers
        2. index.jsp
          0.6 kB
          Krista Baker
        3. Controller.jpf
          5 kB
          Krista Baker

        Activity

          People

            crogers Howard Carlin Rogers
            kbaker Krista Baker
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: