ShowTable of Contents
This Application Pattern overview article discusses the generation of a single record (no list of records) Details and Update portlet, such as a user updating their own company profile info.
For more detailed information on how to build models using the builders listed here, please refer to the articles referenced in the Resources section below.
|Data Services User Interface (DSUI)|| Specify Details and Update pages only, to generate only the details and update pages and buttons to navigate between them..|
|View and Form|| If DSUI does not meet your needs, you may use View and Form to build a portlet with a similar details and update pattern.|
|Service Consume||Specify the data provider|
- Use the Data Service User Interface builder's automation to generate the details and update pages and navigation controls between them, for you.
The following steps describe the best practice scenario using the Data Services User Interface builder to generate the details and update user interfaces and navigation controls.
The first step should be building or obtaining a data provider, which will provide the data service operation integration with your back end data.
Assume for a simple sample, that you could use the database provider as described in the Web Experience Factory database tutorial.
(1) Add a Portlet Adapter builder
(2) Add a Service Consumer builder and specify the data provider model
(3) Add a Data Services User Interface builder
- Select ONLY the Details and Update pages, and leave the other pages unchecked,
- Leave the paging settings as is.
- The DSUI builder generates an event handler to allow sending an event with the record identifier (lookup key) to this portlet, if a list page is not specified. GIve it a reasonable name in case you want to send this event from another portlet at some point.
- After Update you want DSUI to navigate back to the Details page again:
- Since there's no List to choose the record from, create a Variable builder with name employeeNumber and string value 120020 (employee number in the tutorial database) for now. An actual application would likely look up your employee number based on your username, from a corporate database.
- Since the user isn't selecting the record id from a list like you would in the List and Details sample, and we're using a dummy employee number from a variable, create a "main" action list, assign the employeeNumber variable value into the variable DSUI uses to track the selected row (DSUI builder call name plus DSUISelectedRow/...), call the Retreve operation and then process the DSUI Details page, as shown in the following action list:
- HINT - Look at the generated employeesDSUIToDetailPage method in the web application tree, to see the variables and methods it's working with, to help understand why the following assignment and method call are used in this action list. DSUI automates the LIst -> Details and the Event -> Details in a fairly complete manner, but going directly to details directly with a primary key from elsewhere involves a couple of extra steps like this.
Save and deploy the portlet to a portal page, then click on the edit button to update the details..
Samples and Resources
WEF Enablement Videos