In the process of developing web applications an important step is to handle the way the pages look. This is handled by different type of web resources: css, js, images, swf. The management of those web resources is done by using a web application called Resource Library.
Starting Resource Library
To start Starting the Resource Library is simply a matter of accessing the Workflow Builder URL and providing the workflow hookpoint as a parameter to that page, more specifically the URL is:
...
Property | Description |
---|---|
Name | Name of the resource. |
Type | The type of the resource. It can be Article, Template or other resource (Image, Item, Properties, CSS). |
References | The name of other resources that hold a reference to this resource. |
Version | The current version of this resource. |
Resource
...
Categories
1. Templates
The layout of the web pages follows the Template pattern. This way the layout and the design of the web page can be changed very easy. A template is a zk page that defines placeholders for different regions of the web page, regions that are defined in the framework as zones. In the figure below you can see a 4-region page: the header, the upper-left menu, the lower left menu and the center.
Figure 3. Template with 4-zones zone layout.
Template
...
Actions
To *add* a template the user has to:
...
Notes: Template names have to be unique. A Template can contain any zkoss markup plus CDRator templates special tags (labels, conditions, blocks)
2. Articles
These are static zkoss ZKoss scripts that are used to fill the zones in a template. They fit as tiles in the layout and can easily be changed, thus changing the page looks and functions. Below there is an article example.
...
Figure 4. Article example - can be used for the header zone.
Article actions
To add an article the user has to:
...
Notes: Article names have to be unique. An Article can contain any zkoss markup plus CDRator templates special tags (labels, conditions, blocks)
3. Other Resources
A web page can contain some other resources as css, images, swf, property files and so on. The framework handles those resources by uploading them into the database and represents them in Resource Library using a folder-like structure (figure 5). The first level under Resources folder must be the context of the web application that is using those resources.
...
Figure 5 depicts a setup for 2 web applications: workflow-builder (that is running under http://<HOSTNAME>:<PORT>/workflow-builder/) and selfcare-web (that is running under http://<HOSTNAME>:<PORT>/selfcare-web/). If the context of these applications changes, then corresponding resource folder has to be renamed accordingly.
Other Resources
...
Actions
To add an folder to the resource hierarchy the user has to:
...
- have a folder under Resources\<WEBAPP> selected from the left menu of the Resource Library (see figure 2)
- click on Add button (see figure 2). In the upload dialog that opens (figure 6), the user has to choose a file to upload and click OK. The type of the resource is automatically detected but it also can be changed by the user at upload time.
Figure 6. Upload resource item window
...
Other actions like Preview, Copy/Cut/Paste and Show revisions are available for resources as convenient actions.
Prerequisites
To use the Resource Library, authentication is performed so valid operators are required.
The resource library runs in a browser so check the supported browser list at http://confluence.cdrator.com/display/cdrwf/Supported+Platforms.