Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
JSF Mojarra Extension Tags Validation and Focus
JSF Mojarra comes with a small extension tag library with three tags

Here is something you may or may not know. JSF Mojarra comes with a small extension tag library with three tags: regular expression validator, credit card validator, and focus setting tag. They are available since JSF version 1.2_09, but maybe even earlier (I didn’t check).

Page setup
Before using any of the tags, add this xml namespace to your Facelet page:

xmlns:mj="http://mojarra.dev.java.net/mojarra_ext"

Regular expression validator
mj:regexpValidator is probably all you need to validate any kind of input by setting the right expression. For example, to validate an email address:

<h:panelGrid columns="3">
   <h:outputText value="Email:" />
   <h:inputText id="email" value="#{bean.email}"
          validatorMessage="Invalid email">
       <a4j:support event="onblur" />
       <mj:regexValidator pattern=".+@.+\.[a-z]+" />
   </h:inputText>
   <rich:message for="email" />
</h:panelGrid>

Adding RichFaces into the mix to invoke validation onblur event.

Credit card validator
mj:creditcardValidator uses Luhn Algorithm to validate the input.

<h:panelGrid columns="2">
<h:outputText value="Credit card:" />
   <h:inputText id="cc" value="#{bean.creditCard}">
	<a4j:support event="onblur" />
	<mj:creditcardValidator />
   </h:inputText>
<rich:message for="cc" />
</h:panelGrid>

Focus
Lastly, mj:focus tags lets you set a focus on any component inside the current form:

<h:form id="form">
   ...
   <h:inputText id="address" value="#{bean.address}"/>
   ...
<mj:focus for="form:address"/>
</h:form>

The only thing to remember is to set for attribute to client id, not the component id.

That’s it, enjoy these “secret” tags.

Read the original blog entry...

About Max Katz
Max Katz is a Senior Systems Engineer at Exadel. He has been helping customers jump-start their RIA development as well as providing mentoring, consulting, and training. Max is a recognized subject matter expert in the JSF developer community. He has provided JSF/RichFaces training for the past four years, presented at many conferences, and written several published articles on JSF-related topics. Max also leads Exadel's RIA strategy and writes about RIA technologies in his blog, http://mkblog.exadel.com. He is an author of "Practical RichFaces" book (Apress). Max holds a BS in computer science from the University of California, Davis.

Latest Cloud Developer Stories
As a result, it said, of “customer feedback and evolving usage patterns,” Microsoft cut the price of its cloud-ified SQL Azure database 48%–75% for databases larger than 1GB and introduced a new entry-level 100MB model. It blogged that it’s noticed that many projects start smal...
Wide and cheap availability of cloud-based media services is upon us. With the transformations these services are already bringing to the consumption of music, video and interactive media, change has likewise come to professional workflows. Documents in 2012 are read, written, co...
With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical ...
Fresh off a happy quarter, Rackspace said Thursday that it’s bought SharePoint911, one of those you-never-heard-of-them outfits that does SharePoint consulting, training and JumpStart services so it can deliver newfangled SharePoint services along with its existing SharePoint hos...
Cloud is a shift from the focus on underlying technology implementation to leveraging existing implementations and further building upon them. Cloud orchestration or a network of clouds is the wave of the future where these clouds can operate with elasticity, scalability, and eff...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers
ADS BY GOOGLE