Creating a Model-based Builder

Similar documents
Illustration 1: The Data Page builder inputs specifying the model variable, page and mode

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Getting started with WebSphere Portlet Factory V6

Getting started with WebSphere Portlet Factory V6.1

Getting started with WebSphere Portlet Factory V7.0.0

ActiveVOS Fundamentals

Oracle 1Z Oracle9i Forms Developer: New Features.

SwingML Tutorial. Introduction. Setup. Execution Environment. Last Modified: 7/10/ :22:37 PM

Application Integration with WebSphere Portal V7

Skyway 6.3 How To: Web Services

Building an Application to Dynamically Execute Partner Process Flows

IBM Mobile Portal Accelerator Enablement

Tutorial. Building Composite Applications for IBM Lotus Notes 8. For use with the IBM Lotus Notes 8 Beta 2 client

ADF Code Corner How-to bind custom declarative components to ADF. Abstract: twitter.com/adfcodecorner

Provisioning WPF based WP Composite Applications to Expeditor

ADF Code Corner How-to launch a popup upon rendering of a page fragment in a region using JSF 2. Abstract: twitter.

How to Create Database in Microsoft Access 2003

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

ADF Mobile Code Corner

CS 201 Advanced Object-Oriented Programming Lab 6 - Sudoku, Part 2 Due: March 10/11, 11:30 PM

LabVIEW Express VI Development Toolkit User Guide

Generating/Updating code from whole project

Skyway Builder 6.3 Reference

Enriching Portal user experience using Dojo toolkit support in IBM Rational Application Developer v8 for IBM WebSphere Portal

These are activated from the Averiti Control Panel, illustrated in Figure 1. Figure 1: Averiti Control Panel

IBM WebSphere Portlet Factory Profile Selection via IBM WebSphere Portal Personalization Rules

JSF Tools Reference Guide. Version: M5

Creating Dynamic Forms with Adobe LiveCycle Designer

2010 Exceptional Web Experience

Mastering EA Document Style Sheets

SOFTWARE SKILLS BUILDERS

Enterprise Modernization for IBM System z:

Learning More About NetObjects Matrix Builder 1

CLEARING CHANGES (FONT FEATURES) IN DOD ISSUANCES

Head First HTML 5 Programming: Chapter 3: Events, Handlers, and all that Jazz.

Unified Task List Developer Pack

Rational Application Developer 7 Bootcamp

EVALUATION COPY. Unauthorized Reproduction or Distribution Prohibited SHAREPONT 2013 BUSINESS INTELLIGENCE

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

B. Assets are shared-by-copy by default; convert the library into *.jar and configure it as a shared library on the server runtime.

IBM Realtests LOT-911 Exam Questions & Answers

JSF Tools Reference Guide. Version: beta1

Analysis Tools - XML/HTML Project Reports

Developing Spring based WebSphere Portal application using IBM Rational Application Developer

Accessing Quickr Document Libraries using IBM WebSphere Portlet Factory

MPLAB Harmony Help - MPLAB Harmony Graphics Composer User's Guide

Hot Tips from the Training Department

Creating a SQL Service with IBM WebSphere Portlet Factory. Introduction to creating services from a relational database

SOFTWARE SKILLS BUILDERS

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Document Formatting with Word

One application has servlet context(s).

Oracle WebCenter Hands-On Practices. A Practical Introduction to Oracle WebCenter

The 60-Minute Guide to Development Tools for IBM Lotus Domino, IBM WebSphere Portal, and IBM Workplace Applications

Themes and Master Pages

Creating labels in Ticket 2000.

Integration Developer Version 7.0 Version 7 Release 0. Migration Guide

ApacheCon NA How to Avoid Common Mistakes in OFBiz Development Presented by Adrian Crum

PaVESy - User Guide...1 Starting the application...3 Working with PaVESy...3 Creating database tables...6 Importing AraCyc flat file data...

