Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1847

UIContext.getSelection() always return null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.6.0.Final
    • 2.5.0.Final
    • UI - Shell
    • None

      value.setDefaultValue(new Callable<JavaResource>() {
       @Override
       public JavaResource call() throws Exception {   
          Object selected = builder.getUIContext().getSelection();
          if(selected != null && selected instanceof JavaResource) {
             return (JavaResource)selected;
          }
          return null;
       }
      });
      

      Object selected is always null.

      Using InitalSelection works as expected.

      Object selected = builder.getUIContext().getInitialSelection().get();
      

              lincolnthree Lincoln Baxter III (Inactive)
              aslak@redhat.com Aslak Knutsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: