<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zigron Inc. Blog &#187; Java</title>
	<atom:link href="http://www.zigron.com/blog/category/development/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zigron.com/blog</link>
	<description></description>
	<lastBuildDate>Sat, 24 Jul 2010 03:28:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Writing Custom jsf Components</title>
		<link>http://www.zigron.com/blog/2008/12/17/writing-custom-jsf-components/</link>
		<comments>http://www.zigron.com/blog/2008/12/17/writing-custom-jsf-components/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 12:48:24 +0000</pubDate>
		<dc:creator>Ali Noor</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[jsf Components]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=159</guid>
		<description><![CDATA[What is JSF
 JSF is a server side UI Component based framework for java based web applications. It adapts Component centric approach to develop java web user interfaces, hence simplifying the development. JSF follows the MVC design pattern and creates the manageable separation between the view, application data and logic. 
 Since the true power [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is JSF</strong></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span> </span>JSF is a server side UI Component based framework for java based web applications. It adapts Component centric approach to develop java web user interfaces, hence simplifying the development. JSF follows the MVC design pattern and creates the manageable separation between the view, application data and logic. </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span> </span>Since the true power of JSF lies in the UI component model and JSF allows us to use prebuilt components or we can build our own, depending on our requirements.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Let’s start with creating a custom component, which would also help us understand who the compoenent model works in jsf.</span></p>
<blockquote>
<p class="MsoNormal"><strong><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Writing a Custom JSF Component</span></strong></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span> </span>Lets start with a simple component which takes the email address as an input. </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span> </span>A component is made up of three main classes</span></p>
<p class="ListParagraph" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;"><span>o<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">UIComponent subclass.</span></p>
<p class="ListParagraph" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;"><span>o<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Renderer</span></p>
<p class="ListParagraph" style="margin-left: 1in; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;"><span>o<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">UIComponentTag<strong> </strong>subclass</span></p>
<p class="ListParagraph"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">First of all we start building a UIComponent subclass, since our component is and input component we would extend this class by</span> <em><span style="background: silver none repeat scroll 0% 0%; font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;">javax.faces.component.UIInput</span></em><em><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;">.</span></em></p>
<p class="MsoNormal"><span> </span><strong><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Here is how our class looks like</span></strong></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">class</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> EmailComponent </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">extends</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> <span style="background: silver none repeat scroll 0% 0%;">UIInput</span> {</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">static</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">final</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">EMAIL_FAMILY</span></em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> = </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;EMAILFAMILY&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> EmailComponent() {</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">super</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">();</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>addValidator(</span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">new</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> EmailValidator());</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>}</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String getFamily() {</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">return</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">EMAIL_FAMILY</span></em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;">}</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">The only thing that needs explanation in this class is getFamily() method, this method is used to get the component family which is used to look up the renderer for this component when HTML is to be generated for this component. </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">addValidator();<span> </span>is used to make sure that the user enters a valid email address. The EmailValidator class looks like this,</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;">
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">class</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> EmailValidator </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">implements</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> Validator {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">void</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> validate(FacesContext context, </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>UIComponent component, </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>Object value)</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">throws</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> ValidatorException {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (</span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> != value) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (!(value </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">instanceof</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String)) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">throw</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">new</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> IllegalArgumentException(</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;The value must be a String&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>String email = (String) value;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span style="background: silver none repeat scroll 0% 0%;">Pattern</span> emailPattern = <span style="background: silver none repeat scroll 0% 0%;">Pattern</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.<em>compile</em>(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> +</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;(?:\\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> +</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> +</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>Matcher emailMatcher = emailPattern</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.matcher(email);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (!emailMatcher.matches()) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">throw</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">new</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> ValidatorException(</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">new</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> FacesMessage(</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;Please enter a valid Email Address&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">));</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">}</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;">
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">The important thing to know in this validator is if the string does not match the Matcher, then a new FacesMessage is created and a ValidatorException is thrown. JSF will interpret the ValidationException and get the message from it.</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Another important thing is, this validator is not part of building a custom component.</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">We have created a UIComponent Subclass, now next step is to create a renderer, renderer is responsible for turning the component into HTML and taking posted HTML and turning it into values suitable for the component, these processes are also referred as encoding and decoding.</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Below is the code for the renderer, I think the comments on the code are explaining it well.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;"> </span></strong></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;"> </span></strong></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;"> </span></strong></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;"> </span></strong></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">class</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> EmailRenderer </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">extends</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> Renderer {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">//THIS METHOD IS RESPONSIBLE FOR TAKING ANY PARAMETERS THAT WERE PASSED </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">//IN FROM A FORM POST AND SETTING THE VALUE<span> </span>ON THE COMPONENT</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">void</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> decode(FacesContext context,</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>UIComponent component) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>assertValidInput(context, component);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (component </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">instanceof</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> UIInput) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>UIInput input = (UIInput) component;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>String clientId = input</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.getClientId(context);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>Map requestMap = context</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.getExternalContext()</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.getRequestParameterMap();</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>String newValue = (String) requestMap</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.get(clientId);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (</span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> != newValue) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>input.setSubmittedValue(newValue);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">//THIS METHOD IS RESPONSIBLE FOR BUILDING THE HTML TO REPRESENT //THE COMPONENT IN THE BROWSER</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">//BASICALLY THERE ARE THREE ENCODING METHODS ENCODEBEGIN(), //ENCODECHILDREN() AND ENCODEEND().</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">//SINCE OUR COMPONENT DOESN&#8217;T HAVE ANY CHILDREN WE DON&#8217;T NEED //PREVIOUS TWO METHODS.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">void</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> encodeEnd(FacesContext ctx,</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>UIComponent component) </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">throws</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> IOException {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>assertValidInput(ctx, component);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>ResponseWriter writer = ctx</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.getResponseWriter();</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>writer.startElement(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;input&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, component);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>writer.writeAttribute(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;type&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;text&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;text&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>String id = (String) component</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span>.getClientId(ctx);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>writer.writeAttribute(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;id&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, id, </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;id&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>writer.writeAttribute(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;name&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, id, </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;id&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>String size = (String) component</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.getAttributes().get(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;size&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (</span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> != size) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>writer.writeAttribute(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;size&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, size, </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;size&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>Object currentValue = getValue(component);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>writer.writeAttribute(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;value&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">,</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>formatValue(currentValue), </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;value&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>writer.endElement(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;input&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">protected</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> Object getValue(UIComponent component) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span>Object value = </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (component </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">instanceof</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> UIInput) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>value = ((UIInput) component)</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.getSubmittedValue();</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">// if its not a UIInput or the submitted value</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">// was null then get the value (it should</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">// always be a UIInput)</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (</span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> == value</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>&amp;&amp; component </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">instanceof</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> ValueHolder) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>value = ((ValueHolder) component)</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.getValue();</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">return</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> value;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">private</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String formatValue(Object currentValue) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f5f;">//THIS METHOD SHOULD PERFORM THE CONVERSION NEEDED.IN OUR //CASE WE JUST NEED A STRING.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">return</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> currentValue.toString();</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">private</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">void</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> assertValidInput(</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>FacesContext context, UIComponent component) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (context == </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">throw</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">new</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> NullPointerException(</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;context should not be null&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>} </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">else</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (component == </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">throw</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">new</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> NullPointerException(</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;component should not be null&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;">}</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">We are done with the first two classes, now the last class is the subclass of UIComponentTag.</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Below is the code for this class</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">class</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> EmailInputTag </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">extends</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> UIComponentTag {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">private</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">size</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">private</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">private</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">static</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">final</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String </span><em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">EMAIL_COMP_TYPE</span></em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> = </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;EMAIL_INPUT&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">private</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">static</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">final</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String </span><em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">EMAIL_RENDER_TYPE</span></em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> = </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;EMAIL_RENDERER&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #646464;">@Override</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String getComponentType() {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">return</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">EMAIL_COMP_TYPE</span></em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #646464;">@Override</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String getRendererType() {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">return</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">EMAIL_RENDER_TYPE</span></em><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">protected</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">void</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> setProperties(</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>UIComponent component) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>FacesContext context = FacesContext</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>.<em>getCurrentInstance</em>();</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">super</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">.setProperties(component);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (</span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> != </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">size</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>component.getAttributes().put(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;size&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">size</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (</span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">null</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> != </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">if</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> (<em>isValueReference</em>(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">)) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span><span> </span>ValueExpression ve= context.getApplication().getExpressionFactory().createValueExpression<br />
(context.getELContext(),</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">,String.</span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">class</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">); </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span><span> </span>component.setValueExpression(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;value&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, ve);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>} </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">else</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>((UIInput) component).setValue(</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">);</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String getSize() {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">return</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">size</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">void</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> setSize(String size) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">this</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">.</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">size</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> = size;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> String getValue() {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">return</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">public</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">void</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> setValue(String value) {</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f0055;">this</span></strong><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">.</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #0000c0;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> = value;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>}</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;">}</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Two important methods here, getComponentType() and getRendererType().</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">getComponentType() returns the type of the component that should be created by the tag,this type is sent to the factory for the resolution of the class name and then the instance is created,</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">getRendererType() returns the type of the renderer and the instance is created the same way as mentioned above. These two methods are</span><span style="font-size: 10pt; line-height: 115%; font-family: Verdana; color: black;"> </span><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">responsible for making the connection between the renderer and the component.</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Now we are done with all the coding now we have to do some configuration, in faces-config.xml file we have to register our</span><span style="font-size: 10pt; line-height: 115%; font-family: Verdana; color: black;"> </span><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">custom component with its renderer, like this.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">component</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">component-type</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>EMAIL_INPUT</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">component-type</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">component-class</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span><span> </span>com.zigron.component.EmailComponent</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">component-class</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: #3f7f7f;">component</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><em>Note the &lt;component-type&gt; tag, this is the component type we defined in <strong>com.zigron.tag.EmailInputTag</strong><span> </span>class.</em></p>
<p class="MsoNormal" style="margin-left: 0.5in;">And the renderer<span> </span>like this,</p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">render-kit</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">renderer</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">description</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>Renderer for the Email Input component.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">description</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">component-family</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">EMAILFAMILY</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">component-family</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">renderer-type</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>EMAIL_RENDERER</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">renderer-type</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">renderer-class</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span><span> </span>com.zigron.renderer.EmailRenderer</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">renderer-class</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">renderer</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: #3f7f7f;">render-kit</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">One more missing piece is a the tld that would define the tag for JSP, I would paste a part of the email.tld here.</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">tlib-version</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">0.01</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">tlib-version</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">jsp-version</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">1.2</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">jsp-version</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">short-name</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Email Input Example Component Tag Library</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">short-name</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">uri</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><a href="http://www.zigron.com/jsf/component/email" rel="nofollow">http://www.zigron.com/jsf/component/email</a></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">uri</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">description</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;">This tag library has the tags for the custom jsf component, which is just a simplest example, hence most of the attributes are ignored in this tld</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">description</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">tag</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">name</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">emailInput</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">name</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">tag-class</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">com.zigron.tag.EmailInputTag</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">tag-class</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">body-content</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">empty</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">body-content</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">description</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span>This is the tag for the Email input component.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: #3f7f7f;">description</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">&lt;attribute&gt;….&lt;/attribute&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">…….</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">&lt;/tag&gt;</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;">
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Now we have to use this tag on JSP, for that we need to import our taglib, with the URI we mentioned in our email.tld, i.e<span> </span></span><strong><em><span style="font-size: 10pt; line-height: 115%; font-family: Verdana; color: black;"><a href="../../jsf/component/email"><span><a href="http://www.zigron.com/jsf/component/email" rel="nofollow">http://www.zigron.com/jsf/component/email</a></span></a></span></em></strong></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Here is the example JSP code,</span></p>
<p class="MsoNormal">
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #bf5f3f;">&lt;%@</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">taglib </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">prefix</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;h&#8221;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">uri</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;http://java.sun.com/jsf/html&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #bf5f3f;">%&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #bf5f3f;">&lt;%@</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">taglib </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">prefix</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;f&#8221; </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">uri</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;http://java.sun.com/jsf/core&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #bf5f3f;">%&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #bf5f3f;">&lt;%@</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">taglib </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">prefix</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;email&#8221;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">uri</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;http://www.zigron.com/jsf/component/email&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #bf5f3f;">%&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">html</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">head</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">title</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Custom Email Component</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">title</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">head</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">body</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">f:view</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">p</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">h:messages </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">id</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;messageList&#8221; </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">showSummary</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;true&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">/&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">p</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">h:form</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">h:outputLabel </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">for</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;test&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">h:outputText </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">id</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;testLabel&#8221; </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;Email Address:&#8221;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">/&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">h:outputLabel</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">email:emailInput </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">id</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;test&#8221; </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">size</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;19&#8243;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&#8220;<span style="color: black;">#{test.emailAddress}</span>&#8220;<span style="color: teal;">/&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">br</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">/&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">h:commandButton </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">value</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;Save&#8221; </span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;"><span> </span><span> </span><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #7f007f;">action</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">=</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #2a00ff;">&#8220;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">#{test.showEmailAddress}</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&#8220;<span style="color: teal;">/&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">h:form</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">f:view</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: #3f7f7f;">body</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;">&lt;/</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: #3f7f7f;">html</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: teal;">&gt;</span></p>
</blockquote>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">In this jsp test is the managed bean registered in faces-config.xml.</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Now by combining all the above pieces together our component is now ready to serve.</span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Just for an over view , here is the step by step explanation</span></p>
<p class="ListParagraph" style="margin-left: 73.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span>1.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">The URI prefix is used to find the uri in the tld, (<em>email </em>is the prefix in our example)</span></p>
<p class="ListParagraph" style="margin-left: 73.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><em><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span>2.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span></span></em><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">From the TLD the tag name and class pointing to that tag, under the URI is located, in our case tag name <em>is &lt;name&gt;emailInput&lt;/name&gt; </em>in tld and the tag class is<em> &lt;tag-class&gt;com.zigron.tag.EmailInputTag&lt;/tag-class&gt;.</em></span></p>
<p class="ListParagraph" style="margin-left: 73.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span>3.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">The <em>getComponentType()</em> method of located tag class(<em>com.zigron.tag.EmailInputTag</em>) is called.</span></p>
<p class="ListParagraph" style="margin-left: 73.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span>4.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">The returned value<span> </span>is located in the faces-config.xml file to find out the component class against that component type.( as I mentioned earlier as a Note.)</span></p>
<p class="ListParagraph" style="margin-left: 73.5pt; text-indent: -0.25in;"><!--[if !supportLists]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;"><span>5.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: Verdana;">Finally the component class is located from the faces-config.xml.</span></p>
<p class="ListParagraph" style="margin-left: 73.5pt; text-indent: -0.25in;">
<p>Download Complete Document <a href="http://www.zigron.com/blog/wp-content/uploads/2008/12/custom.rar">Here</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2008/12/17/writing-custom-jsf-components/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
