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

WizardCommandController must not cache initialized commands

XMLWordPrintable

      Some Wizards call UIBuilder.add() in the initializeUI method with a specific condition.
      eg:

      JPASetupConnectionStep
         @Override
         public void initializeUI(UIBuilder builder) throws Exception
         {
            UIContext uiContext = builder.getUIContext();
            PersistenceContainer pc = (PersistenceContainer) uiContext.getAttribute(PersistenceContainer.class);
            initDBType(uiContext);
            initDatasourceName(uiContext);
            initPersistenceUnitName(builder);
            builder.add(dbType);
            if (pc.isJTASupported())
            {
               builder.add(dataSourceName);
            }
            else
            {
               builder.add(jdbcDriver).add(databaseURL).add(username).add(password);
            }
         }
      

      Therefore, the WizardCommandController shouldn't cache initialized UICommands, since the added fields may differ.

      This impacts in the navigation UX, in the fact that already typed information is lost when the previous button is called. One solution would be to re-initialize a different command, and compare if the inputs provided differ from the original initialization.

              rhn-support-ggastald George Gastaldi
              rhn-support-ggastald George Gastaldi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: