Siebel Developer's Reference > Tags >

swe:error


When a server side error occurs on submitting a form, SWE will show the same page again with the error message displayed within the page. For errors that occur outside of a form submission, SWE will continue to use the application's Error Page.

This error message display is mainly developed for showing error messages within a form. It is also used to show an error message in an error page to replace the to be depreciated pageitem.errorMsg way of showing error messages.

To display the error message within a form, place the following tags inside <swe:form> tag:

<swe:error>

<swe:this property = "FormattedHtml"/>

</swe:error>

The error messages will be shown in plain text, but each error message will take a new paragraph. It is the responsibility of the enclosing HTML tags to modify the font and style of the error message. Sometimes, the error message may not be visible; this is because the font uses the same color as the background.

If the application developer does not use error tags in the swt files, the code will automatically generate an error node (a CSSSWEErrorSWX instance). This automatically generated error node will be inserted as the first child of the enclosing page/form node.

Syntax

The syntax of the <swe:error> tag is as follows:

swe:error

Usage

<swe:error property="FormattedHtml" />

or

<swe:error>

<swe:this property="FormattedHtml" />

<swe:error/>

This tag should be used within all <swe:form> tags.

NOTE:  The use of this tag inside a <swe:form> tag in an applet template is used only in the standard interactivity applications. In high interactivity applications, these errors are shown using a pop-up window.

You should also use this tag instead of the <swe:pageitem> tag mapped to the "_SWEErrMsg" item in the application's Error Page. The use of the "_SWEErrMsg" item is deprecated.

An example of the use of this tag is:

<swe:form>

<swe:error>

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

</swe:error>

.....

</swe:form>

When the form is being rendered when there are no errors, the contents of the <swe:error> tag will be skipped.


 Siebel Developer's Reference 
 Published: 23 October 2003