TOP Server Client Connectivity Guide for National Instruments' LabVIEW

Developing portlets for the IBM WebSphere Portal Server with IBM Rational Rapid Developer

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.

Using Adobe Flex in JSR-286 Portlets

Recipes4Success. FileMakerPro6

Tutorial 3 - Welcome Application

Easing into DITA Publishing with TopLeaf

Contents. BEA WebLogic Mobility Server Mobilize Your Portal Guide

IT6503 WEB PROGRAMMING. Unit-I

PeopleTools 8.54: Integration Broker Testing Utilities and Tools

Microsoft PowerPoint 2002

Unified Task List. IBM WebSphere Portal V7.0 Review the hardware and software requirements Review the product documentation

Extracting and Storing PDF Form Data Into a Repository

MyEclipse ER-Designer Quickstart

Getting Started with Eric Meyer's CSS Sculptor 1.0

Business Intelligence and Reporting Tools

SciGraphica. Tutorial Manual - Tutorials 1and 2 Version 0.8.0

Java Programming Language

To view a listing of all available labels in SmartOffice:

To complete this database, you will need the following file:

ADF Hands-On. Understanding Task Flow Activities / 2011 ADF Internal Enterprise 2.0 Training. Abstract:

In this lab, you will build and execute a simple message flow. A message flow is like a program but is developed using a visual paradigm.

Figure 1 Properties panel, HTML mode

Document Manager 6.0 Users Manual by Scanlon Associates

Creating your first JavaServer Faces Web application

RTView Datasource - XML

Analyzer and Reports Guide

Struts Tools Reference Guide. Version: beta1

MASTERKEY FOR ARCHICAD - MANUAL

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5.

SAS AppDev Studio TM 3.4 Eclipse Plug-ins. Migration Guide

Overview of the Adobe Dreamweaver CS5 workspace

JBoss WS User Guide. Version: CR1

Developing Applications for IBM WebSphere Portal 7.0

Oracle WebLogic Portal

HYPERION SYSTEM 9 BI+ GETTING STARTED GUIDE APPLICATION BUILDER J2EE RELEASE 9.2

Factory Method. Factory Method. Resource Mgt in App Framework. An Example: A Framework for Productivity ( Office ) Applications

Building JavaServer Faces Applications

Configure Eclipse - Part 2 - Settings and XML

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Search Hit Report Manual

Transcription:

Creating a Model-based Builder This presentation provides an example of how to create a Model-based builder in WebSphere Portlet Factory. This presentation will provide step by step instructions in the creation of a new Model-based builder. The goal of the new Model-based builder is to provide functions to render a text message on a page, but only a single time. This function would be useful if a developer needs to display a success or failure message to a user following an update operation. The result of the update operation can be rendered at a location on a page, and subsequently cleared automatically so that it doesn't re-display the next time the page is rendered.

Steps to Create a New Builder The creation of a new Model-based builder involves the following steps: create the model to act as the new builder profile selected inputs in the model use the Builder Skeleton builder

Step 1 Create the model A Model-based builder uses an existing Portlet Factory model as the basis for the new builder. The existing model is converted into a builder through the underlying use of the Imported Model builder. We start by creating a new model in our project.

Step 1 Create the model Add a new Variable builder to the model. We will setup the variable to be an XML variable with elements to contain both the message text and message color.

Step 1 Create the model Add a new Text builder to the model. We will configure the Text builder to display the messagetext element of the variable on a page. Leave the Page Location blank for now.

Step 1 Create the model Add a new Attribute Setter builder to the model. We will configure the Attribute Setter builder to set the style attribute and provide values for the color and the font-weight attributes. Leave the Page Location blank for now.

Step 1 Create the model Add a pair of Variable builders to the model. These two variables will hold the values to be used for the color of the message. One for success we'll use a default color of blue. The other for failure we'll use a default color of red.

Step 1 Create the model Add a new Action List builder to the model. In the Actions input, we will configure this builder to clear the messagetext element of our message variable.

