Applet toggles

download Applet toggles

of 3

Transcript of Applet toggles

  • 8/7/2019 Applet toggles

    1/3

    http://download.oracle.com/docs/cd/E05554_01/books/ToolsRef/ToolsRefuiobj16.

    html

    Applet Toggles

    Applet toggles allow users to switch back and forth between different applets within the same

    view. This is useful when you want to display different types of data or present the same data in

    a different way. There are two types of applet toggles, static and dynamic:

    Static applet toggles. Allow users to toggle between applets by selecting the name of theapplet from the Show drop-down list.

    Dynamic applet toggles. Automatically toggles between applets based on the value of afield in a parent applet.When configuring applet toggles, consider the following:

    For applets involved in a toggle cycle the search spec on the form applet in the view willbe applied first. Therefore, to apply a search spec on a list applet in a toggle cycle, you

    also need to add the search spec for the form applet. Dynamic toggle applets must be based on the same business component. Static toggle applets do not have to be based on the same business component. You cannot configure more than one applet toggle in a view.

    To understand applet toggles consider an example. Suppose you need to store information aboutyour customer's preferred payment method using the contact business component. Payment

    methods are cash, credit card or check. For each payment method, you need to gather differentdata:

    Cash. No special data requirement, this is the default payment method Credit Card. Credit Card Type, Credit Card Number, Expiration Date Check. Checking Account Number, Routing Number, Driver License Number, Driver

    License State

    You could configure this scenario using a static toggle applet or a dynamic toggle applet. A static

    toggle applet would require the user to toggle between the different applets by selecting it fromthe Show drop-down list. Dynamic toggle would automatically toggle between applets based on

    the value entered in a Payment Type field.

    To configure applet toggles (an example)

    1. Create new fields in the Contact business component to capture the followinginformation:

  • 8/7/2019 Applet toggles

    2/3

    Payment Method (use a static bound picklist that contains Cash, Credit Card, andCheck)

    Credit Card Type Credit Card Number Expiry Date Checking Account Number Routing Number Driver License Number Driver License State

    2. Expose the Payment Method Field in the Contact Form Applet. This is the default appletthat would be used when the contact's preferred payment method is Cash.

    3. Create two copies of the Contact Form Applet.Name one of them Contact Form Applet - Credit Card and the otherContact Form Applet

    -C

    heck.

    4. Expose the following fields in the Contact Form Applet - Credit Card: Credit Card Type Credit Card Number Expiry Date BCFields

    NOTE: When the contact's preferred payment method is Credit Card, the

    Contact Form Applet - Credit Card applet allows the user to enter a contact's

    credit card information.

    5. Expose the following fields in the Contact Form Applet - Check: Checking Account Number Routing Number Driver License Number Driver License State BCFields

    NOTE: When the contact's preferred payment method is Check, the ContactForm Applet - Check applet allows the user to enter a contact's checking account

    information.

    6. Find and select the Contact Form Applet in the Object List Editor, navigate to the AppletToggle child object, type and create the following records: Record 1:

    Applet=Contact Form Applet - Check Auto Toggle Field=Payment Method Auto Toggle Value=Check Name=Contact Form Applet - Check Parent Name=Contact Form Applet

  • 8/7/2019 Applet toggles

    3/3

    Record 2: Applet=Contact Form Applet - Credit Card Auto Toggle Field=Payment Method Auto Toggle Value=Credit Card Name=Contact Form Applet - Credit Card Parent Name=Contact Form Applet

    NOTE: To configure this example as a static toggle applet that allows the

    user to select the appropriate applet from the Show drop-down list, leavethe Auto Toggle Field and Auto Toggle Value properties blank.

    7. Compile your changes and test.