Search WebSpherePower's 6,973 WebSphere, Java, and Eclipse article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Using a reusable code approach to HTML select option lists, part V (continued)

It's in this latter entry that you identify the class name of the OptionListSourceFactory and the name of the specific OptionListSource that applies to the field to which this entry is related. You define the validator once in the validator-rules.xml file, and then reference it as many times as you need for individual field validation in the validation.xml file.

Client-side validation
The Struts 1.1 validation framework provides the capability for both server-side and client-side field validation. I took the easy route and just implemented the server-side validation without taking the next logical step and adding the appropriate Javascript to the validator-rules.xml file entry to handle the client-side component. Obviously, there's a way to utilize our framework to get the valid values to the Javascript so that client-side validation can be added to the mix, but I'll leave that to you to explore on your own.

My intent here was just to demonstrate that once you create a component for one purpose, you often find that there are other, equally valuable uses for your component, and I believe that we have accomplished that with the server-side validation alone.

Now what?
Hopefully, I have accomplished my goal of demonstrating some practical applications of the concepts that I have been promoting, and as a side benefit, produced something of value to someone at the same time. That's about it for the code examples, but next time I do want to wrap things up by going back to the original concepts and doing a little review.

Product availability and resources
For more information on Echo Technogoly Group, Inc., visit http://www.teametg.com.

H1 Easy, flexible article reprints ZATZ now offers a quick, easy, flexible and inexpensive way to use article reprints in your marketing and promotion efforts. You can now get article reprints for a one-time fee of only $200. For details, visit http://mediakit.zatz.com/reprints.

Jeff Chilton is Vice President of Fulfillment at Echo Technology Group, Inc., an IT consulting firm that specializes in enterprise-focused best practices. He can be reached at jchilton@teametg.com.


« Previous  ·  1  ·  2  ·  3
Other articles you might like
Home > Projects > Reusable Code (5 articles)
   Using a reusable code approach to HTML select option lists, part VI
   Using a reusable code approach to HTML select option lists, part IV
   Using a reusable code approach to HTML select option lists: part III
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent WebSpherePower Articles
A perfect 10: celebrating 10 years online
You can help bring security and safety back to White House email
Introducing the WebSpherePower RSS feeds
From New Jersey to Palm Bay, Florida
A WebSphere pot o' gold
How Elvis entered the building and CES went out the window
WebSphere Application Server 6: what's it all mean?
WebSpherePower News
Legal question: Can HP keep Hurd from going to Oracle?
Caringo announces integration with Symantec EV 9.0
Cisco & Citrix marry on virty PCs
Take Heed, Tech Giants: Edison's Failed Plot To Hijack Hollywood
IBM code unchains virtual workloads
Oracle names H-P ex-CEO Mark Hurd as co-president
Cloud Messaging Provider, Linxter, Releases SDK for Java and Android
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Introducing the Jones family and their full-family backup challenges
David Gewirtz Online: CNN commentary and analysis
DominoPower: Lotus must open source Notes and Domino
OutlookPower: Hands on debugging a broken Outlook forwarding rule
-- Advertisement --

How To Save Jobs
This book is about how to create and save jobs. Believe it or not, there's not a single book out there that specifically focuses on job creation and preservation -- until now.

This book, by ZATZ editor-in-chief David Gewirtz, is about helping your business work better. It's about helping you change the things you need to change so your company can perform more effectively.

Plus, through a grant from ZATZ, it's a free download.

Read it and reap.

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login