# Fuse.Controls.Page already has a parent

**URL:** https://forums.fusetools.com/t/fuse-controls-page-already-has-a-parent/4910
**Category:** Bug Reports
**Created:** [December 15, 2015, 3:42pm UTC](https://forums.fusetools.com/t/fuse-controls-page-already-has-a-parent/4910 "2015-12-15T15:42:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Enguerran\_Henniart](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@Enguerran\_Henniart](https://forums.fusetools.com/u/Enguerran_Henniart)
#### Post date: [December 15, 2015, 3:42pm UTC](https://forums.fusetools.com/t/fuse-controls-page-already-has-a-parent/4910/1 "2015-12-15T15:42:36Z")

</div>

Hi,

when we have a `PageControl` whose pages are dynamic (with `Each`) and a binding for the Active page, the apps fails with :

`Fuse.Controls.Page already has a parent`

Here is my code :

MainView.ux

```auto
<App Theme="Basic" Background="#eeeeeeff">
    <JavaScript File="MainView.js" />
    <DockPanel>
        <PageControl Active="{currentPage}">
            <Each Items="{pages}">
                <Page Name="{name}">
                    <Rectangle>
                        <Text Value="{name}" />
                    </Rectangle>
                </Page>
            </Each>
        </PageControl>
    </DockPanel>
</App>
`

```

MainView.js

```auto
var Observable = require('FuseJS/Observable');

var pages = Observable();
pages.add({
    name: 'page1'
});
pages.add({
    name: 'page2'
});
pages.add({
    name: 'page3'
});

var currentPage = Observable('page2');

module.exports = {
    pages: pages,
    currentPage: currentPage
};

```

A possible workaround is :

```auto
var currentPage = Observable();

setTimeout(function() {
    currentPage.value = 'page2'
}, 1000);

```

but it easily becomes very tricky when the app is a little more complex.

Thanks !

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [December 15, 2015, 4:14pm UTC](https://forums.fusetools.com/t/fuse-controls-page-already-has-a-parent/4910/2 "2015-12-15T16:14:14Z")

</div>

Hi, Thanks for reporting this problem. We’ll take a look!

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [December 15, 2015, 4:46pm UTC](https://forums.fusetools.com/t/fuse-controls-page-already-has-a-parent/4910/3 "2015-12-15T16:46:02Z")

</div>

We’ve found a race condition, and it will be fixed in an upcoming release.

Thanks again for the test case, which made the problem easy to isolate 🙂

---

<div class="post-metadata">

### Author: ![Enguerran\_Henniart](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@Enguerran\_Henniart](https://forums.fusetools.com/u/Enguerran_Henniart)
#### Post date: [December 15, 2015, 4:48pm UTC](https://forums.fusetools.com/t/fuse-controls-page-already-has-a-parent/4910/4 "2015-12-15T16:48:25Z")

</div>

Wow that was fast 😛

Perfect thanks !

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [December 22, 2015, 12:56pm UTC](https://forums.fusetools.com/t/fuse-controls-page-already-has-a-parent/4910/5 "2015-12-22T12:56:18Z")

</div>

Should be out now in 0.9.5 🙂

[https://www.fusetools.com/downloads/channel/qa](https://www.fusetools.com/downloads/channel/qa) (now)

[https://www.fusetools.com/downloads/](https://www.fusetools.com/downloads/) (in a few hours)
