Unusual Databinded Name Conflict

Hey Fusers Crew,

As of v. 0.29.0 (build 8396) the below code will return me this build error: Names must be unique within each document scope. In this scope 'MainView' starting on MainView.ux line 1 the name '{name}' is already used for Text on line 18 -

	var Observable = require("FuseJS/Observable");
	function Obj(name, val) {
		this.name = name;
		this.text = val;

	exports.one = new Obj("first", "With element One");
	exports.two = new Obj("second", "With element Two");


		<With Data="{one}">
			<Text ux:Name="{name}" Value="{text}"/>

		<With Data="{two}">
			<Text ux:Name="{name}" Value="{text}"/>

When, if I recalled correctly, previously I’ve databinded ux:Name before, similarly and all worked fine, since the binded “{name}” is different and should logically resolve as unique.

Please take a look.



Hi, ux:Name must be a compile-time constant and can not be databound. You can however databind Name (without ux:) which is imply the runtime name of the object (not visible from JS).

Hi Anders,

Thanks for the reply back. Now I understand.
Anyhow, with Name, I am still getting an error:
ERROR: An item with the same key has already been added..



Hi Elizabeth, can you provide a bit more info on what you’re trying to do with these names? Perhaps there’s a better way to achieve what you’re trying to do and avoid these issues entirely.