Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Build error-free applications fast

Manage beans and error validation

Jeff K. Wilson (wilsonje@us.ibm.com), E-business Architect
Jeff Wilson, a self-proclaimed dot-com refugee, has for the past three years been an e-business architect for the DragonSlayers, IBM's developer relations technical consulting team in Austin, Texas. It is their goal to excite, evangelize, educate, and enable developers on the latest tools and technologies available. Jeff welcomes any and all questions, comments, recipes, insider stock tips, cash, prizes, and any good juicy gossip. He can be reached at wilsonje@us.ibm.com.

Summary:  The latest release of IBM WebSphere Studio and the Portal Toolkit plug-in provide new features for developing front-end applications using JavaServer Faces. These features enable developers to quickly and easily use visual rapid-application development tools and provide a rich set of interesting user interface components not easily created or maintained in the past. This tutorial demonstrates how a framework as flexible as JavaServer Faces and the tools provided by both WebSphere Studio and the Portal Toolkit make short order of integrating, testing and maintaining a portal-based front end.

Date:  24 Sep 2004
Level:  Intermediate PDF:  A4 and Letter (84 KB | 25 pages)Get Adobe® Reader®

Activity:  3729 views
Comments:  

Before you start

About this tutorial

The latest release of IBM® WebSphere® Studio and the Portal Toolkit plug-in provide new features for developing front-end applications using JavaServer Faces (JSF). These new features enable developers to quickly and easily use visual rapid-application development tools and provide a rich set of interesting user interface components not easily created or maintained in the past.

In addition to a toolbox of user interface (UI) components, JSF developers have at their disposal a framework for both managing and validating data in a very stable and structured way. Because the open JSF standard defines this process, you can build IDE tools that make the initial development a much simpler task. This is where the attention is focused in this tutorial -- taking advantage of the frameworks capabilities for holding and checking data and exploring the toolset to see how easy it is to implement these in your portal-based applications.

This tutorial provides a basic, but complete, understanding of both the framework in general and the process for developing complex applications that tie into back-end resources from within the WebSphere Portal environment.


Should I take this tutorial?

This tutorial is intended for WebSphere Portal developers who are interested in the latest JavaServer Faces tooling in WebSphere Studio.

Generally, developers should have a good understanding of Java development to get through this tutorial, though most of the steps use wizards and visual components. The few locations that require coding provide detailed explanations on what to type and what the code does. For the most part, how the application works behind the scenes is not as important as what the visual components do and how to use them within a portal-specific JSP.


Prerequisites

To complete the steps in this tutorial, you need the following software installed on your computer:

Download the Portal Toolkit V5.0.2.2. Install WebSphere Studio, accepting all defaults, and run the Portal Toolkit installer, installing both the toolkit and the test environment.

Install DB2 accepting the defaults and install the Sample database from the First Steps window which should load on install. If the First Steps window does not load, select it from Start Menu > Programs > IBM DB2.

The FacesPortletFiles.zip file holds the JavaBeans you will use, as well as the code, in a file called CutandPasteCode.txt. It contains the code some of the steps have you to write. You can cut and paste snippets from here. Unzip FacesPortletFiles into c:\temp -- it will create a directory called FacesPortletFiles in c:\temp.


Application overview

The application utilized in this tutorial accesses and updates employee data stored in a back-end repository. In a real-world development scenario, JavaServer Faces should provide a separate front-end layer that accesses some core components that, if designed well, do not rely on any specific style of front-end interface. Typically, these core components would be JavaBeans, EJBs, or other components that hold all the business logic. These would likely be provided by other developers on your team who are skilled in Java technology but not necessarily in UI design. The components should also be flexible enough to be used, perhaps, by any type of front-end, whether it is a Swing-based rich client, Web service, or -- as you will do today -- a Web front end.

The application in this tutorial builds upon a couple of JavaBeans that are generic enough to be used in such applications and function basically as an interface to data stored in an IBM DB2 database.

The application loads those JavaBeans and layer rich components on JSPs that access these JavaBeans gaining access, in turn, to the data behind the scenes.

By the end, you will see how a framework as flexible as JavaServer Faces and the tools provided by both WebSphere Studio and the Portal Toolkit make short order of integrating and maintaining a portal-based front end.

1 of 7 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=142765
TutorialTitle=Build error-free applications fast
publish-date=09242004
author1-email=wilsonje@us.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers