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

Forge fails to assign values to UIInputMany instances

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.7.1.Final
    • 2.7.0.Final
    • UI - Shell
    • None

      When I have a UIInputMany instance like so:

         @Inject
         @WithAttributes(label = "Content Type", defaultValue = MediaType.APPLICATION_JSON, required = true)
         private UIInputMany<String> contentType;
      

      with an auto-completor configured as:

            contentType.setCompleter(new UICompleter<String>() {
                @Override
                public Iterable<String> getCompletionProposals(UIContext context, InputComponent<?, String> input, String value) {
                    List<String> options = new ArrayList<>();
                    options.add(MediaType.APPLICATION_XML);
                    options.add(MediaType.APPLICATION_JSON);
                    return options;
                }
            });
      

      then, when I execute a command that contains the UIInputMany field, the value entered by the end-user to the named parameter is not assigned to the component, resulting in an error:

      [demo]$ rest-generate-endpoints-from-entities --targets org.demo.model.Customer --contentType application/oml 
      ***ERROR*** Content Type must be specified.
      

              vineet.reynolds_jira Vineet Reynolds (Inactive)
              vineet.reynolds_jira Vineet Reynolds (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: