Skip to main content link. Accesskey S
  • Log In
  • Help
  • IBM Logo
  • IBM Web Experience Factory wiki
  • All Wikis
  • All Forums
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
Community Articles Product Documentation Learning Center IBM Redbooks This category Web Experience Factory 8 Documentation WebSphere Portlet Factory 7 Documentation WebSphere Portlet Factory 7.0.1 Documentation Custom Search Scope...
Search
Community Articles > Web Experience Factory > Samples and Techniques for Web Experience Factory > Customizing your generated UI
  • New Article
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

IBM contributorGarry Sager
Contribution Summary:
  • Articles authored: 14
  • Articles edited: 0
  • Comments Posted: 1

Recent articles by this author

Using the new responsive HTML template provided with the Feature Pack for Web Experience Factory 8

The new fp80responsivetemplate.html template allows details, create, and update pages to dynamically and responsively support a two column layout. The template has a layout that uses css floats to lay out the fields. Columns are automatically laid out with the first field in the first column and ...

Using the new Multichannel Responsive Data Layouts provided with the Feature Pack for Web Experience Factory 8

In this article we will talk about the new data layouts that we created for this feature pack. These layouts are designed to work with the new responsive theme for portal 8.0.0.1 and the new Web Experience Factory theme defined in this feature pack. Some of these layouts require the new portal ...

Connecting IBM Web Content Manager content to Web Experience Factory portlets

This sample illustrates how to integrate portlets that display content from IBM Web Content Manager which I will refer to as WCM and portlets that are developed using Web Experience Factory which I will refer to as WEF. It shows how a custom portlet can use public render parameters from the ...

Sharing an Eclipse shell with the Web Experience Factory Designer and Worklight Studio

These are the steps you need to follow to share an eclipse development environment with both Web Experience Factory 8.0 and Worklight Developer Edition 5.0. There are many different versions and configurations of eclipse and many do not contain all the plugins required for both Worklight and Web ...

Working with Themes

This article gives you an over view of how Web Experience Factory themes are used in projects and models with information about how to control the look and feel of your applications and portlets. This also includes multichannel techniques and tips for working on phones, tablets and desktop ...

Community articleCustomizing your generated UI

Added by IBM contributor Garry Sager | Edited by IBM contributor Craig Lordan on September 10, 2012 | Version 26
  • Edit
  • More Actions Show Menu▼
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars
expanded Abstract
collapsed Abstract
This article with the accompanying sample shows you how to use IBM Web Experience Factory to customize your applications UI using the latest builders and themes.
Tags: Code Samples, User Interface
Prerequisites

You should have a basic familiarity with Experience Factory and be able to create and run models.

Introduction to Customizing generated UI

This sample will show some common methods you can use to customize the UI that is generated by our wizards and high level builders. It will talk about how to control the overall look and feel of your pages and techniques to customize fields at a page level. Here are some of the techniques and builders illustrated in this sample, Themes, Data Field Settings, Data Field Merge, design view modifications, exporting the complete page for customization.

Sample description

The sample is a simple sales order model that displays orders and the contacts for those orders. The base models were built using our best practices with a service provider and consumer. The consumer model was built using the Data Services UI Consumer model wizard. The initial model ServiceOrders and the customized model ServiceOrdersCustomized are both included in the sample so you can see what was added and how it changed the pages.



Techniques illustrated in this sample

Customization TechniqueWhere used
Adding action columns to your UI.Data Services User Interface builder SalesOrderConsumerDSUI
added delete and edit operations to the view page.
Changed layout and css for model Theme builder clean_label_above updated the model to use
WEB-INF/factory/themes/clean_label_above.uitheme
Changed base pages to add buttons to top and bottom of pageTheme builder clean_label_above updated the
Details, Update pages to have buttons at bottom and top
Control field UI and behaviorData Field Settings builder All Pages updated
the fields on all pages to look and behave correctly
Merging fields to enhance the layout of the fields for displayData Field Merge builder AddressMerge merged
the address fields for layout on the view page
Custom Layout Template with CSS for Data Layout builderData Layout builder Four Column Show/Hide List
updated the view page
Design view customization of layoutDisplay Manager builder SalesOrderConsumerDSUIDetailDispMgr
updated the Details page
builder SalesOrderConsumerDSUIUpdateDispMgr
updated the Update page
Custom HTMLImported Page builder SalesOrderConsumerDSUICreate
replaced the complete Create page



Understanding the different ways that the UI can be customized.
Controlling the UI: page layouts
  • Overall page layout is controlled with imported HTML pages

  • Imported pages include placeholders (named tags) where content will be inserted
  • Fields can be moved and grouped using drag and drop in Design view
  • Field layout, grouping, and visibility can be controlled with builders
  • Data Column Modifier, Display Manager, Data Hierarchy Modifier, Data Field Modifier
  • For complete customization of field layout, use a custom layout page with named tags for the fields in a schema
  • Use “Export HTML for Data Layout” command to automatically create HTML file with named tags
    Iteratively modify the HTML file using an HTML editor to position fields as desired

Adding action columns to your UI.
Our high level UI builders have optional inputs that allow you to automatically generate columns and methods to perform actions on the rows of your list.

We wanted to allow the user to be able to delete and edit records from the list view so we enabled the inputs in the DSUI builder that created these columns. These inputs are List Page to Update set to Add a column with links to jump to update and Add Delete Column on List Page to Add a column with "Delete Records" links.
Controlling overall style and look with themes.
  • Themes allow you to centrally control and modify the look and feel of an entire application:

  • CSS styles

    “Smart refresh” and page loading progress indicators

    Page layouts

    Table and form layout rules (HTML templates)

    Table highlighting and paging controls

  • A theme can be applied for a model, or automatically for a whole project

  • You can also override theme elements at any level with the Theme builder
One of your design decisions is at what level you want to customize your models within the project. Is it at the project level where all models within the project are affected or only an individual model. We wanted to change the UI to minimize the colors and move the labels above the edit fields to help minimize the width of the forms. To do this in this sample we added a theme builder to the model and will use clean_label_above.uitheme that gives us the look we want.

Updating base pages to customize the look and layout of your pages.

We wanted to change the pages that are generated to have buttons on the top and bottom so that the user wouldn't have to scroll the window to get to the buttons. We did this by updating this theme builder inputs to update the base DSUI builder pages to reference the pages we created that add the buttons to the top of the form. These pages were created by copying the existing base pages into the projects pages directory and adding these tags to the top of the page

"vf_buttons" name="vf_buttons"
 

"cancel_button"
 
"submit_button"
 

Control field UI and behavior automatically with Data Field Settings
  • From a single Data Field Settings builder, you can easily control the appearance and behavior of all the fields in an application

  • Automatically reference a shared library of Rich Data Definitions
  • For each field, you can control labels, visibility, column sorting, validation, field type (drop-down, checkbox, rich text editor, date picker, etc.), and more
We wanted to enhance the users data entry ability and we also wanted to change the labels of some of the field. We updated the Data Field Settings builder to do this, the field Customer ID we changed to display as Customer # and the field Name we changed to display as Contact. We updated the field type for field Amount to be Currency , State to be a Select with a look-up table, Phone to be a Phone Number, Email to be an E-Mail Address and Description to be a Rich Text Editor field.

Merging fields to enhance the layout of the fields for display.
  • The Data Field Merge builder lets you merge fields so that they are presented as a single field and lets you merge columns so that they are presented as a single column.
For this model we had we wanted to display the fields Address, City, State and Zip that we wanted to display as a single column within the list. We added a Data Field Merge builder and added the separators to format these values to be displayed as
Address
City State, Zip

Creating Data layouts to facilitate the use of your custom UI patterns.
  • The Data Layout builder is a great way to transform the grid style tables generated by the Page Automation builders (Data Page, View & Form, and DSUI) into alternate list layouts that are suitable for viewing on Desktop, Mobile, and Tablet devices.

For this page we were looking at a layout design that we could use on many of our list views. We looked at the existing data layout templates and none exactly matched the pattern that we wanted, so we decided to create our own template. In this case the Multi-Line Show/Hide List template was close to what we wanted so we decided to copy the template and style sheet to the projects data_layout_templates directory and updated it to have the extra columns we wanted within the layout. We also modified some styles removing the width and height from the img selector and added some new classes that allowed for us to have vertical separators for our fields. We then added the data layout builder to the list view and selected which fields we wanted to be displayed and where. Some of the locations within the layout were targeted by image builders to add the needed images. The styles to control the layout of these images were added within the data layout builder to control the spacing around the images.


Using the design view to customized data entry pages.
The design panel in the model editor shows a visual representation of a visible element that is selected in either the Application Tree or the Pages panel. Clicking the Design tab exposes the Design panel. This panel lets you quickly and conveniently see visible elements in your model without having to generate the web application and lets you make design changes. It supports the adding and manipulation of builders and their inputs allowing a user to modify field layouts and attributes. This view allows you to add high level layouts( two column, T layout, Inverted T and I layout) or use drag and drop to rearrange the layout of your fields on the page. All changes are stored as inputs to builders and are dynamically applied at generation time.
For more information on design view customization [Using the design view to customize your data layout].
For the details and update pages we wanted to change the layout of the form to an I layout with the customer # on the top then the order information and contact information in there own sections in the center and followed by the description field. We did this by selecting the I layout from the palette and dropped it on the list. This splits the fields into the 2 center sections. We selected the fields and dragged them to the sections we wanted them in. We then added the group labels for Order Information and Contact Information by right clicking on the groups and selected the Edit Group Label menu item from the Layout tools.


Exporting the complete page HTML to customized the creation page.
  • Exporting the HTML

  • To export the current HTML structure of a particular data-driven area on a page, first navigate in the design view to the page in question. Right-click the element that you wish to modify and select Complete Page item from the Export HTML for Customization menu. This will take the current HTML of the page export it into the project and add an Imported Page builder into the model setting the replace input completely replacing the page that was generated. Any modifier builders to that page will still be executed on the exported page. It is important to not remove named items that these builders targeted and the , but other HTML can be changed as you wish. It's important to note that after creating this page making theme changes specific to the base pages and templates will have no affect on these pages.
For this model we exported the create page and customized it to look completely different from the details and update pages, but this time we did the editing of this page using the HTML editor and not the design view. We've also added comments throughout the HTML of the page to outline some of the changes we did with the HTML editor.

Instructions for running the sample

To run the sample application:


1. Create a project or use an existing project.
2. Download the gettingstarted_customized_samples ZIP file and import it into the project using File > Import> WebSphere Portlet Factory Archive command.
3. Open one of the models found in WEB-INF\models\samples\gettingstarted_customized and run it. These models will run out-of-box without any configuration required.

Resources

Data Layout builder help (describes the Data layout template file format)


http://www-10.lotus.com/ldd/pfwiki.nsf/dx/Data_Layout_builder_wpf701

Data Layout video
http://www-10.lotus.com/ldd/pfwiki.nsf/dx/Transforming_Tables_into_Lists_using_the_Data_Layout_Builder

Data Layout UI Patterns
http://www-10.lotus.com/ldd/pfwiki.nsf/dx/List_Layout_UI_Patterns_

Field Customization Using the Data Field Settings builder
http://www-10.lotus.com/ldd/pfwiki.nsf/dx/Field_Customization_Techniques_using_the_Data_Field_Settings_Builder

Basic Editing of Forms in Design View
http://www-10.lotus.com/ldd/pfwiki.nsf/dx/Basic_form_editing_in_IBM_Web_Experience_Factory

  • Edit
  • More Actions Show Menu▼


expanded Attachments (1)
collapsed Attachments (1)
Edit the article to add or modify attachments.
File TypeSizeFile NameCreated On
application/x-zip 37 KB Gettingstarted_Customized_Sample.zip 3/2/12 6:09 AM
expanded Versions (26)
collapsed Versions (26)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (26)Sep 10, 2012 4:01:14 PMCraig Lordan  IBM contributor
24Jul 9, 2012 1:12:41 PMKeri Tuttle  IBM contributor
24Aug 10, 2012 11:14:54 AMGarry Sager  IBM contributor
22May 21, 2012 6:18:09 AMGarry Sager  IBM contributor
22Jul 6, 2012 2:25:23 PMKeri Tuttle  IBM contributor
21May 7, 2012 1:18:23 PMGarry Sager  IBM contributor
19Apr 4, 2012 8:14:09 AMGarry Sager  IBM contributor
18Apr 3, 2012 1:57:48 PMGarry Sager  IBM contributor
17Mar 13, 2012 10:23:49 AMGarry Sager  IBM contributor
16Mar 13, 2012 10:08:41 AMGarry Sager  IBM contributor
15Mar 8, 2012 9:30:18 AMGarry Sager  IBM contributor
14Mar 7, 2012 6:40:43 AMGarry Sager  IBM contributor
13Mar 7, 2012 6:36:13 AMGarry Sager  IBM contributor
12Mar 7, 2012 6:31:58 AMGarry Sager  IBM contributor
11Mar 2, 2012 11:41:53 AMGarry Sager  IBM contributor
10Mar 2, 2012 11:30:21 AMGarry Sager  IBM contributor
9Mar 2, 2012 11:09:15 AMGarry Sager  IBM contributor
8Mar 2, 2012 10:57:35 AMGarry Sager  IBM contributor
7Mar 2, 2012 9:59:30 AMGarry Sager  IBM contributor
6Mar 2, 2012 9:17:29 AMGarry Sager  IBM contributor
5Mar 2, 2012 9:15:58 AMGarry Sager  IBM contributor
4Mar 2, 2012 9:03:12 AMGarry Sager  IBM contributor
3Mar 2, 2012 8:35:05 AMGarry Sager  IBM contributor
2Mar 2, 2012 8:23:44 AMGarry Sager  IBM contributor
1Mar 2, 2012 6:33:31 AMGarry Sager  IBM contributor
1Mar 2, 2012 6:59:01 AMGarry Sager  IBM contributor
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • BlogsIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkIBM Collaboration Solutions
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use