New feature: ComputedPage tag
For a long time I have been wanting to add this feature to Tornado Server. One of the things I really like about Lotus Domino is the ability to easily build a web page based on components. We supported the <P@Page PageName @P> tag from day one, but this didn't give any great flexibility because this is a static include. Imagine you have a menu panel in your web page that you would like to show different options depending on the rights or role of the person viewing the page. Computed pages make this very easy.
<P@ComputedPage name="pgMenu" value="StandardMenu" @P>
With no additional work, this will pull in a page called "StandardMenu" at runtime and insert it in place of the p-tag. Great. This is the same functionality as the <P@Page @P> tag.
Now, if the page is viewed by an administrator, in your action code you can write:
if(pSession.hasUserRole("Admin")) ActionDocument.setItemValue("pgMenu", "AdminMenu");
Presto! the component is swapped for the "AdminMenu" page.


Comment posted by chris on 2005-07-28 00:17:56.0 |