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

ClassCastException with CLAC when the attribute added to UIContext.setAttribute is an Enum

XMLWordPrintable

    • Hide
      • Open NewFieldWizard, go to line 239
      • Change
        context.setAttribute(RelationshipType.class,relationshipType.getValue().name());
        

        to

        context.setAttribute(RelationshipType.class,relationshipType.getValue());
        context.getAttribute(RelationshipType.class);
        
      • Install the addon and execute the New Field Wizard
      • Select a relationship and press next
      Show
      Open NewFieldWizard, go to line 239 Change context.setAttribute(RelationshipType. class, relationshipType.getValue().name()); to context.setAttribute(RelationshipType. class, relationshipType.getValue()); context.getAttribute(RelationshipType.class); Install the addon and execute the New Field Wizard Select a relationship and press next

      This was spotted in the NewFieldWizard when transitioning to NewFieldRelationshipWizardStep:

      RelationshipType enumValue = ...
      UIContext.setAttribute("value", enumValue);
      enumValue = (RelationshipType) UIContext.getAttribute("value")// CCE
      

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

                Created:
                Updated:
                Resolved: