Eric,

I had thought about the idea of using a pull tool to somehow extract the
screen template I was using and have a lookup for the title that goes with
it, but not very elegant.

I have added these to my own application properties file.

# -------------------------------------------------------------------
#
#  The roles of the users of rwTransformer are shown here
#  These are as found in the Turbine_Role table
#  They are used to select the layout used
#  The roles.directory values must follow the same ordering of roles
#  property values
#  The values represent the directories under which actions and
#  screens the different roles are allowed access to.
# -------------------------------------------------------------------
roles=Administrator, Extract User, Message User
role.directory=Admin, ExtractUser, MsgUser


# -------------------------------------------------------------------
#
#  The layouts used for the different user roles
#  Property values must be in the same order as the roles above
# -------------------------------------------------------------------
role.layout=/Admin/Default.vm, /ExtractUser/Default.vm, /MsgUser/Default.vm

These are used by my SecureAction and SecureScreen implemetations to
determine the layouts based on role and directories specific to the roles.

I suppose I could add the titles specific to the screens in the properties
file too, but it is not as compact as this as there are few roles in the
system and quite a lot more screens.

regards

David

-----Original Message-----
From: Eric Dobbs [mailto:[EMAIL PROTECTED]]
Sent: 16 April 2002 18:26
To: Turbine Users List
Subject: Re: Using VelocityOnlyLayout is there a way to setTitle?


On Tuesday, April 16, 2002, at 10:42  AM, David Wynter wrote:

> You are missing the point. I have one layout template,
> .../app/layouts/Admin/Default.vm, for 12 screen classes. This enforces
> consistency of look and feel for a given role (Admin) using the system.
> Having $page.setTitle(..) was very powerful in this context. I see
> having to
> create 12 identical layouts with different names and one difference,
> that is
> title, as being poor architecture.

Now I get it.  I think this use case was part of the
ECS debate you mentioned.  As you've discovered, you
can only do that with ECS in the picture.  I know
you have returned to ECS, but for the sake of the
discussion I want to brainstorm some alternatives.

The first one that leaps to mind is to create a pull
tool for the common elements in your layout, instead
of using the layout.  So your screen templates could
use something like this:
$header.renderWithTitle("unique title for this page")

Of course, this doesn't cleanly separate the layout
from the screen:
<table>
<tr><td colspan="2">$header.renderFoo()</td><tr>
<tr><td>$leftBar.renderFoo()<td>
<td>
<!-- your screen goes here -->
</td>
</tr>
</table>

In Turbine 3, I understand the the pipeline is thought
to enable something of this nature, but I haven't even
looked at it, so I can't say how that will work.

-Eric

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to