1 Reply Latest reply on May 15, 2016 5:18 PM by George Gastaldi

    uiselectmany on command line?

    John Franey Novice

      I don't understand UISelectMany with class names.

       

      My addon defines a ui component for a class selection as such:

       

      @Inject

      @WithAttributes(label = "targets", required = true, type = InputType.JAVA_CLASS_PICKER);

      private UISelectMany<JavaResource> targets;

       

      All other ui properties are optional.

       

      In case it matters, in initializeUI I scan for qualified classes and add them to 'targets' with:

       

      targets.setValueChoices(someCandidateClasses>);

       

      The intention of the above is for the select-list to be pre-populated.

       

      Then, at runt time, I use forge command line:

      <my addon's command> --targets org.example.library.rest.LibrarianRR

       

      And it prompts, as follows, note that option [1] is not already selected.

       

      ***INFO*** Required inputs not satisfied, entering interactive mode

      [0] ( ) org.example.library.book.model.BookRR

      [1] ( ) org.example.library.rest.LibrarianRR

       

      Press <ENTER> to confirm, or <CTRL>+C to cancel.

       

      I would like to pass a class name for 'targets' UISelectMany in the command line....and skip the interactive mode.  I don't want to be prompted after I specify a target on the command line.

       

      Thanks,

      John