In a
previous blog we created a default WebForm for the Pizza Preparation process. In each human interaction of the process we used this default WebForm with the default presentation. In this post we will create a different presentation for each human interaction in the process.
Crust Preparation Will only show the pizza name and size. Both fields are editable.
Filling the Pizza Shows alle data. The pizza name and size are read-only. The ingredients are editable. It’s also possible to add or remove ingredients.
Put in Oven All data is shown read-only.
Get out the Oven The Pizza naam and size are shown read-only.
As a starting point for this blog, we use the end result of the above mentioned blog. We begin by adding presentations to the IngredientsWebForm.
The Main (Default) presentation of the Form.
This is the form we have used for all different presentation. At the form properties level there is an option to specify so called ‘presentations’. The image below shows the 4 newly created ones.
Each presentation is derived from the Main presentation, but this is optional.
After creating the presentations, it is possible the switch between them easily.
Switch to each of them one-by-one and change the component properties to represent the required views given at the top of this post.
For example for the first presentation the table with ingredients is not visible. Select ‘Hide’ for the table component. After doing this for all presentation we have to update the process to use the correct presentation in each task. An example, for the Prepare Pizza Crust, is shown below.
After doing this we are done. We re-deployed the application to test the complete functionality. The following images show all 4 different presentations of the Form.
Crust Preparation - Will only show the pizza name and size. Both fields are editable.
Filling the Pizza - Shows alle data. The pizza name and size are read-only. The ingredients are editable. It’s also possible to add or remove ingredients.
Put in Oven - All data is shown read-only.
Get out the Oven - The Pizza naam and size are shown read-only.
As a conclusion we think that using presentation is a very easy and fast way to show data in different presentation. Presentations gives the GUI developer a major productivity boost.
No comments:
Post a Comment