Overview | Package | Object Type | Deprecated | Index | Help
| Oracle Application Server Portal PL/SQL API Reference - 904
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES
SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE

## Package wwerr_api_error_ui

This package contains methods to support a standardized UI for presenting errors contained in the error stack.

For more information, see Error handling and display methods.

Scope:
  Public
Since:
  Oracle Portal 3.0.6.6.5

Constant Summary
`CONTENT_TYPE_HTML` | `integer`
`CONTENT_TYPE_HTML_COMMENT` | `integer`
`CONTENT_TYPE_TEXT` | `integer`
`CONTENT_TYPE_XML` | `integer`

Function/Procedure Summary
`get_inline_html` Returns the error stack in an HTML comment. | `varchar2`
`get_text_errors` Reports the current error stack as a string. | `varchar2`
`get_warning_html` Get the warning stack in HTML format. | `varchar2`
`show` Displays the error stack in the output format requested. | ``
`show_error_page` Displays a stand alone error page with a Back link for errors that don't get generated from Oracle Portal. | ``
`show_html` Displays the error stack in full screen HTML format. | ``
`show_html_comment` Displays the error stack in an html comment. | ``
`show_inline_html` Displays the error or warning stack in inline HTML format. | ``
`show_inline_text` Displays the error stack in inline text format. | ``
`show_text` Displays the error stack in text format. | ``
`show_xml` Displays the error stack in XML format. | ``

Constant Detail

### CONTENT_TYPE_HTML

    CONTENT_TYPE_HTML constant integer := 1

### CONTENT_TYPE_HTML_COMMENT

    CONTENT_TYPE_HTML_COMMENT constant integer := 4

### CONTENT_TYPE_TEXT

    CONTENT_TYPE_TEXT constant integer := 3

### CONTENT_TYPE_XML

    CONTENT_TYPE_XML constant integer := 2

Function/Procedure Detail

### get_inline_html

    function get_inline_html
    return varchar2

  Returns the error stack in an HTML comment.

  This function returns the error stack, with all lines but the first enclosed by <!-- and -->.

  Note: An audit record is created each time this function is called. An audit record contains the date, time, and user ID of the person who called the function.

  Example:

          err_msg := wwerr_api_error_ui.get_inline_html;

  Returns:
    This function returns the error stack in inline HTML format.
  Since:
    Oracle Portal 3.0.6.6.5

### get_text_errors

    function get_text_errors(
        p_sep in varchar2 default owa . nl_char
    ) return varchar2

  Reports the current error stack as a string.

  This function returns the current error stack in the form of a string of varchar2 datatype. Error messages are separated by a value of the p_sep parameter.

  Example:

          err_msgs := wwerr_api_error_ui.get_text_errors;

  Parameters:
    `p_sep` - the delimiter used between fields in an error stack record. Note that a delimiter is a character, such as a comma or string, that is used to separate or to mark the start and end of column items of data in a database, or some other type of file or data container.
  Returns:
    this functions returns a list of the error messages currently in the error stack. Each message is typically of the form "context: message" Note that the exception context is presented as: [package].[function], as in wwnls.add_string.
  Since:
    Oracle Portal 3.0.6.6.5

### get_warning_html

    function get_warning_html
    return varchar2

  Get the warning stack in HTML format.

  Example:

           declare
               l_warnings varchar2(32000);
           begin
               ...
               l_warnings := get_warning_html;
               ...
           end;

  Since:
    Oracle9iAS Portal 9.0.2.5

### show

    procedure show(
        p_output_format in integer,
        p_help_url in varchar2 default null,
        p_text1 in varchar2 default null,
        p_url1 in varchar2 default null,
        p_text2 in varchar2 default null,
        p_url2 in varchar2 default null,
        p_text3 in varchar2 default null,
        p_url3 in varchar2 default null
    )

  Displays the error stack in the output format requested.

  Call this procedure to display the error stack in the output format requested: HTML, XML, or TEXT. The output format is specified by one of the error content constants. This procedure should be called by functions that are explicitly handling the exception and producing a UI from it.

  Note: By default, the HTML error UI contains a Back button to navigate to the previous page. If any of the p_text_n arguments are not null, they are displayed instead of the Back button. This allows for customized error dialogs.

  Example: In this example, the format requested is XML, two URLs with accompanying text are provided, and the parameters p_text3 and p_url3 are null.

          wwerr_api_error_ui.show
          (
              p_output_format => 2,
              p_text1         => "Help for this page",
              p_url1  => http://portal.oracle.com:1500/30_HELP/30_HELP.page,
              p_text2 => "Start Over.",
              p_url2  => http://portal.oracle.com:1500/31_DESIGN/31_DESIGN.home,
          );

  Parameters:
    `p_output_format` - the output format for the error stack. Acceptable values are CONTENT_TYPE_HTML, CONTENT_TYPE_XML, CONTENT_TYPE_TEXT and CONTENT_TYPE_HTML_COMMENT.
    `p_help_url` - a string URL for the Help page, if one is available. A null value indicates that no Help page is available and no Help icon is displayed.
    `p_text1` - a text string to print next to the first URL
    `p_url1` - the URL referred to in p_text1
    `p_text2` - a text string to print next to the second URL
    `p_url2` - the URL referred to in p_text2
    `p_text3` - a string to print next to the third URL
    `p_url3` - the URL referred to in p_text3
  Since:
    Oracle Portal 3.0.6.6.5