Step 1 Create the model Add a new Method builder to the model. This method will clear the messagetext element of the message variable but only if the current request is a portlet RenderRequest or if it's executing in a servlet context.

Step 1 Create the model Add a new Event Handler builder to the model. The Event Handler builder will listen for the System:OnRequestComplete event. When this event happens, we need to invoke the Method we just created to clear the messagetext element of the message variable.

Step 1 Create the model Add a new Method builder to the model. The purpose of this method will be to select between two provided color inputs. If the color input is null or an empty string, then it will return the defaultcolor input.

Step 1 Create the model Add a new Action List builder to the model. This Action List will set the message text and set the message color using the success color variable.

Step 1 Create the model Add a new Action List builder to the model. This Action List will set the message text and set the message color using the failure color variable.

Step 2 Profile selected inputs The next step in creating a Model-based builder is to profile selected inputs in the model. By profiling some inputs in the model, we can configure the model to use different values each time it is used as a builder. Any inputs that are profiled will be available as inputs to the new builder that is created.

Step 2 Profile selected inputs Open the Text builder in the model, and profile the Page Location input. This will allow the user to choose the page location (page and tag) where the message will be rendered.

Step 2 Profile selected inputs Open the Attribute Setter builder in the model, and profile the Page Location input. This will allow the user to choose the page location (page and tag) where the style (color) attribute will be applied. (Be sure to use the same Profile Entry Name for this input as was used for the Text builder.)

Step 2 Profile selected inputs Open the Variable builder in the model for the success color, and profile the Initial Value input. This will allow the user to choose the color for rendering success messages.

Step 2 Profile selected inputs Open the Variable builder in the model for the failure color, and profile the Initial Value input. This will allow the user to choose the color for rendering failure messages.

Step 3 Use Builder Skeleton The final step in creating a Model-based builder is to use the Builder Skeleton builder. The Builder Skeleton builder will examine the model and create a new builder definition file in the project. The builder definition file is an XML file that describes the builder and its inputs. Builder definition files are placed in the WEB-INF/builders folder of the project. The Builder Skeleton builder also creates a builder regeneration class. The builder regeneration class is a Java class that executes during model generation.

Step 3 Use Builder Skeleton Add a new Builder Skeleton builder to the model.

Step 3 Use Builder Skeleton Configure the Builder Inputs section of the Builder Skeleton. We'll set the Name and PageLocation inputs as required. Also change the Input Type for the Name and PageLocation inputs.

Step 3 Use Builder Skeleton After you click OK or Apply to save the Builder Skeleton builder, the builder definition file and builder regeneration class will be created. The Builder Skeleton has done its work and should now be disabled or removed from the model it is no longer needed. Open the OneTimeMessage.bdef file (under WEB-INF/builders) to examine the contents of the builder definition file. Open the OneTimeMessage.java file (under WEB- INF/work/source) to examine the contents of the builder regeneration class.

Step 3 Use Builder Skeleton In the builder regeneration class, you will see that the One Time Message builder extends the Imported Model builder.

Step 3 Use Builder Skeleton You may have also noticed that throughout this example, we have used a prefix of basename for all of the builders. This is a feature of the Imported Model builder and we can see it being used in the builder regeneration class. The basename prefix will be replaced with the name of the builder when it is used.

Using the new Builder You can now create a new model and use the new One Time Message builder. In the Builder Palette dialog, click the Refresh button to refresh the list of builders. The new builder should be there now.

Using the new Builder Add a new One Time Message builder to the model. You should see the set of inputs that were defined when we used the Builder Skeleton builder.

Using the new Builder In the WebApp Tree view of the model, you can see the artifacts that have been added to the model by the One Time Message builder. Notice how the basename prefix has been replaced with message (the name we used for the builder). You can call the message_setsuccessmessage and message_setfailuremesage methods to set a message to be displayed.