Example of Changing Buttons in a Plug-In
Consider the example of a catalog and a cart. The Order List Button changes its color when the supervisor approves the order.
- There's a plug-in, which implements three pages: "Catalog", "Cart" and "Order List". Each button has a corresponding icon:
User clicks "Catalog" and the plug-in shows the list of items available for order.
User selects the items to order and closes the plug-in page.
- The plug-in updates the "Cart", so that it shows the count of the items in the cart:
User clicks "Cart" and the plug-in shows the list of ordered items.
User confirms the order and closes the plug-in page.
- The plug-in clears the counter on the "Cart" button and updates the "Order List" button so it shows the number of orders for approval:
The plug-in prompts Oracle Field Service to run it in the background every five minutes to get the updated information from the server.
The supervisor of the user approves the order.
- The plug-in runs in the background and receives the updated status of the order from the server. It clears the counter on the "Order List" button and highlights it:
User sees that the order is processed and approved without the need to reopen the plug-in.