Using the Visitor Tools
Adding Visitor Tools to a Custom Application
Adding Visitor Tools to a New Portal Application
WebLogic Portal Platform Edition installs with a pre-built portal application called sampleportal, which includes, a set of JavaServer Pages (JSPs) that enable visitors to set properties on personalized views of the portal.
Use the following procedure to add these visitor tools to a new portal application, which can then be customized.
- In the native file system, copy the following directories inclusively:
- Copy the entire com/bea/jsptools/portal directory from the WEB-INF/classes directory in sampleportal into the WEB-INF/classes directory of the new Web application.
- Copy the entire com/bea/jsptools/portal directory from the WEB-INF/classes directory in sampleportal to the WEB-INF/classes directory of the new Web application.
- Copy the entire visitorTools directory from the sampleportal directory in portalApp to the Portal Project directory of the new Web application.
- In WebLogic Workshop Platform Edition, open the new Portal application.
- In the Portal Designer, select the main book.
Figure 2-1 Select Main Book
- In the Properties Designer, set the Editable property to Edit in Menu. The Mode Properties heading is added to the available properties.
- Click on the Content URI and browse to the /visitorTools/visitorTools.portion file.
- The three JSPs inside the visitorTools directory, visitorToolsMain, visitorToolsEditPage, visitorToolsEditBook, contain a reference to a javascript file called dialog.js in the sampleportal application. Edit the source for each of these files, changing the path to refer to the new location of this file.
Change this:
<script language="JavaScript" src="/sampleportal/visitorTools/dialog.js" type="text/javascript"></script>
to this:
<script language="JavaScript" src="/<yourNewPortalProject>/visitorTools/dialog.js" type="text/javascript"></script>
- When this portal runs, (not in development mode, but in a live desktop) the edit icon will appear on the main book. Clicking this icon takes the user to the Visitor Tools.
Note: The Visitor Tools JSPs only work when the portal server is running, and must be accessed by a user logged into the desktop.