### show_error_page

    procedure show_error_page(
        p_domain in varchar2,
        p_sub_domain in varchar2 default 'all',
        p_name in varchar2,
        p_context in varchar2,
        p1 in varchar2 default null,
        p2 in varchar2 default null,
        p3 in varchar2 default null,
        p4 in varchar2 default null,
        p5 in varchar2 default null,
        p6 in varchar2 default null,
        p7 in varchar2 default null,
        p8 in varchar2 default null,
        p9 in varchar2 default null
    )

  Displays a stand alone error page with a Back link for errors that don't get generated from Oracle Portal.

  Call this procedure to display an HTML page for errors that don't get generated from Oracle Portal. The page also contains a Back link. For example, during file upload mod_plsql checks the quota of the file being uploaded. If it detects a quota violation mod_plsql calls a URL (passed by Oracle Portal) to display the error message based on the type of quota violated.

  Example:

          ...
          when others then
              wwerr_api_error_ui.show_error_page
              (
                  p_domain     => wwerr_api_error.DOMAIN_WWC,
                  p_sub_domain => 'err',
                  p_name       => 'oracle_generic',
                  p_context    => 'example.test',
                  p1           => sqlerrm
              );
          end;

  Parameters:
    `p_domain` - the short name of the product or domain in which the error occurred
    `p_sub_domain` - the subsystem that generated the error
    `p_name` - the name of the error within the domain and sub-domain
    `p_context` - the name of the function in which the error occurred
    `p1` - first passed-in value for the resulting display message
    `p2` - second passed-in value for the resulting display message
    `p3` - third passed-in value for the resulting display message
    `p4` - fourth passed-in value for the resulting display message
    `p5` - fifth passed-in value for the resulting display message
    `p6` - sixth passed-in value for the resulting display message
    `p7` - seventh passed-in value for the resulting display message
    `p8` - eighth passed-in value for the resulting display message
    `p9` - nineth passed-in value for the resulting display message
  Since:
    Oracle9iAS Portal 9.0.2

### show_html

    procedure show_html(
        p_help_url in varchar2 default null,
        p_text1 in varchar2 default null,
        p_url1 in varchar2 default null,
        p_text2 in varchar2 default null,
        p_url2 in varchar2 default null,
        p_text3 in varchar2 default null,
        p_url3 in varchar2 default null
    )

  Displays the error stack in full screen HTML format.

  Call this procedure to show the error stack in full screen HTML format. It is an alternative to the show method with the CONTENT_TYPE_HTML parameter value assumed.

  This procedure should be called by functions that are explicitly handling the exception and producing a UI from it.

  Note: By default, the HTML error UI contains a Back button to navigate to the previous page. If any of the p_text_n arguments are not null, they are displayed instead of the Back button. This allows for customized error dialogs.

  Example: In this example, two URLs with accompanying text are provided, and the parameters p_text3 and p_url3 are null.

          wwerr_api_error_ui.show_html
          (
             p_text1 => "Help for this page",
             p_url1 => http://Portal.oracle.com:1500/30_HELP/30_HELP.page,
             p_text2 => "Start Over.",
             p_url2 => http://Portal.oracle.com:1500/31_DESIGN/31_DESIGN.home,
          );

  Parameters:
    `p_help_url` - a string URL for the Help page, if one is available. A null value indicates that no Help page is available and no Help icon is displayed.
    `p_text1` - a text string to print next to the first URL
    `p_url1` - the URL referred to in p_text1
    `p_text2` - a text string to print next to the second URL
    `p_url2` - the URL referred to in p_text2
    `p_text3` - a string to print next to the third URL
    `p_url3` - the URL referred to in p_text3
  Since:
    Oracle Portal 3.0.6.6.5

