Configuring Siebel Business Applications > Configuring Siebel Web Templates and Siebel Tags > Customizing Siebel Web Templates and Siebel Tags >

Customizing How Siebel CRM Displays an Error That Occurs on the Siebel Server


If an error occurs on the Siebel Server when Siebel CRM submits a form, then the Siebel Web Engine displays the same page again and includes an error message. The swe:error tag specifies the location of this error message. If an error occurs outside of a form submission, then the Siebel Web Engine continues to use the value that is defined in the Error Web Page property of the application object.

You can use the swe:error tag to customize how Siebel CRM displays an error that occurs on the Siebel Server. Note the following behavior:

  • If Siebel CRM encounters no errors when it renders a form, then Siebel CRM skips the contents of the swe:error tag.
  • The only attribute of the swe:error tag is a property whose value must equal FormattedHtml. This configuration instructs Siebel CRM to display the contents of the error message.
  • If you do not use a swe:error tag in a Siebel web template file, then the code automatically generates an error node, which is an instance of the CSSSWEErrorSWX code. Siebel CRM inserts this error node as the first child of the enclosing page or form node.
  • Siebel CRM displays an error message in plain text. It displays each error message in a separate paragraph.
  • The enclosing HTML tags determine the font and style of the error message. If the font uses the same color as the background, then the error message is not visible.

To customize how Siebel CRM displays an error that occurs on the Siebel Server

  1. To display the error message in a form, place the following tags in the swe:form tag:

    <swe:error>

    <swe:this property="FormattedHtml"/>

    </swe:error>

  2. Make sure you use this tag in all swe:form tags.

Format of the Swe:error Tag

The basic format of the swe:error tag is as follows:

<swe:error>

The format of the swe:error tag with the FormattedHtml property is as follows:

<swe:error property="FormattedHtml"/>

or

<swe:error>

<swe:this property="FormattedHtml"/>

<swe:error/>

Example of Using the Error Tag

The following code is an example of using the swe:error tag:

<swe:form>

<swe:error>

<b><font color="red"> <swe:this property="FormattedHtml"/> </font></b>

</swe:error>

...

</swe:form>

For another example, see Example Code of a Nongrid Form Applet Template.

Usage of the SWEErrMsg Item

You must use the swe:error tag instead of the swe:pageitem tag that is mapped to the _SWEErrMsg item in the Error Web Page property of the Siebel application. Siebel CRM version 7.0 and higher does not support _SWEErrMsg.

Configuring Siebel Business Applications Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.