Bookshelf Home | Contents | Index | PDF |
Configuring Siebel eBusiness Applications > Overview of Web Templates and Siebel Tags > About Siebel TemplatesA Web template is a file that contains markup tags (HTML, WML, XML, and so on) interspersed with Siebel tags (prefixed by "swe"). Siebel Web templates define the layout and formatting of the user interface (such as views, applets, and controls). Web browsers require HTML to define the layout and formatting of a page. Siebel Web templates provide this HTML layout information to the Siebel Web Engine when rendering Siebel objects in the repository definition of the application. Wireless applications are rendered in the same manner except for the fact that the markup language in the templates is WML or XML. This section focuses on the configuration of Web (HTML) applications, but many of the concepts are generic across markup languages. Templates are filled with data and user interface elements by associating views, applets, controls, and other objects defined in Siebel Tools with them. Each view, applet, or control, is mapped to a placeholder in the template. For example, you may have a View object with three applets. You associate a View Template with the view, and map each applet to a placeholder in that template. An important feature of Siebel Web Templates is that they can be shared between many objects in the repository. Because a template has only placeholders, any number of repository objects can be mapped to a specific placeholder. This allows you to propagate style or structural changes to numerous user interface elements by changing only one template. A typical Web application will contain on the order of 5-50 templates, which together form the bases for several hundred views and applets. For instance, a template which defines the layout and formatting of a standard list applet can be shared among all list applets repository definitions in an application. The reusability of templates is further enhanced in that the Siebel Web Engine skips over template placeholders which are not mapped in the repository. If a placeholder is not mapped, then it and the HTML contained in between the Siebel tags that define the placeholder are simply ignored. Thus, if the template contains layout for a 10-column wide list applet, but only 2 of the columns are mapped, the other 8 are simply ignored. Siebel applications provide numerous applet and view templates with the product, which are extremely flexible; you may not have to modify any of the applet and view templates to support your migrated application. However, in some cases (especially customer and partner applications) you may wish to modify the default templates to reflect your corporate look and feel, or, in some cases, create an entirely new template. Siebel templates must use valid HTML. Adding JavaScript beyond what is already generated by the Siebel Web Engine is not recommended. If it is necessary to add JavaScript, it should be done in Siebel Tools using Browser Script. NOTE: You can view Web templates using Siebel Tools, but you modify templates using an external editor. For more information about using Siebel Tools to view Web templates, see Using Siebel Tools. To allow for even greater flexibility, Siebel eBusiness Applications have provided a mechanism in which a particular template file can include another one. This device is used, for example, to separate handling of the title of an applet from the body. A standard applet layout can be defined once and combined with multiple different title layouts by including a template file that defines the title within the applet template. By convention, the filenames of Siebel Templates take the .SWT extension; for example, CCPageContainer.SWT, CCHomePageView.SWT, and so on. This Siebel-suggested convention is an abbreviation for Siebel Web Template. You do not have to follow this convention; the Siebel Web Engine recognizes and interprets the files correctly regardless of how you name them. However, ending your Siebel filenames with .SWT may help you. NOTE: Template files are typically stored in the Web Template directory under your Tools installation directory. The Filename property references the Web Template object type. The layout and style of HTML Web pages is dynamic, which allows simultaneous support for multiple browser types and versions. Siebel Web templates support conditional branching. Conditions are evaluated based on the results of a business service. How SWE Generates HTML FilesAfter you configure your application and deploy it on your Web site, it becomes available for viewing through a client's browser. When a client requests a specific view (either through the application URL directly or by clicking the appropriate link from within another page), the Siebel Web Engine does the following:
When the user views the generated HTML file in a Web browser, it is rendered as a Web Page, and includes all the layout specified in the original template as well as the data and controls retrieved. Figure 124 shows how Siebel Web Engine generates HTML output using templates, repository definitions, and HTML. Types of TemplatesThe templates fall into one of several groups, depending on the purpose of the template or what the template contains.
NOTE: New and Query should only be used if they are different from Edit. Otherwise, Edit is used.
Your application can contain other pages, of course, that do not contain any Siebel tags. For example, you may have an About This Application help page. However, this page, by definition, is not a template. |
Configuring Siebel eBusiness Applications |