FLUID-5200: In composite panels, radio button id rewriting has problems

Metadata

Source
FLUID-5200
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
N/A
Reporter
Anastasia Cheetham
Created
2013-10-30T14:43:26.283-0400
Updated
2013-11-07T15:05:39.992-0500
Versions
N/A
Fixed Versions
  1. 1.5
Component
  1. Prefs Framework

Description

The ids of components get the 'pref name' prefixed; for a radio button, the "rowId" would become "pref_name_rowId", but the relativeParentID doesn't get this prefix, so it is "..::rowId" instead of "..:: pref_name_rowId". The search for the parent is unsuccessful, and the rendering of the radio buttons fails.

I discovered this issue while implementing some composite panels in order to document the process. The code that illustrates the issue can be seen in my branch:
https://github.com/acheetham/infusion/tree/PFID

To reproduce the issue:

1) Check out the branch

2) Edit Open src/instructionalDemos/framework/preferences/compositeSchemas/js/composite.js to
a) un-comment the "radioTest1" block of the auxiliary schema:
https://github.com/acheetham/infusion/blob/PFID/src/instructionalDemos/framework/preferences/compositeSchemas/js/composite.js#L152-L163
b) un-comment the reference to radioTest1 in the composite2 group
https://github.com/acheetham/infusion/blob/PFID/src/instructionalDemos/framework/preferences/compositeSchemas/js/composite.js#L190

3) Open src/instructionalDemos/framework/preferences/compositeSchemas/index.html in your browser, watching the console

You will see the following error in the console:

ASSERTION FAILED: Error in component tree - UISelectChoice with id learning_radioTest1_frequencyRow::learning_radioTest1_frequencyInput has parentRelativeID of ..::frequency-radio which cannot be resolved

The reference to the parentRelativeID has not been re-written to include the "learning_radioTest1_" prefix, and so it can't be found.

Comments