Error Reporting Using EL Expressions

12-2 Desktop Integration Developers Guide for Oracle Application Development Framework

12.3 Providing Client-Side Validation for an Integrated Excel Workbook

ADF Desktop Integration does not provide client-side validation. However, you can use Excel’s data validation features to control the type of data or the values that end users enter into a cell. These features allow you to restrict data entry to a certain range of dates, limit choices by using a list, or ensure that only positive whole numbers are entered in a cell. For example, you could configure the Product Number column in the EditPriceList-DT.xlsx workbook so that users can enter only whole numbers in the cells of this column. If you apply custom validation to columns within an ADF Table component, the validation is propagated when the ADF Table component’s columns are populated at runtime. Note, however, that ADF Desktop Integration overwrites at runtime any custom validation applied to columns that reference the TreeNodeList subcomponent at design time. This is because ADF Desktop Integration applies its own list-constraint validation, which is invoked at runtime. For more information about data validation in Excel, see Excel’s documentation.

12.4 Error Reporting in an Integrated Excel Workbook

The server that hosts the Fusion web application you integrate your Excel workbook with can return error messages to end users that provide feedback on the results of operations. The error messages returned can be one many types: validation failures, conflict errors, deleted records, and so on.

12.4.1 Error Reporting Using EL Expressions

To return error message summaries to end users, you must set an EL expression for the Value property of an ADF Output Text component. At runtime, the ADF Output Text component displays the error message summary to the end user if an error occurs. The type of EL expression that you set for the Value property of the ADF Output Text component depends on whether you want to return error message summaries generated by action sets invoked on a worksheet, or by actions invoked by other components such as the ADF Table and ADF Read-only Table components. The following EL expression displays error message summaries which are returned during the invocation of an action set on a worksheet: {worksheet.errors} At runtime, the previous error message summary is cleared if one existed when the action set starts the invocation. If no errors occur during invocation, error message remains blank. If an error occurs, the ADF Output Text component displays the error message summary. Note: ■ Excel displays error messages when a validation fails; these error messages cannot be localized. ■ ADF Desktop Integration does not support server-side validation warnings. Validation warnings, set for rules defined in the Fusion web application, are not displayed by the integrated Excel workbook. Adding Validation to an Integrated Excel Workbook 12-3 An alternative approach to returning error message summaries generated by action sets invoked on a worksheet is to set {worksheet.errors} as the value for an action set’s Alert.FailureMessage property. This approach displays the generated error message summary in a dialog. Components such as the ADF Table and ADF Read-only Table components that have actions which interact with the Fusion web application can also return error message summaries. Set the following EL expression for the Value property of the ADF Output Text component or for an action set’s Alert.FailureMessage property: {components.componentID.errors} where componentID refers to the ID of the component ADF Table or ADF Read-only Table component that invokes the action. The EditPriceList-DT.xlsx file in the Master Price List module of the Fusion Order Demo application demonstrates how to return error message summaries generated by action sets invoked on a worksheet and by the actions of an ADF Table component. Figure 12–1 shows these EL expressions in design mode. Figure 12–1 EL Expressions to Return Error Messages in an ADF Output Text Component

12.4.2 Error Reporting Using Component Actions