Bookshelf Home | Contents | Index | PDF |
Configuring Siebel eBusiness Applications > Specialized Behavior Supported by Web Templates > Creating Custom HTML Control TypesSiebel applications support the use of several different control types (for example, Check Box, Button, Mail To, Text Area, and so on). However, you may also require additional HTML types. You can define your own HTML types by adding type definitions to the .SWF file. Unlike cascading style sheets, which are used primarily to define general stylistic information about labels, titles, background colors, and so on, user-defined types in the CCHTMLTYPE.SWF file would normally be used to define more complex attributes that determine either the appearance or client-side functionality of a type of HTML element. Examples might include a button type that is associated with a particular GIF or a type of link that connects the user with an FTP site. Again, these attributes could also be given to a page element by specifying the appropriate tags and attributes directly in the .SWT file. However, by defining them as types within the CCHTMLTYPE.SWF file, they can be referenced from within Siebel Tools for a specific control on a specific Applet Web Template or Web Page object. This preserves the generality of .SWT templates by avoiding the need to place HTML directly within them. It also improves the maintainability of the application by minimizing customization done to templates and storing more configuration information within the repository. NOTE: Custom control types that invoke methods are not supported in HI Interactivity. To create and use a new HTML Type
When SWE Uses a Custom HTML TypeIf the HTML type of a control, list column, or page item is a custom type, the Siebel Web Engine will use the .SWF format when rendering any elements that are mapped to the control, and that specify the FormattedHtml property.
The formatting will not be used with any other property, such as Display Name. However, in the .SWF file, the More About FormatThe .SWF files contain multiple format specs. Each format spec includes two parts:
The format content syntax follows these rules:
ExamplesExample 1: To create a new HTML type for a control called "LabelRed" that shows the caption of the control in red, the formatting might look like this. <swe:htmltype name="LabelRed"> <font color="red"> <swe:this property="DisplayName"/> </font> Example 2: The Data property of <swe:htmltype name="MiniButton"> <img SRC="images/btn_left.gif" border=0 height=15 width=2> <swe:this property="Data" type="Link" /> <img src="images/btn_right.gif" border=0 height=15 width=2> Here the You can only specify built-in types and not custom types for the type attribute of Data elements. Example 3: You can also define custom formats for the different applet modes (Base, Edit, New, Query), by using the Mode attribute for the <swe:htmltype name="SiebelText"> <swe:this property="Data" type="Text"/> <swe:htmltype name="SiebelText" mode="Edit"> <swe:this property="DisplayName"/>: <swe:this property="Data" type="Text"/> Example 4: You can define another optional attribute to the
For example, to show grayed-out buttons when a method cannot be invoked, add the following format definition in addition to the default definition shown earlier. <swe:htmltype name="MiniButton" state="Disabled"> <img src="images/graybtn_left.gif" border=0 height=15 width=2> <swe:this property="Data" type="Link" /> <img src="images/graybtn_right.gif" border=0 height=15 width=2> With built-in HTML types, if a method cannot be invoked, then the control or list item is not shown (same as the current behavior). With custom HTML types, however, the formatting specified in the .SWF file is always shown. The HTML generated for the property Data ( You can hide a control or list item with a custom HTML type when a method cannot be invoked by creating an empty
NOTE: This only hides the Example 5: To show the SiebelText type with an indicator (*) for required fields you can add the following format definition in addition to the definitions for this type shown earlier. <swe:htmltype name="SiebelText" mode="Edit" state="Required"> <swe:this property="DisplayName"/> <swe:this property="Data" type="Text"/> NOTE: When SWE looks up HTML Type definitions in the .SWF file, the order of precedence will be Mode and then State. It is recommended to always create a default format definition (that is, without specifying the mode and state attributes) for all custom HTML types. |
Configuring Siebel eBusiness Applications |