Beehive
  1. Beehive
  2. BEEHIVE-760

selected tree item getting set after the selectionAction is run

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: V1Alpha, V1Beta
    • Fix Version/s: None
    • Component/s: NetUI
    • Labels:
      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.

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

        Activity

        Krista Baker created issue -
        Krista Baker made changes -
        Field Original Value New Value
        Attachment index.jsp [ 20211 ]
        Attachment Controller.jpf [ 20210 ]
        Carlin Rogers made changes -
        Fix Version/s V1 [ 10780 ]
        Fix Version/s TBD [ 10950 ]
        Carlin Rogers made changes -
        Attachment j760javadoc.txt [ 20228 ]
        Carlin Rogers made changes -
        Assignee Carlin Rogers [ crogers ] Rich Feit [ rich ]
        Rich Feit made changes -
        Assignee Rich Feit [ rich ] Carlin Rogers [ crogers ]

          People

          • Assignee:
            Carlin Rogers
            Reporter:
            Krista Baker
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development