About DisplayException

Use the displayException component to show exceptions that are caught by a try component. The displayException component is usually inserted into the catch named child of a try component.


Example:

...
<page xmlns="http://xmlns.oracle.com/uix/ui" 
      xmlns:ui="http://xmlns.oracle.com/uix/ui" 
      expressionLanguage="el">
  <content>
    <body xmlns="http://xmlns.oracle.com/uix/ui" 
          xmlns:data="http://xmlns.oracle.com/uix/ui" 
          xmlns:ui="http://xmlns.oracle.com/uix/ui">
      <contents>
        <dataScope>
          <provider>
            <!-- A data provider that will always fail, throwing a SQLException --> 
            <data name="problem">
              <method class="oracle.cabo.servlet.demo.DemoData" method="throwException" /> 
            </data>
            <!-- A data provider that succeeds --> 
            <data name="noproblem">
              <instance class="oracle.cabo.servlet.demo.DemoData" /> 
            </data>
          </provider>
          <contents>
            <!-- But this "try" will fail --> 
            <try>
              <contents>
                <!-- something that might trigger an error -->
                <pageLayout>
                  <contents>
                    <styledText text="${uix.data.problem['1Text']}" /> 
                  </contents>
                </pageLayout>
              </contents>
              <catch>
                <!-- So you'll reach this portion --> 
                <displayException /> 
              </catch>
            </try>
          </contents>
        </dataScope>
      </contents>
    </body>
  </content>
</page>
...    

Using Try, Catch, and DisplayException
Working with Simple and Miscellaneous Components

 

Copyright © 1997, 2004, Oracle. All rights reserved.