Dynamic ContainerProvider / desktop layout ?

Hello,

I have a Organization based desktop, and would like to be able to choose the container (i.e desktop layout, etc.) at run-time.

To do this it seems the best way would be to create a custom ContainerProvider (extending ContainerProviderProfileAdapter) which would do nothing else than

be a client (via getContent()) to another container (assumedly pre-built, e.g. JSPTab/Table, etc.). The other container (which does the actual work)

is selected from on a request parameter.

I know some built-in containers e.g JSPTabContainer can reference other containers, but how would I do this from my custom code?

I read that providers can't reference eachother because each provider has its own classloader to allow provider updates at runtime.

I also thought of creating a modified JSPTabContainer where the tabs are invisible (removed from the JSPs), but that does not seem right, or perhaps it is?

Any info is greatly appreciated!

Thank you,

JF

[1021 byte] By [puzzled_developer] at [2007-11-25 19:43:44]
# 1
- at which point of time do you want to switch ?- what's the trigger to switch ?/u
UlfFeger at 2007-7-4 12:54:05 > top of Java-index,Web & Directory Servers,Portal Servers...
# 2

Hello Ulf,

The switch would occur instantaneously from a parameter on the request, i.e. the custom container is only a router to one of possibly many other containers. The router does not display anything, but merely forwards the request to the appropriate container.

I found a section in the Developer guide giving instructions on implementing a RouterContainerProvider, but that container has a display of its own, which seems to be more work than I would expect. I am hoping to make it as simple as possible, i.e. only write the code which selects the container -- should I do this in getContent() and if so, how do I reference the other containers, or in a JSP using a custom tag?

Thanks for your help,

JF

puzzled_developer at 2007-7-4 12:54:05 > top of Java-index,Web & Directory Servers,Portal Servers...
# 3

To add to my pervious reply, there is no switch triggered by the user -- a request parameter, tells the custom container which actrual container to use. A possible scenario is:

user logs in from site A -> router delegates to container X.

User logs in after 4:00 PM from site B --> container delegates to container Y.

The idea is that the desktop is configured based on runtime-only values as well as LDAP contents.

Thank you,

JF

puzzled_developer at 2007-7-4 12:54:05 > top of Java-index,Web & Directory Servers,Portal Servers...
# 4
I think I figured it out -- using the ProviderContext and ContainerProviderContext, getContent() and getProvider() methods, etc., there should be a way to do this easily I will post my next QUESTIONS/finding. I would welcome any comments/suggestions.Thank you -- JF
puzzled_developer at 2007-7-4 12:54:05 > top of Java-index,Web & Directory Servers,Portal Servers...