Pattern 3: Save-and-Confirm Across Two Pages

Previous Next

In this design pattern, a first page offers search and manipulation. A second page offers a confirmation of the data saved in the first page. This "Save-and-Confirm" pattern is appropriate for confirming an order, a travel booking or a reservation.

To spread Save and Confirm functionality across two pages:

1.In the Web Designer catalog, identify the (default) info page corresponding with the main table, for example, the Reservations page.
2.Create two new subclasses of this info page and rename them appropriately, for example SaveReservations and ConfirmReservations.
TIP: Consider making ConfirmReservations a child, rather than a sibling, of SaveReservations. This could have advantages in the future since the form for confirmed data on the second page would automatically take on any future changes to the form for saving data on the first page.
3.In the SaveReservations page, in the object tree, find the Save button and the commit action associated to its onclick event. The easiest way to do this is to click the Save button in the page preview and then to expand further nodes in the object tree.
4.In the object tree, select the button's onclick event and insert a second action. Do this by choosing Insert, Action from the menu.
5.Open the Property Inspector for the new action. Set its Seqno to a higher number than the Seqno of the commit action. Set its Script property to:

$.udb.navigateTo( 'ConfirmReservations' )

 

6.In the ConfirmReservations page class, in the object tree, identify the node for the main data source (labeled something like "RESERVATION(RESERVATION)" ), open the Property Inspector for it, and set its Synchronization DataSource property to:

../<main data source name in SaveReservations page>

 

for example:

../RESERVATION

 

7.Save work. Republish the SaveReservations page class and the ConfirmReservations page class.

To get a more finished solution, you need to remove from the ConfirmReservations page all the elements that offer data search or data manipulation activity. The remaining fields should merely display the reservation data from the previous page. They should all be read-only fields.

 

See Also

Page and Data Source Constructs