# Scope when extending forms \[SOLVED\]

**URL:** <https://forum.servoy.com/t/scope-when-extending-forms-solved/12905>\
**Category:** Classic Servoy\
**Created:** [September 21, 2010, 7:14pm UTC](https://forum.servoy.com/t/scope-when-extending-forms-solved/12905 "2010-09-21T19:14:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BulldogBen](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@BulldogBen](https://forum.servoy.com/u/BulldogBen)\
**Post date:** [September 21, 2010, 7:14pm UTC](https://forum.servoy.com/t/scope-when-extending-forms-solved/12905/1 "2010-09-21T19:14:41Z")

</div>

I’m using the very useful **extendsForm** property in order to create simple 2 tier navigation, allowing me to edit each navigational element in only one place. I am, however, having trouble organising my forms into modules because whereas I can extend a solution-level form with a form from a module, I cannot do it the other way round (or between modules).

For example I have a form called nav\_top containing the elements common to every form including the first level navigation buttons. I then have nav\_, nav\_ etc forms, each of which extends nav\_top and contains the 2nd level buttons. This gives a lovely setup, and so-far-so-good.

At the final form level, each form extends it’s appropriate parent (e.g. nav\_), which in turn extends the nav\_top form. I want to arrange my solution into modules like this…

Solution

- Login form
- nav\_top
- nav\_people
- nav\_account
- nav\_machine
- etc  
People module
- Add / Edit (extends nav\_people) _\< but I can’t do this_
- Search (extends nav\_people) _\< but I can’t do this either_
- etc.

I hope this makes sense, I really don’t want to have to put all my forms at one level.

---

<div class="post-metadata">

**Author:** ![BulldogBen](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@BulldogBen](https://forum.servoy.com/u/BulldogBen)\
**Post date:** [September 22, 2010, 12:20pm UTC](https://forum.servoy.com/t/scope-when-extending-forms-solved/12905/2 "2010-09-22T12:20:23Z")

</div>

Thanks to Rene from Ambitius, I have now solved this simply by specifying the module containing the templates in the moduleNames property of the module solution.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [September 22, 2010, 12:38pm UTC](https://forum.servoy.com/t/scope-when-extending-forms-solved/12905/3 "2010-09-22T12:38:54Z")

</div>

The concept of a module is that it can be standalone, it is a unit of stuff that has completely self sufficient.

So when you have

Solution A  
Module B

and solution A has module B as its module

then Solution A can access everything from module B

But module B cant access anything from Solution A. Because if i now open module B as the main solution it should also work.

So solution A can create a new Form that extends a form from Module B  
but Module B can never create a Form that extends a form from Solution A.

If you then say Module B has also Solution A as his module. Then the whole concept of a module is gone, Because what you just created is one big solution, that they are divided into modules doesn’t make much sense anymore  
because it is one big thing if you view them from the outside.

---

<div class="post-metadata">

**Author:** ![BulldogBen](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@BulldogBen](https://forum.servoy.com/u/BulldogBen)\
**Post date:** [September 22, 2010, 3:19pm UTC](https://forum.servoy.com/t/scope-when-extending-forms-solved/12905/4 "2010-09-22T15:19:32Z")

</div>

Thanks Johan, my overall solution is highly integrated with little distinction between modules, and they can’t operate independently of one-another.  
I’m therefore using modules purely to organise my development environment, I hope this makes sense?

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [September 23, 2010, 12:21pm UTC](https://forum.servoy.com/t/scope-when-extending-forms-solved/12905/5 "2010-09-23T12:21:02Z")

</div>

Yes, Ben, it makes sense to organize forms in modules, if only to ease navigation between them.  
In a team you would also have people dedicated to certain modules, being discrete part of a whole application.

And yes, Johan, it is one big solution if you had solution A as a module to module B, but it helps.  
That way, module B is not really a module but a ‘sub part’ of solution A.  
Still, when you have a solution with hundreds of forms all on the same level, it is a very handy way of keeping things organized.  
You will say that you can filter or ctrl+shift+L to find your forms, but if everything is at the same level which should work discretely as a whole, it’s like trying to work in Java with all your classes in the same package: I doubt you would like that either! ![:)]( "Smile")

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [September 23, 2010, 12:23pm UTC](https://forum.servoy.com/t/scope-when-extending-forms-solved/12905/6 "2010-09-23T12:23:29Z")

</div>

i get that  
but the thing is that modules are projects or jars in java…  
thats how they map. And also with for example Eclipse projects, circular references should be avoided.
