





















































Read more about this book |
(For more resources on this subject, see here.)
Lots of administrators will not have access to JDeveloper, but they will need to manage navigation models. In WebCenter, you can easily create and manage navigation models at runtime.
In this recipe, we will show how you can add navigation models at runtime.
For this recipe, you need a WebCenter Portal application.
The navigation model is now created and you can add components to it.
When you add a navigation model at runtime, an XML file will be generated in the background. The navigation model will be stored in the MDS. You can request the path to the actual xml file by selecting Edit properties from the Edit menu when you select a navigation model. In the properties window, you will find a field called Metadata file. This is the complete directory to the actual XML file.
Even at runtime, you can modify the actual XML representation of the navigation model. This allows you to be completely flexible. Not everything is possible at runtime, but when you know what XML to add, you can do so by modifying the XML of the navigation model. This can be done by selecting Edit Source from the Edit menu. This way you will get the same XML representation of a navigation model as in JDevleoper.
A folder is the simplest resource you can add to your navigation model. It does not link to a specific resource. A folder is only intended to organize your navigation model in a logical way.
In this recipe, we will add a folder for the HR resources.
We will add the folder to the default navigation model so you only need the default WebCenter Portal application for this recipe.
Adding a folder to a navigation model will add a folder tag to the XML with the metadata specified:
<folder visible="#{true}" id="hr">
<attributes>
<attribute isKey="false"
value="folder" attributeId="Title"/>
</attributes>
<contents/>
</folder>
The folder tag has a contents tag as a child. This means that when you add a resource to a folder, these will be added as a child to the contents tag.
You can also add a folder at runtime to a navigation model. This is done by selecting your navigation model and selecting Edit from the Edit menu. From the Add menu, you can select Folder. You are able to add the id, description, visible attribute and iconUrl.