### show_html_comment

    procedure show_html_comment

  Displays the error stack in an html comment.

  Call this procedure to insert the current error stack in an HTML comment.

  This can be useful in situations where the error stack contains a large number of error messages and it would not be very user friendly to show all those error messages to the end user. In such a case the error stack can be inserted into an HTML comment so that it is hidden from the end user. Then the error stack can be cleared and a single user friendly message added so that the user only sees that one error message.

### show_inline_html

    procedure show_inline_html(
        p_clear_stack in boolean default true,
        p_show_warning in boolean default false
    )

  Displays the error or warning stack in inline HTML format.

  Call this procedure to show the error or warning stack in inline HTML format. This means that the HTML generated by the API is displayed at the end of the current page, i.e. a separate new page is not displayed.

  Example:

          wwerr_api_error_ui.show_inline_html;

  Parameters:
    `p_clear_stack` - clear the error stack after displaying it
    `p_show_warning` - show error/warning stack
  Since:
    Oracle Portal 3.0.6.6.5

### show_inline_text

    procedure show_inline_text

  Displays the error stack in inline text format.

  Call this procedure to return the error stack in inline text format. This means that the text generated by the API is displayed at the end of the current page, i.e. a separate new page is not displayed.

  Example:

          wwerr_api_error_ui.show_inline_text;

  Since:
    Oracle Portal 3.0.6.6.5

### show_text

    procedure show_text(
        p_help_url in varchar2 default null,
        p_text1 in varchar2 default null,
        p_url1 in varchar2 default null,
        p_text2 in varchar2 default null,
        p_url2 in varchar2 default null,
        p_text3 in varchar2 default null,
        p_url3 in varchar2 default null
    )

  Displays the error stack in text format.

  Call this procedure to show the error stack in text format. It is an alternative to the show method with the CONTENT_TYPE_TEXT parameter value assumed.

  This procedure should be called by functions that are explicitly handling the exception and producing a UI from it.

  Example: In this example, two URLs with accompanying text are provided, and the parameters p_text3 and p_url3 are null.

          wwerr_api_error_ui.show_text
          (
             p_text1 => "Help for this page",
             p_url1 => http://Portal.oracle.com:1500/30_HELP/30_HELP.page,
             p_text2 => "Start Over.",
             p_url2 => http://Portal.oracle.com:1500/31_DESIGN/31_DESIGN.home,
          );

  Parameters:
    `p_help_url` - a string URL for the Help page, if one is available. A null value indicates that no Help page is available and no Help icon is displayed.
    `p_text1` - a text string to print next to the first URL.
    `p_url1` - the URL referred to in p_text1
    `p_text2` - a text string to print next to the second URL.
    `p_url2` - the URL referred to in p_text2
    `p_text3` - a string to print next to the third URL.
    `p_url3` - the URL referred to in p_text3
  Since:
    Oracle Portal 3.0.6.6.5

### show_xml

    procedure show_xml(
        p_help_url in varchar2 default null,
        p_text1 in varchar2 default null,
        p_url1 in varchar2 default null,
        p_text2 in varchar2 default null,
        p_url2 in varchar2 default null,
        p_text3 in varchar2 default null,
        p_url3 in varchar2 default null
    )

  Displays the error stack in XML format.

  Call this procedure to show the error stack in XML format. It is an alternative to the show method with the CONTENT_TYPE_XML parameter value assumed.

  Example: In this example, two URLs with accompanying text are provided, and the parameters p_text3 and p_url3 are null.

          wwerr_api_error_ui.show_xml
          (
             p_text1 => "Help for this page",
             p_url1 => http://Portal.oracle.com:1500/30_HELP/30_HELP.page,
             p_text2 => "Start Over.",
             p_url2 => http://Portal.oracle.com:1500/31_DESIGN/31_DESIGN.home,
          );

  Parameters:
    `p_help_url` - a string URL for the Help page, if one is available. A null value indicates that no Help page is available and no Help icon is displayed.
    `p_text1` - a text string to print next to the first URL.
    `p_url1` - the URL referred to in p_text1
    `p_text2` - a text string to print next to the second URL.
    `p_url2` - the URL referred to in p_text2
    `p_text3` - a string to print next to the third URL.
    `p_url3` - the URL referred to in p_text3
  Since:
    Oracle Portal 3.0.6.6.5

Overview | Package | Object Type | Deprecated | Index | Help
| Oracle Application Server Portal PL/SQL API Reference - 904
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES
SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE