FLUID-5023: Adding grade through demands for multiple instances of component treats default model incorrectly

Metadata

Source
FLUID-5023
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Anastasia Cheetham
Reporter
Anastasia Cheetham
Created
2013-05-22T11:08:11.876-0400
Updated
2014-03-03T11:51:44.729-0500
Versions
N/A
Fixed Versions
  1. 1.5
Component
  1. IoC System

Description

When a grade is added to a model component using a demands block and more than one instance of that component are created, the instances end up using the actual default model: modifications of one of the components model, using its applier, will modify the other component's model and the defaults for the component.

Test case:
https://github.com/acheetham/infusion/blob/FLUID-5023/src/webapp/tests/framework-tests/core/js/FluidIoCTests.js#L2438-L2476

Notes on the test case:
1) If you comment out the gradeNames in the demands block, the tests pass.
2) If you add the grade through the defaults instead of the demands, the tests pass.

Comments

  • Anastasia Cheetham commented 2013-05-22T11:12:45.627-0400

    This problem was discovered during the upgrade of the VideoPlayer to the latest Infusion: The Mammals test page instantiates three videoPlayers, and the problem occurred there.

  • Michelle D'Souza commented 2013-05-30T17:09:13.445-0400

    Merged into project repo at adf8f15415227832386ed3d6d92c8c1678a558c3