controller.overrideServerName()

I need a method like

forms.form1.controller.overrideServerName("server2")

I need this because I have created a module (mod_valuelist) for editing value lists. The values for the value lists are stored in the database. I have just used the module in the solution1.

Now I am going to create solution2. I wanted to use the same module (mod_valuelist) in the solution2 as well. But the forms in the mod_valuelist module are linked to the server1 of solution1.

Currently if I want to use the mod_valuelist for the solution2, I must duplicate it to a different name & use it in the solution2. Since solution1 & solution2 are going to use exactly the same copy of mod_valuelist I do not want to have duplicate copies of the module. I want to use the same module for both the solutions.

That’s why I suggest the above method to be added.
This can work similar to the following method (if you have real restrictions):

application.overrideStyle(String, String)

That is, controller.overrideServerName() must be called on the solution startup if it needs to be. If it can be called at any time that would be really really GREAT.

I think this feature is quite urgent for me. I want this to be in high priority

Thanks a million

I don’t understand this. Why don’t you have a server connection called “value lists”? If you want to use that module in a completely different solution that has a completely different database, you simply change the connection info of “value lists” (without touching its name) and you are done. That is one of the great abilities of Servoy that the database behind it doesn’t really matter as long as there is a JDBC driver. All Servoy knows is a connection name.

Am I misunderstanding something?

I can have a new connection for “valuelist”. But with your suggestion I can have only one solution running properly with the valuelist module. In my development machine I could be developing multiple solutions for different customers and I wanted to test it simultaneously without modifiying the “valuelist” connection info.

But then you could simply duplicate your “value_list” connection and name the one you don’t need “value_list_unused”?

I need both the solution to use the same module and I want them to be running at the same time. I do not want to touch the connection info everytime when I wanted to work with another solution.

Any response from SERVOY people would be MUCH appreciated.

Atleast is it possible that we can set the connection info during the solution startup.

some thing like application.setConnectionInfo(“connection1”, …, …)

similar to application.setValueListItems()

Thanks

are you developing in one developer at multiply solutions for multiply customers at once?

You could have one property file per customer and then start the developer with differnet property files (pointing to the right servers under the same name)