# Loading resources into ResourceWorkspace

**URL:** <https://forum.inductiveautomation.com/t/loading-resources-into-resourceworkspace/5197>\
**Category:** Module Development\
**Created:** [September 26, 2012, 4:16pm UTC](https://forum.inductiveautomation.com/t/loading-resources-into-resourceworkspace/5197 "2012-09-26T16:16:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [September 26, 2012, 4:16pm UTC](https://forum.inductiveautomation.com/t/loading-resources-into-resourceworkspace/5197/1 "2012-09-26T16:16:43Z")

</div>

I’m creating new tree nodes for my resources in the project browser hierarchy. I have registered a ResourceWorkspace implementation using DesignerContext.registerResourceWorkspace() and setup AbstractNavTreeNode.getWorkspaceName().

This all works correctly, my workspace is activated when any of my nodes are selected. However, it is not obvious where or when I am supposed to load the resource data into the workspace. Are there any prescribed hooks for this or is it up to me?

The only way I can think to do this at the moment is to leave a workspace pointer somewhere that the tree nodes can see and then use onSelected() to trigger an update on the workspace. Doing this by hand seems counter-intuitive given that there is a mechanism for selecting the workspace automatically. I would actually expect the opposite.

I don’t need to deal with a tabbed interface or multiple resources- I just need a view that allows editing of a single selected resource. If another resource is selected before the first one is saved any changes may be simply thrown away.

I’m sure I am missing something. Any pointers greatly appreciated.

Thanks.
