Oki DZ wrote:
>
> On Fri, 29 Sep 2000, Nissim Karpenstein wrote:
> > Is there a way to make multiple screens that require the same WM context
> > without making multiple jave files? Like for example, I have a company view
> > screen and a company edit screen, and they both need to put a company object
> > in the context. Is there a way that I can tell CompanyView.wm and
> > EditCompany.wm to both use Company.java?
>
> I still have a problem in automatically displaying WM templates without
> defining the Screen in the URL; what I always do:
> DynamicURI uri = new DynamicURI(data, "MyWMScreen")
> .addPathInfo("template", "MyWMScreen.wm");
> //uri.toString() would become
> //http://localhost/servlet/Turbine/screen/MyWMScreen/template/MyWMScreen.wm
>
> On your case, you can do:
> DynamicURI companyView = new DynamicURI(data, "Company")
> .addPathInfo("template", "CompanyView.wm");
> DynamicURI editCompany = new DynamicURI(data, "Company")
> .addPathInfo("template", "EditCompany.wm");
>
If you are using the default Template*SessionValidator's the Screen
value in the above url's will be ignored. The TurbineTemplateService
will look for Screens: CompanyView.class and EditCompany.class to use
with the respective templates and if it does not find the appropriate
one it will look for Default.class.
It is intended that the Default Screen can be used to generate a context
for multiple templates. If a set of templates has a common Context,
place them all in a common directory, foo, then define a screen within
the package ...screens.foo.Default, it will then set the context for all
the templates in that directory that do not have a better matching
Screen.
You can do as suggested above, but you will have to modify the
SessionValidator and make sure you do not care if people hack the urls
to show a template with a different context - Security Alert!
John McNally
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]