To apply different templates to the same element, create the xsltinfo.properties file and populate it with new template and user information.
This file should have the following content and structure:
<userid>.<application id>.ui=<xslt file> <userid>.<application id>.content=<xsl file>
where:
userid – is the login name of the user.
application id – is the ID of the application for which you want to specify a user-specific UI or content XSLT. To determine an application’s ID:
In Mobile Web Studio, select Build | Applications, then select Approved from the Application Manager Status Menu. Right-click the XML_sample application in the detail view and select Properties.
When the Application Properties window displays, write down the ID value, then click Close.
content or UI file – enter the user-specific template for the application.
For example, to set up the file for the XML_sample application, enter this information:
bob.231.ui=pink_ui_xslt cindy.231.ui=green_ui_xslt
where pink_ui_xslt is the name of the presentation file for Bob, and green_ui_xslt is the name of the presentation file for Cindy.
Place the xsltinfo.properties file in the %UnwiredAccelerator70%\tomcat\webapps\onepage\config directory if you are using Tomcat. If you are using EAServer, place the file in the %JAGUAR%\Repository\WebApplication\onepage\config, then restart EAServer.
When each user that is specified in xsltinfo.properties adds the XML_sample page to their portal view, Bob will see the XML_sample application with a pink background and Cindy will see the XML_sample application with a green background.
To create user-specific content, follow the same procedures in this section, but create a new content template and specify the two different content files in the xsltinfo.properties file; for example:
bob.231.content=moreover_content_xsl cindy.231.content=new_content_xslt
You can also provide different presentation and different content for different users in this file.
bob.231.ui=pink_ui_xslt bob.231.content=moreover_content_xsl cindy.231.ui=green_ui_xslt cindy.231.content=new_content_xslt
The first time you create xslt.properties, you must shut down and restart EAServer to initialize the user-specific settings. When you make additions, changes, or deletions to the file the portal is updated automatically with the new information; that is, you do not need to restart the application server
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |