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

Forge UI should not call UICommand.validate() if required inputs are not populated

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.11.0.Final
    • 2.10.1.Final
    • UI - API
    • None

      This command:

      public class WindupWizard implements UIWizard, UICommand
      
          @Inject
          @WithAttributes(label = "Input", required = true, description = "Input File or Directory (a Directory is required for source mode)")
          private UIInput<FileResource<?>> input;
      
          @Override
          public void validate(UIValidationContext context)
          {
              FileResource<?> inputValue = this.input.getValue();
              File inputFile = inputValue.getUnderlyingResourceObject();
      

      Results in an NPE when the command is called using guided execution:

      [Desktop]$ windup-migrate-app 
      Exception when parsing/running: windup-migrate-app , null
      [Desktop]$ 
      

              rhn-support-ggastald George Gastaldi
              lincolnthree Lincoln Baxter III (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: