GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Weirdness when setting multiple-choice input options dynamically · Issue #470 · scijava/scijava-common

Weirdness when setting multiple-choice input options dynamically #470

New issue
Copy link
New issue
Copy link
Open
Open
Weirdness when setting multiple-choice input options dynamically#470
Copy link

Description

@ctrueden
ctrueden
opened on Sep 11, 2023
Issue body actions

From a Zulip topic by @emilmelnikov:

In the following example, target should be a dropdown list populated with values derived from other inputs when they change, but target renders as a normal text field.

public class SampleCommand extends DynamicCommand {
    @Parameter(label = "Input", callback = "inputChanged")
    String input;

    @Parameter(label = "Target", style = "listBox")
    String target;

    void inputChanged() {
        MutableModuleItem<String> item = getInfo().getMutableInput("target", String.class);
        item.setChoices(Arrays.asList("one", "two", "three"));
    }
}

It works when choices = {" "} is passed to @Parameter with listBox. Note the single space: passing an empty string results in NullPointerException.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.