Hi all,
I was looking at an old API (
http://vsys-www.informatik.uni-hamburg.de/documents/docs/turbine/
) so I didn't realize there was a setScreenTemplate in RunData. It
works ok now but I have a question-
What is the difference between Screen Template and Screen? What is the
difference between a layout and a layout template?
Thanks,
Mark Glass
Jason van Zyl wrote:
> Mark Glass wrote:
>
>> I have adapted the new app application to examine the users role and
>> select a different screen according to the users role. (Actually I want
>> to change the screen color depending on the users role).
>> I created two new screens called BlueIndex.vm and GreenIndex.vm. by
>> copying Index.vm in the Screens directory. I then added the following code
>
>
>
> I changed a couple things, the sample app might be a bit out of date.
> If you are dealing with templates then you always use the RunData
> methods
> that deal with templates:
>
>> public void doBuildTemplate( RunData data, Context context )
>> {
>> context.put("entries", getEntries());
>> if ( data.getACL ().hasRole ("accounting") )
>> {
>> // Set the template, the layout will automatically be matched up.
>> data.setScreenTemplate("GreenIndex.vm");
>> }
>> else if ( data.getACL ().hasRole ("development") )
>> {
>> data.setScreenTemplate ("BlueIndex.vm");
>>
>> }
>> }
>>
>> to the Index class in the package org.mycompany.newapp.modules.screens.
>>
>> For some reason the default screen is always chosen. Why? How can I make
>> this happen?
>>
>> Thanks,
>> Mark Glass
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>