The Save Confirmation dialog is a BI Beans thin bean, for use in an HTML-client application. It allows users to confirm or to cancel the saving of a thin Dataview
to the BI Beans Catalog.
The Save Confirmation dialog appears in two different scenarios:
When a user clicks a Save button that is on a page with a thin presentation bean, then the Save Confirmation dialog asks if the user wants to save changes to the presentation bean.
When a user clicks Save As, then the Save As dialog collects information about where to save the thin presentation bean, and it sends a Save event to the thin presentation bean. If the thin presentation bean discovers an object of the same name in the specified folder, then it sends a Java event to your application, which displays the Save Confirmation dialog. In this case, the Save Confirmation dialog asks if the user wants to overwrite the existing thin presentation bean.
The ThinBeanUI
implementation of the Save Confirmation dialog
is the oracle.dss.thin.beans.dataView.SaveConfirmation
class. The
UINode
for the Save Confirmation dialog is oracle.dss.thin.beans.dataView.SaveConfirmationBean
.
To render the dialog, your servlet must associate
the SaveConfirmation
object with the SaveConfirmationBean
object.
The JSP tag for this dialog is the SaveConfirmation tag. In the UIX Language, the definition element is the saveConfirmationDef element, and the UINode is the saveConfirmation element.
The SaveConfirmation does not need to be stored in the HTTP session.
The Save Confirmation dialog generates the following thin-bean events, which are defined in the oracle.dss.thin.beans.BIConstants
interface:
SAVE_EVENT
-- This is the event that the OK
button or hyperlink initiates. The JavaScript for this event is generated
by the SaveConfirmation.generateOnClickSubmit
method. Set an
event target on the SaveConfirmation
for this event, to route
the event to the ThinDataview
that is being saved. The ThinDataview
handles this event.
CANCEL_EVENT
-- This event indicates that the user has canceled. Set an event target to route this event to your application. See Setting Up OK and Cancel Navigation for a Thin Dialog for more information.
The Save Confirmation dialog handles the BIConstants.INIT_EVENT
. The SaveConfirmation
object passes this event to any ThinBeanDialogListener
implementations that have been registered with it.
Your application must account for the two ways in which the Save Confirmation dialog can be invoked.
When it is invoked from a Save button or hyperlink, then you can initialize the Save Confirmation dialog as you would any of the thin dialogs. In your initialization code, complete the following tasks:
Set the properties of the SaveConfirmation
object to match
the persistable attributes of the view that is being saved.
Set the Overwrite
property of the SaveConfirmation
to false
, to present text that asks if the user wants to save
changes that have been made.
Set an event target to send the BIConstants.SAVE_EVENT
to
the thin presentation bean that is being saved.
When a thin presentation bean tries to save itself under a different name or
in a different location, and an object already exists by that name in that location,
then the thin presentation bean calls the saveConfirmationRequested
method of a ThinViewListener
that is registered with the presentation
bean. You must implement the ThinViewListener
, initializing the
Save Confirmation dialog in your implementation of saveConfirmationRequested
.
In your initialization code, complete the following tasks:
Set the Overwrite
property of the SaveConfirmation
to true
, to present text that asks if the user wants to overwrite an existing thin presentation bean.
Set an event target to send the BIConstants.SAVE_EVENT
to the thin presentation bean that is being saved.
Call the SaveConfirmation.init
method, passing the QueryParameterProvider
from the SaveEvent
that is passed to the saveConfirmationRequested
method.