<?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; Development</title>
	<atom:link href="http://www.zigron.com/blog/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zigron.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 08 Aug 2010 05:28:08 +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>Symfony application with UI and development code under same structure</title>
		<link>http://www.zigron.com/blog/2010/08/05/symfony-application-with-ui-and-development-code-under-same-structure/</link>
		<comments>http://www.zigron.com/blog/2010/08/05/symfony-application-with-ui-and-development-code-under-same-structure/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 17:22:55 +0000</pubDate>
		<dc:creator>Muhammad Rizwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=260</guid>
		<description><![CDATA[I have been thinking,for quite a long time, of some technique by which one can share the same view files between the developer and the designer inside a symfony based application.
So lets try to do something interesting with symfony and make this possible.
The basic idea behind it is to devise a method that can make [...]]]></description>
			<content:encoded><![CDATA[<p>I have been thinking,for quite a long time, of some technique by which one can share the same view files between the developer and the designer inside a symfony based application.</p>
<p>So lets try to do something interesting with symfony and make this possible.<br />
The basic idea behind it is to devise a method that can make it possible to share the assets (JS files, CSS files, Images etc etc) between the two key persons involved, the developer and the designer so that if any change is made by the guy who is designing something, it automatically gets visible in the application( without the need for the developer to implement it ).</p>
<p>Let’s say the designer is working on the theme of the application, which includes changes in images, CSS and JS files while keeping the structure of pages intact. What happens in routine practice is, the designer makes the changes and hands the updated files over to the developer who embeds the modifications into the CSS and images. The separation of two tasks requires more time and it becomes somewhat difficult for the two people to work on the same view file(s).</p>
<p>For a symfony project the directory structure looks like this:</p>
<p><img class="size-full wp-image-297 alignnone" src="http://www.zigron.com/blog/wp-content/uploads/2010/08/1-riz.jpg" alt="1-riz" width="255" height="374" /></p>
<p>Now inside the &#8216;web&#8217; folder, there are  &#8216;Images, CSS and JS&#8217; folders which contain the Images, CSS and JS files by default.</p>
<p>Let&#8217;s play a little with symfony configuration and create a theme structure!</p>
<p>Create a &#8216;theme&#8217; folder and within this, create &#8216;frontend&#8217; and &#8216;backend&#8217; sub folders. Each of these sub folders will contain themes for the frontend and backend separately, so that we can switch between themes easily in case the need arises.<br />
Having accomplished this, we will have a directory structure which will look somewhat like this:</p>
<p><img class="alignnone size-full wp-image-299" src="http://www.zigron.com/blog/wp-content/uploads/2010/08/3-riz.jpg" alt="3-riz" width="443" height="579" /></p>
<p>Notice that we have moved the &#8216;images, css and js&#8217; folders from main &#8216;web&#8217; folder to their respective UI folders. We get two advantages by doing so: separation of assets of different applications (Layouts) and managing them inside different themes.</p>
<p>Now lets change the application configuration classes so that the default directories for frontend and backend are changed and symfony knows where to look for the required files.</p>
<p>You can make following changes in &#8216;<strong>apps/frontend/config/frontendConfiguration.class.php</strong>&#8216;</p>
<p>Notice that we are changing only the <strong>configure()</strong> function.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
     <span style="color: #009900;">&#123;</span>
       <span style="color: #000088;">$current_theme</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'first_ui'</span><span style="color: #339933;">;</span>
       sfConfig<span style="color: #339933;">::</span><span style="color: #004000;">add</span> <span style="color: #009900;">&#40;</span>
                      <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
                               <span style="color: #0000ff;">'sf_web_images_dir_name'</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'themes'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'frontend'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$current_theme</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'images'</span><span style="color: #339933;">,</span>
                               <span style="color: #0000ff;">'sf_web_css_dir_name'</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'themes'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'frontend'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$current_theme</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'css'</span><span style="color: #339933;">,</span>
                               <span style="color: #0000ff;">'sf_web_js_dir_name'</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'themes'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'frontend'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$current_theme</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'js'</span>
                             <span style="color: #009900;">&#41;</span>
                      <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span></pre></div></div>

<p>This is the time to move all of your images, css anf js files to the respective folders inside the theme folder and symfony will automatically load them from this location.<br />
Now for the last point, in order for the designers to use the same css,js and images lets create a folder &#8216;xhtml&#8217; inside the main project directory. For this the directory structure will be as follows:</p>
<p><img class="alignnone size-full wp-image-300" src="http://www.zigron.com/blog/wp-content/uploads/2010/08/2-riz.jpg" alt="2-riz" width="443" height="691" /></p>
<p>Put the html files inside frontend and backend &#8216;first_ui&#8217; folder and use relative paths for images,css and js files.<br />
To summarize, the benefits which can be obtained by using the above mentioned technique, are:</p>
<ol>
<li>No need of the developers to implement minor changes given by designers, designers can directly edit design changes right into the application.</li>
<li>No need to manage separate svn for application code and application Ui, each UI change will be there side by side the application code inside the same svn repository.</li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2010/08/05/symfony-application-with-ui-and-development-code-under-same-structure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thinkfinity.org wins &#8220;Best in Tech&#8221; award</title>
		<link>http://www.zigron.com/blog/2010/07/24/thinkfinity-org-wins-best-in-tech-award/</link>
		<comments>http://www.zigron.com/blog/2010/07/24/thinkfinity-org-wins-best-in-tech-award/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 03:27:43 +0000</pubDate>
		<dc:creator>Haris Khan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Zigron Inc]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=255</guid>
		<description><![CDATA[The official website of Thinkfinity, an organization founded by Verizon Inc has won the the ‘Best in Tech’ website award for 2010 by Scholastic Administrator magazine in International Society for Technology in Education (ISTE 2010) conference. To read the story behind the success of http://www.thinkfinity.org please download our casestudy pdf.
]]></description>
			<content:encoded><![CDATA[<p>The official website of <a href="http://thinkfinity.org" target="_blank">Thinkfinity</a>, an organization founded by <a href="http://www.verizon.com" target="_blank">Verizon Inc</a> has won the the <a href="http://www2.scholastic.com/browse/article.jsp?id=3754309" target="_blank">‘Best in Tech’</a> website award for 2010 by <a href="http://www2.scholastic.com/browse/home.jsp" target="_blank">Scholastic Administrator</a> magazine in International Society for Technology in Education (<a href="http://center.uoregon.edu/ISTE/2010/" target="_blank">ISTE 2010</a>) conference. To read the story behind the success of <a href="http://www.thinkfinity.org" rel="nofollow">http://www.thinkfinity.org</a> please download our <a href="http://www.zigron.com/technology/thinkfinity-Case-Study.pdf" target="_blank">casestudy pdf</a>.</p>
<p style="text-align: center;"><img class="size-medium wp-image-257 aligncenter" title="BIT_Final_AdminLogo" src="http://www.zigron.com/blog/wp-content/uploads/2010/07/Scholastic-Disrict-Admin-award1-300x256.jpg" alt="BIT_Final_AdminLogo" width="300" height="256" /></p>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2010/07/24/thinkfinity-org-wins-best-in-tech-award/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
		<item>
		<title>CodeIgniter, does one really need it?</title>
		<link>http://www.zigron.com/blog/2008/10/21/codeigniter-does-one-really-need-it/</link>
		<comments>http://www.zigron.com/blog/2008/10/21/codeigniter-does-one-really-need-it/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 15:23:15 +0000</pubDate>
		<dc:creator>Jawad Khan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[MVC framework]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[php cake framework]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=58</guid>
		<description><![CDATA[
Few weeks ago, I started work to make my own PHP based MVC framework, all I wanted was a simpler and lighter MVC framework. I just intended to write a controller which can communicate with the model and views. In my googling, I found out CodeIgniter reviews, which were something like &#8220;a light weight PHP [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 9]&amp;gt;  Normal 0     false false false  EN-US X-NONE X-NONE              MicrosoftInternetExplorer4              &amp;lt;![endif]--><!--[if gte mso 9]&amp;gt;                                                                                                                                            &amp;lt;![endif]--></p>
<p class="MsoNormal">Few weeks ago, I started work to make my own PHP based <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC framework</a>, all I wanted was a simpler and lighter MVC framework. I just intended to write a controller which can communicate with the model and views. In my googling, I found out <a href="http://www.codeigniter.com/">CodeIgniter</a> reviews, which were something like &#8220;a light weight PHP framework&#8221;. I started to look into CodeIgniter. I found it exactly as I was looking for. There was no need to re-invent the wheel, so I spent next few nights with the codeIgniter. I had already worked with Symfony and little bit with cakePHP, so the question arises why to look for any other PHP MVC framework? even when these both are the top frameworks in most comparisons. The answer is yes, Actually Symfony is really great framework for medium to large web applications. It’s good if project is very much scalable and got proper time-line. But If you got a project in which you really need to apply RAD &#8216;Rapid application development&#8217;, in which you do not have much time for deployments, framework installations, PEAR installations, framework plugins supports, You don&#8217;t want to do Propel build models and re-generate ORM classes or you simply can&#8217;t spend time on writing YAML schema files. In addition to these you also do not want your code to get messy, you really don&#8217;t want the business-logic and presentation together in single files OR you just want nothing fancy but a simple MVC framework where you just code and execute. So that’s where CodeIgniter fits in.</p>
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">Not only CI is light weight, but to assist Programmers write faster code, it comes up with already made classes like: File uploading Class, FTP class, Email class (which supports HTML email, attachments), Pagination, Data encryption, calendar classes and few more. These all classes are by default part of CI. To use those classes, programmers need to include them in their actions. CI uses Active Record for database access, which is fairly simple. CI does all error logging just like the giant frameworks. CI also uses <a href="http://www.zigron.com/blog/2008/04/25/careful-development-good-optimization/">Search Engine Friendly URLs</a> by default.</p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal">
<p class="MsoNormal">Now with open source PHP frameworks like CI, symfony and cakePHP, coding is done OOPs way, code remains managed and re-usable. Also Web-applications are built faster and scalable. The good thing about PHP related technologies is that they are open-source, which also means greater and world wide support through a healthy and ever growing community.</p>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2008/10/21/codeigniter-does-one-really-need-it/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mobile Development Overview..</title>
		<link>http://www.zigron.com/blog/2008/08/21/mobile-development-overview/</link>
		<comments>http://www.zigron.com/blog/2008/08/21/mobile-development-overview/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 07:41:25 +0000</pubDate>
		<dc:creator>Haris Khan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Zigron Inc]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=52</guid>
		<description><![CDATA[Mobile space is the next paradigm of computing where more and more mobile devices are getting the computational power to now host interactive native applications. Offcourse iPhone has taken a giant leap but now other devices are also catching up. Recently we spent sometime to figure out which development environment will be best suited for [...]]]></description>
			<content:encoded><![CDATA[<p>Mobile space is the next paradigm of computing where more and more mobile devices are getting the computational power to now host interactive native applications. Offcourse iPhone has taken a giant leap but now other devices are also catching up. Recently we spent sometime to figure out which development environment will be best suited for new generation of mobile applications. In this report we have not covered FlashLite and iPhone.  As a result we produced a technical  discovery document to explore different mobile application development environments and how one can go about it. Below is the report and you can also <a href="http://www.zigron.com/blog/wp-content/uploads/2008/08/mobile-development-report.pdf" target="_blank">download</a> the pdf version of report.</p>
<p><span style="color: #333333;"><strong><em>This report was created by : Abdul Wadood, Atifa Nadeem, Naima Khan and Haris Khan.</em></strong></span></p>
<p><strong><span style="text-decoration: underline;">Overview:</span><br />
</strong><br />
Mobile application depends heavily on the exact requirements. Our basic assumptions are stated in the section 3. Based on the basic requirement to create a very generic mobile application following are the three approaches in the order of our preference:</p>
<ul>
<li>Considering the basic and generic requirements Java ME is the ideal development platform. We can adopt different approaches within Java ME to reduce the development effort to make the application ready for all possible platforms and devices. Biggest drawback for this approach will be the application performance and security as this app will run on top of JVM.</li>
</ul>
<ul>
<li>Second approach is to create a custom Mobile Execution Environment. We will need to develop this environment for each platform with minimum interfaces/APIs as per our requirements. This will result in more effort to create such MEEs for each platform/handset but application development will be rapid. Users will require downloading our own MEE just like they need to download JVMs.</li>
</ul>
<ul>
<li>Finally the most stable and secure approach will be to create each application in platform’s native language. This will be requiring substantial effort but application’s performance will be at its best.</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Development Platforms/Technologies</strong></span></p>
<p>In this section we have briefly explained how each development platform will be used across different handsets and OS for basic features.</p>
<p><strong>1)- <a href="http://java.sun.com/javame/index.jsp" target="_blank">Java ME</a> (formerly, J2ME)</strong></p>
<p>Introduction / Development Approach:</p>
<ul>
<li>Java ME Platform represents the only true open solution for building mobile applications for the industry. The technology allows portability of applications between platforms and investments are kept to a minimum through the possibility of reuse.</li>
</ul>
<ul>
<li>The Java ME technology is based on three elements:</li>
</ul>
<p>a- A configuration provides the most basic set of libraries and virtual machine capabilities for a broad range of devices.<br />
b- A profile is a set of APIs that support a narrower range of devices.<br />
c- An optional package is a set of technology-specific APIs.<br />
<strong><br />
Deployment Approach:</strong></p>
<p><strong></strong><br />
To be MIDP 2.0-compliant, devices must support OTA provisioning. The easiest way to package MIDlets for wireless installation is to use the J2ME Wireless Toolkit, which incorporates a small provisioning server that emulates a production OTA environment. Available in version 2.0 Beta 2 and later versions of the toolkit, this nice feature enables you to get an idea of whether a server will provision a device with your application successfully without the hassle of setting up and configuring a local web server to act as an OTA server. Some MIDP 2.0 features &#8211; like the push registry &#8211; are available only to applications downloaded via OTA. If your application uses those features, the built-in OTA server is a critical tool of the development process.</p>
<p><strong>Features:</strong><strong></strong></p>
<p style="padding-left: 30px;"><strong>PUSH</strong></p>
<p style="padding-left: 30px;">The MIDP includes a feature called &#8220;PUSH Registry&#8221; to push data from server to mobile devices, without the interaction of user. The MIDlet registers a port along with the protocol name in the mobile device. From the server, a message is sent to the specific mobile device using the particular protocol and port where the MIDlet application is registered to listen. After the message is delivered to the mobile device, the AMS calls the MIDlet application. Once the message is delivered to the MIDlet, it is the application&#8217;s responsibility to process the message accordingly.</p>
<p style="padding-left: 30px;"><strong>SMS Integration</strong></p>
<ul>
<li>The Wireless Messaging API (WMA) is an optional package for J2ME that provides platform-independent access to wireless communication resources like Short Message Service (SMS). WMA can be used on top of CLDC and MIDP.</li>
</ul>
<ul>
<li>There are many third party APIs available for SMS integration in Java ME applications. Some examples are Java SMS library from new-phone.com, SMS JDK from NCL Technologies Ltd, jSMS from objectXP, etc.</li>
</ul>
<p style="padding-left: 30px;"><strong>Data Synchronization:</strong></p>
<ul>
<li>Recently released, Sun&#8217;s Mobile Enterprise Platform (MEP), provides two-way data synchronization with security, device management and off-line access features for enterprises. It can integrate data from a wide range of back end applications.</li>
</ul>
<ul>
<li>A third party API, Sync4j is an open source initiative to deliver a complete mobile application platform implementing the SyncML protocol. SyncML defines a standard way to synchronize data and remotely manage devices. Sync4j provides SyncML client APIs (J2SE, J2ME and C++) that you can use to build an application.</li>
</ul>
<p style="padding-left: 30px;"><strong>Devices and Platforms:</strong></p>
<p style="padding-left: 30px;"><strong>Motorola:</strong></p>
<ul>
<li>MOTOMAGX, Motorola&#8217;s next-generation Mobile Linux®, supports three different application environment– Java ME, Web UI and native Linux</li>
</ul>
<ul>
<li>MOTODEV Studio for Java ME, Motorola&#8217;s robust toolset for developer innovation currently supports the Java ME application environment on many Motorola handsets and wireless modules</li>
</ul>
<p style="padding-left: 30px;"><strong>Nokia:</strong></p>
<ul>
<li>Nokia phones have an extensive Java ME API set</li>
</ul>
<ul>
<li>Nokia provides support for the industry’s leading open-source Java™ IDEs: NetBeans and Eclipse. Both IDEs offer robust tools that make it easy to create high-quality Java applications efficiently</li>
</ul>
<p style="padding-left: 30px;"><strong>Blackberry:</strong></p>
<ul>
<li>Many new Blackberry devices support the Java 2 Platform, Micro Edition (J2ME), primarily because Java technology makes developing applications so much easier. Its platform-independence eliminates many porting woes and its automatic garbage collection lets developers concentrate on application logic rather than memory management</li>
</ul>
<ul>
<li>In addition to Java-based handhelds, RIM offers a BlackBerry Development Environment for J2ME</li>
</ul>
<p style="padding-left: 30px;"><strong>Samsung:</strong></p>
<ul>
<li>Some Samsung handsets give errors for J2ME (user experience). Some users have reported errors like Samsung not suitable for J2ME game developers, slow emulator, Java apps can only be loaded via OTA, giving &#8220;Unsupported content error&#8221; on Samsung F490 phone</li>
</ul>
<p style="padding-left: 30px;"><strong>LiMO:</strong></p>
<ul>
<li>LiMO application developers will be able to use SDKs to write managed code running in a Java virtual machine, browser apps for WebKit, and native code.</li>
</ul>
<p style="padding-left: 30px;"><strong>S60:</strong></p>
<ul>
<li>It supports Java (J2ME MIDP 2.0 commonly, but varies from phone to phone) applications and Symbian C++ applications.</li>
</ul>
<p style="padding-left: 30px;"><strong>Wireless Providers:</strong></p>
<p style="padding-left: 30px;"><strong>Verizon</strong></p>
<ul>
<li>Verizon Wireless doesn&#8217;t offer J2ME support on their phones. Instead, it uses BREW but one can run J2ME applications via BREW-Authored KVM but still it is not that simple</li>
</ul>
<p style="padding-left: 30px;"><strong>T-Mobile</strong></p>
<ul>
<li>Users are able to download J2ME apps (JAD+JAR) if they have an offline app, like a standalone mobile game but if the app requires an internet connection the users will be able to access internet if and only if:</li>
</ul>
<ul>
<li>The application was signed with a T-Mobile certificate, or</li>
</ul>
<ul>
<li>The user has a $20 &#8220;total internet&#8221; plan instead of the regular $6 T-Zones one, or</li>
</ul>
<ul>
<li>The handset was not bought through T-Mobile</li>
</ul>
<p>In short, if you are aiming for a mass-market consumer application and not just one targeted at business users or tech-savvy users, your hands are pretty much tied. The only way to achieve that goal is to go on-deck with T-Mobile</p>
<p style="padding-left: 30px;"><strong>AT&amp;T</strong></p>
<ul>
<li>AT&amp;T appears to be a little less strict than T-Mobile. You can download J2ME applications from anywhere, other applications that want to use socket communication, access to the file system, address book and messaging (SMS/MMS) will probably be blocked</li>
</ul>
<p><strong> 2)- <a href="http://brew.qualcomm.com/brew/en/" target="_blank">BREW</a></strong></p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Introduction/ Development Approach</span></p>
<ul>
<li>BREW is a software platform that can download and run small programs for playing games, sending messages, sharing photos, etc.</li>
</ul>
<ul>
<li>Using BREW, you can easily port your applications between all Qualcomm devices.</li>
</ul>
<ul>
<li>BREW applications can be written using Java™, C, or C++.</li>
</ul>
<ul>
<li>Unlike the Java ME platform where any developer can upload and execute software on any supported handset, BREW applications must be digitally signed</li>
</ul>
<ul>
<li>The BREW developer community is fairly small and limited to Qualcomm&#8217;s boards and web sites.</li>
</ul>
<ul>
<li>BREW code can only be compressed if you devise your own method or buy a commercial solution.</li>
</ul>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"> Deployment Approach</span></p>
<ul>
<li>Compile for the specific BREW version available on the handset.</li>
</ul>
<ul>
<li>Installer Packaging Options: OTA</li>
</ul>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Features</span></p>
<ul>
<li>PUSH:</li>
</ul>
<p style="padding-left: 30px;">Brew compatible mobile phones can get push based sms/email on the Alltel’s network</p>
<ul>
<li>SMS Integration:</li>
</ul>
<p style="padding-left: 30px;">Interfaces like ISMS, ISMSMsg, ISMSNotifier, and ISMSStorage are there to handle SMS integration for BREW applications.</p>
<ul>
<li>Data Synchronization:</li>
</ul>
<p style="padding-left: 30px;">Open Mobile Alliance for Data Synchronization and Device Management.</p>
<ul>
<li>Devices and Platforms</li>
</ul>
<p style="padding-left: 30px;">The BREW platform is pre-integrated into the MSM™ chip software and includes reference implementations for many other device-specific issues (drivers and UI). All the mobile vendors doesn’t provide with MSM™ chip. So, we have very limited number of mobiles by default for running BREW application.</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Wireless Providers</span></p>
<p style="padding-left: 30px;">Every mobile vendor is supposed to provide handset with the support of BREW for different wireless providers.</p>
<p><strong>3)-  <a href="http://www.microsoft.com/windowsmobile/startdoingmore/phones.html?CMXID=2120.F2D979F1-3582-448E-A116-DD0D22A5329D&amp;WT.srch=1" target="_blank">Windows Mobile</a></strong></p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Introduction/ Development Approach</span></p>
<ul>
<li>Windows Mobile is an operating system for mobile devices, based on Microsoft Win32 API.</li>
</ul>
<ul>
<li>Devices that run Windows Mobile include Pocket PCs, Smartphones, Portable Media Centers, etc.</li>
</ul>
<ul>
<li>For application development there are different options available, including:</li>
</ul>
<ul>
<li>Writing native code with Visual C++</li>
</ul>
<ul>
<li>Writing Managed code that works with the .NET Compact Framework</li>
</ul>
<ul>
<li>Developing an application using Java Me. There is a limitation if you develop an application in Java ME for Windows Mobile platform. Sun doesn&#8217;t officially support windows mobile devices and Sun hasn&#8217;t released an official JVM for pocket PC&#8217;s so you must go to a third party solution if you intend to use Java ME on Windows Mobile platform.</li>
</ul>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Deployment Approach</span></p>
<p style="padding-left: 30px;">Windows Mobile-based Smartphones and Windows Mobile-based Pocket PCs (Phone Edition) can be bootstrapped by means of over-the-air (OTA) Wireless Application Protocol (WAP) push. This method is useful if the mobile operator prefers to bootstrap the device over the air at the point of sale or after purchase. In this method, a provisioning document that uses the format defined in the WAP Provisioning specifications can be pushed to the device over the air through the WAP connectionless non-secure push mechanism over the Mobile Terminated Short Message Service (SMS) bearer.</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Features</span></p>
<ul>
<li>PUSH</li>
</ul>
<p style="padding-left: 30px;">The &#8220;Direct Push Technology&#8221; from Microsoft uses Exchange ActiveSync to keep data on a Windows Mobile based device synchronized with data on a Microsoft Exchange server. The ActiveSync technology on the device manages the direct push communication with Exchange Server. It establishes an HTTP connection with the server for a specified time, and then goes to sleep while waiting for the server to respond. The server responds with either a status indicating that new items were received or that no new items arrived. The device then sends either a synchronization request or another direct push request. Exchange Server 2003 Service Pack 2 includes a direct push component that augments the Exchange ActiveSync infrastructure that supports synchronization.</p>
<ul>
<li>SMS Integration</li>
</ul>
<p style="padding-left: 30px;">.Net Compact Framework provides different DLLs for SMS integrations (Microsoft.WindowsMobile.dll, Microsoft.WindowsMobile.PocketOutlook.dll). Using these DLLs you can integrate SMS Send and Receive functionality as well as SMS filtering support in your mobile application.</p>
<ul>
<li>Data Synchronization</li>
</ul>
<p style="padding-left: 30px;">Exchange Server 2003 is used to synchronize data using ActiveSync. It uses OTA for Installer Packaging.</p>
<ul>
<li>Devices and Platforms</li>
</ul>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Nokia &amp; Sony Ericsson</span><br />
Net60 is an implementation from Red Filve Labs to bring .Net Compact Framework applications unchanged, to Symbian platform (the OS running the Nokia and Sony Ericsson Smartphones).</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Wireless Providers</span></p>
<p style="padding-left: 30px;">Most of the carriers have handsets with Windows Mobile.</p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;"><em><span style="color: #333333;">If you have any queries please feel free to contact me at haris[dot]khan[at]zigron[dot]com</span></em></p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;"><a href="http://www.zigron.com/blog/wp-content/uploads/2008/08/mobile-development-report.pdf"><img class="alignleft size-full wp-image-53" title="pdf-icon" src="http://www.zigron.com/blog/wp-content/uploads/2008/08/pdf-icon.jpg" alt="" width="60" height="60" /></a></p>
<p style="padding-left: 30px;"><span style="color: #808080;"><strong>Download the report</strong></span></p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;">
<p style="padding-left: 30px;">
<p style="padding-left: 30px;">]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2008/08/21/mobile-development-overview/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>User Xperience + Technology  + Real World</title>
		<link>http://www.zigron.com/blog/2008/07/01/user-xperience-technology-real-world/</link>
		<comments>http://www.zigron.com/blog/2008/07/01/user-xperience-technology-real-world/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 23:32:15 +0000</pubDate>
		<dc:creator>Haris Khan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Zigron Inc]]></category>
		<category><![CDATA[ATM]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=44</guid>
		<description><![CDATA[

For some time I have noticed that in blogosphere, User Xperience has mostly been associated with Web 2.0 companies and hardware devices, well actually only one hardware i.e iPhone. So I decided to go out and see where I can find innovation in UX apart from the web.
On this great adventure the first experience I [...]]]></description>
			<content:encoded><![CDATA[<p><!--StartFragment--></p>
<p class="MsoNormal"><img class="alignleft size-full wp-image-45" title="picture-21" src="http://www.zigron.com/blog/wp-content/uploads/2008/06/picture-21.png" alt="" width="363" height="226" /></p>
<p class="MsoNormal">For some time I have noticed that in blogosphere, User Xperience has mostly been associated with Web 2.0 companies and hardware devices, well actually only one hardware i.e iPhone. So I decided to go out and see where I can find innovation in UX apart from the web.</p>
<p class="MsoNormal">On this great adventure the first experience I stumbled across was <a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=1640+Van+Ness+Ave,San+Francisco&amp;sll=37.794033,-122.423787&amp;sspn=0.007885,0.018797&amp;ie=UTF8&amp;ll=37.791812,-122.421126&amp;spn=0.007885,0.018797&amp;z=16&amp;iwloc=addr" target="_blank">Bank Of America&#8217;s ATM on Van Ness street</a> in San Francisco. I had this old check, which I was planning to deposit for sometime, but hesitated because my last experience with Chase’s ATM in Chicago to deposit a check was very clumsy. One had to seal the check in an envelope, which the machine will vent out and then write the amount and your account info on top of it. One also has to feed in the check amount. Usually I don&#8217;t have a pen with me so it was another embarrassing moment and interestingly most ATM machines have a slanting face which makes it even harder to use it as base to write on it.</p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Anyway this time around, when I was expecting the ATM to throw an empty envelope out, it just asked me to slide the check in a slot which had a blinking light. For a moment I was taken a back and didnt know what to do but the ATM kept beeping. After gaining some intelligence I decided to slide the check in and said to myself that worst come to worst I will just lose it as it wasn’t that big of an amount. It was from a friend who owed me some grocery money, luckily she wasn&#8217;t that hungry while grocery shopping.<br />
</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Eager to see what will happen, the ATM showed me the scanned copy of my check with the exact amount to two decimal points. It had scanned it on the fly and by using some recognition software had understood my friends handwritten amount to the exact amount. While I was still star struck and excited with the experience, I had my receipt in my hand with a scanned printout of the actual check I just deposited.</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Now I call this a true user experience. Next time I will make a video of it. So feel free to send me some checks and please feel free to be liberal with the amount <img src='http://www.zigron.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </span></p>
<p><!--EndFragment--></p>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2008/07/01/user-xperience-technology-real-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why we use symfony Framework</title>
		<link>http://www.zigron.com/blog/2008/06/28/why-we-use-symfony-framework/</link>
		<comments>http://www.zigron.com/blog/2008/06/28/why-we-use-symfony-framework/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 05:59:31 +0000</pubDate>
		<dc:creator>Abdul Wahid</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Zigron Inc]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=42</guid>
		<description><![CDATA[Three years ago I was coding in simple PHP and never heard of any frameworks then after one year I started using frameworks in javascript i.e prototype etc. Soon I realize working in framework makes your life easier, your code is organized, standardized and most importantly your development is fast. It does not matter what [...]]]></description>
			<content:encoded><![CDATA[<p>Three years ago I was coding in simple PHP and never heard of any frameworks then after one year I started using frameworks in javascript i.e prototype etc. Soon I realize working in framework makes your life easier, your code is organized, standardized and most importantly your development is fast. It does not matter what framework you want to chose the basic aim of any framework is rapid development. Mostly client is concerned with how quickly you can provide the product, you code simple or use framework is the least concern. An efficient software always has the least code, and framework always tries to facilitate developer to code as little as possible. <a href="http://www.phpwact.org/php/mvc_frameworks">Currently there are 40 frameworks available for PHP</a> and this shows the success and importance of frameworks.</p>
<div>
<p><a href="http://www.phpit.net/demo/framework%20comparison/chart.php" target="_blank">here is the comparison of top ten PHP frameworks</a> by phpit</p>
</div>
<div style="center;"><a title="phpit" href="http://www.phpit.net/demo/framework%20comparison/chart.php"><img class="alignnone aligncenter" src="http://farm4.static.flickr.com/3178/2586654016_d51479261b.jpg?v=0" alt="" /></a></div>
<div>
<p>Our team has worked on various frameworks i.e cakePHP, symfony etc and found out that symfony is little efficient than others. Symfony also has an edge over its documentation plus its community is much better than others.</p>
<p>Some people criticize symfony on the basis that why should they learn a new language i.e yml or propel etc but we think one can learn yml in no time and propel provides you optimized sql queries and database abstraction layer. The database abstraction will provide you the opportunity to shift to any DBMS anytime by just making some configuration changes. This feature will help you when you do not know the DBMS of a client project or the client is not sure about the DBMS, you can choose any DBMS and can shift to any DBMS.</p>
<p>Symfony is so flexible that you can bypass the whole symfony processing and can send the pages direct to server. You can customize it according to your needs to have an optimized solution. Its overhead is so minor that it can be ignored.Its powerful cache feature improves the efficiency of the project. Its debug tool bar or dev mode which will provide you lots of information about the page e.g: sql queries,request, response, page load time etc &#8230; and when you want to deploy to the production and get rid of debug statements than just a little configuration change is needed.</p>
<p>In organization where you have multiple developers working on same project, you need to follow a certain standard so that everyone is able to understand others developers code. If you are following a standard than it is very convenient for new employees to adjust and also replacement of leaving employee can be very quick. Therefore we have decided to set symfony as our standard framework.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2008/06/28/why-we-use-symfony-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Story Behind The Development Of PingMyCompany.com</title>
		<link>http://www.zigron.com/blog/2008/06/20/the-story-behind-the-development-of-pingmycompanycom/</link>
		<comments>http://www.zigron.com/blog/2008/06/20/the-story-behind-the-development-of-pingmycompanycom/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 21:36:54 +0000</pubDate>
		<dc:creator>Rashid Idris</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PingMyCompany]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Zigron Inc]]></category>
		<category><![CDATA[PHP development]]></category>
		<category><![CDATA[pingmycompany.com]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=43</guid>
		<description><![CDATA[It was one fine morning, when I came to office and started my work on ZEPRS [an under development project], suddenly phone RANG, I picked. Who is this? I am here, sounded familiar to me, I thought for a moment and realized that my CEO is on other side. Yes Sir, was my second reply.
&#8220;I [...]]]></description>
			<content:encoded><![CDATA[<p>It was one fine morning, when I came to office and started my work on ZEPRS [an under development project], suddenly phone RANG, I picked. Who is this? I am here, sounded familiar to me, I thought for a moment and realized that my CEO is on other side. Yes Sir, was my second reply.</p>
<p style="30px"><em>&#8220;I need just 2 pages, one where people can add a company and another page they can post for that company. There will two categories of post, In Favor and Against. And I want to show those posts side by side, something like <a href="http://www.zebate.com">Zebate</a> <img src='http://www.zigron.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  and that&#8217;s it. No design, No formatting nothing else&#8230;&#8230;&#8230;&#8230;&#8230;&#8221; </em><strong>CEO&#8217;s Words</strong></p>
<p><a href="http://www.pingmycompany.com"><img class="alignleft" src="http://www.pingmycompany.com/images/logo.gif" alt="" width="312" height="70" /></a></p>
<p>I really wasn&#8217;t in mood of working on this &#8220;something like Zebate&#8221; thing, but it was CEO&#8217;s order so &#8230;&#8230;&#8230;&#8230;. that day and it was now, this ping, that ping, that ping, this ping, ping, ping, ping.</p>
<p>PingMyCompany was initially <strong>RateMyCompany </strong>but A great developer&#8217;s mind got PINGED and it was changed to <strong>PingMyCompany</strong>. Also after first release it was noticed that &#8220;PING&#8221; is only in our logo and no where else in the site, so it was decided to change all &#8220;comments&#8221; &amp; &#8220;post&#8221; to &#8220;PING&#8221;, just to have PINGY touch across the site.</p>
<p>Well, now it&#8217;s PingMyCompany.com, and let me share some of technical aspects of the site. Here it goes:</p>
<p>Firstly, why CEO got this idea to develop such a platform? It was Zigron&#8217;s review on Green &amp; White, where there been a long debate on Zigron&#8217;s hiring process. It meant, people talk about companies, and when they talk so, they would definitely love to ping for or against a company&#8230;.. Isn&#8217;t it?</p>
<p>Now development: PMC is developed in <span style="#ff6600;"><strong>PHP/MySQL (v5)</strong></span>,It was started on <span style="#ff6600;"><span style="#ff9900;"><span style="#ff9900;">18th April 2008</span></span></span>, and first release was online on<span style="#ff9900;"> <span style="#ff6600;"><span style="#ff9900;">24th April 2008</span></span></span>. It took 3-4 days exactly to put this this Live for 6 Billion people. Wow&#8230;.! Well, this was the first release and contained very simple interface and features. Here&#8217;s the very first layout:</p>
<p><a href="http://i174.photobucket.com/albums/w82/quratgreat/pmcold.jpg"><img src="http://i174.photobucket.com/albums/w82/quratgreat/pmcold.jpg" alt="" width="698" height="489" /></a></p>
<p>And after this first release, many revisions came and in each revision new feature pinged in it, making it <strong><span style="#ff6600;">simpler</span></strong>, <strong><span style="#ff6600;">user friendly</span></strong>, <strong><span style="#ff6600;">SEO friendly</span></strong> and lot more features. The summary of all those features is as follows.</p>
<p>Few of <span style="#ff6600;"><strong>web 2.0 features</strong></span> it currently have are <span style="#ff6600;"><strong>RSS feeds, DIV based interfaces, AJAX Postings, Sharing, Clouds, </strong></span>etc. It also has<strong> Translation Feature</strong> and <strong>Twitter integration</strong>. A bit of detailed description of these features is as follows.</p>
<p>I have used AJAX &amp; DIV based interfaces so that users can have better User Xperience &amp; quick response time. AJAX has been involved where ever it was feasable like paging, sharing, pinging, adding company etc&#8230; I have used <a title="Prototype" href="http://www.prototypejs.org/">Prototype JS </a>toolkit (v1.6) for all ajax related work. I will soon be integrating <a href="http://script.aculo.us/">Scriptaculos </a>toolkit (v1.8) for better and cool AJAX affects.</p>
<p>I took the full advantage of MySql fulltext search features to give a better search results for users. However there has been few limitations as well in fulltext for which I am writing a custom solution to eliminate those limitations.</p>
<p>Through RSS you can get Latest PingMyCompany feeds. Right now we provide full text feeds. Of the multiple RSS formats that exist today (RSS 0.91, RSS 0.92, RSS 2.0), PingMyCompany supports only the 2.0 specification for now. You can get PingMyCompany feed from <a id="mavu" href="http://www.pingmycompany.com/rss/feed.rss">http://www.pingmycompany.com/rss/feed.rss</a></p>
<p>It also supports Twitter postings for all those who want to follow all updates on Twitter. You can follow it from <a id="ids9" href="http://twitter.com/pingmycompany">http://twitter.com/pingmycompany</a></p>
<p>A full blown Admin panel has also been written to control everything. This is currently a small scale web application, yet with latest buzzing web features and this is not the end, we&#8217;re on the go to add more n more&#8230;.</p>
<p style="30px"><em>&#8220;To be very honest, I was not interested working on this application at first but now, after working on this for a month, It looks like that i fell in kind of love with PMC. It really made me learn lot of news things, and polish my existing skills. After working on this project, I really see a significant improvment in my skill set. Thanks to PMC for </em><strong><em>Pinging My Mind&#8221;.</em> </strong></p>
<p style="30px"><strong>PS:</strong> Special thanks to CEO (Haris Khan) for His this nice Idea and a bundle of thanks to Zigron Admin and everyone who were involved directly or indirectly in this project and shared there views, suggestions, appreciation, improvments from time to time to make PMC more consistant and reliable.</p>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2008/06/20/the-story-behind-the-development-of-pingmycompanycom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Image Selection in JSF</title>
		<link>http://www.zigron.com/blog/2008/06/18/image-selection-in-jsf/</link>
		<comments>http://www.zigron.com/blog/2008/06/18/image-selection-in-jsf/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 10:50:45 +0000</pubDate>
		<dc:creator>Faisal Jameel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Zigron Inc]]></category>
		<category><![CDATA[Image Selection Component in JSF]]></category>
		<category><![CDATA[Image Selection in JSF]]></category>
		<category><![CDATA[JSF Image Selection]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/?p=41</guid>
		<description><![CDATA[JSF is really nice, but developers sometimes feel suffocated because there aren’t enough components. Recently I ran into a problem of displaying a list of images in grid or you could say in form of rows and columns and being able to select one of them using radio buttons. I searched on the internet but [...]]]></description>
			<content:encoded><![CDATA[<p>JSF is really nice, but developers sometimes feel suffocated because there aren’t enough components. Recently I ran into a problem of displaying a list of images in grid or you could say in form of rows and columns and being able to select one of them using radio buttons. I searched on the internet but couldn’t find any component that gave the desired functionality. So our team came up with an elegant extensible solution that I feel that I should share with the world since human knowledge belongs to the world.</p>
<p style="text-align: center;" align="center"><span style="text-decoration: none;">&lt;!&#8211;[if !vml]&#8211;&gt;<span><img class="alignnone size-medium wp-image-5 aligncenter" src="http://richfaces.wordpress.com/files/2008/06/image-list.jpg?w=300" border="0" alt="" width="300" height="92" /></span>&lt;!&#8211;[endif]&#8211;&gt;</span></p>
<p>The JSP code to achieve the results of figure looks like:-</p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">1 &lt;</span><span style="font-size: 10pt; font-family: ">div </span><span style="font-size: 10pt; font-family: ">style</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;width:620px;height:270px; overflow:auto;&#8221;</span><span style="font-size: 10pt; font-family: ">&gt;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">2<span> </span>&lt;</span><span style="font-size: 10pt; font-family: ">a4j:repeat<span> </span></span><span style="font-size: 10pt; font-family: ">value</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;<span style="color: black;">#{controller.imageList}</span>&#8220;<span style="color: black;"> </span><span style="color: #7f007f;">var</span><span style="color: black;">=</span><span style="color: #2a00ff;">&#8220;imageList&#8221;</span><span style="color: teal;">&gt;</span></span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">3<span> </span>&lt;</span><span style="font-size: 10pt; font-family: ">div<span> </span></span><span style="font-size: 10pt; font-family: ">style</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;width:85px;float:left;&#8221;</span><span style="font-size: 10pt; font-family: ">&gt;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">4<span> </span></span><span style="font-size: 10pt; font-family: ">&lt;</span><span style="font-size: 10pt; font-family: ">h:graphicImage </span><span style="font-size: 10pt; font-family: ">style</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;border:2px solid #ccc;&#8221; </span><span style="font-size: 10pt; font-family: ">height</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;43&#8243; </span><span style="font-size: 10pt; font-family: ">width</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;57&#8243; </span><span style="font-size: 10pt; font-family: ">url</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;<span style="color: black;">#{imageList[0]}</span>&#8220;<span style="color: teal;">&gt;&lt;/</span><span style="color: #3f7f7f;">h:graphicImage</span><span style="color: teal;">&gt;</span></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">5<span> </span></span><span style="font-size: 10pt; font-family: ">&lt;</span><span style="font-size: 10pt; font-family: ">h:selectOneRadio<span> </span></span><span style="font-size: 10pt; font-family: ">value</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;<span style="color: black;">#{ imageList[1]}</span>&#8220;<span style="color: black;"> </span><span style="color: #7f007f;">layout</span><span style="color: black;">=</span><span style="color: #2a00ff;">&#8220;lineDirection&#8221;</span><span style="color: teal;">&gt;</span></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">6<span> </span></span><span style="font-size: 10pt; font-family: ">&lt;</span><span style="font-size: 10pt; font-family: ">f:selectItem </span><span style="font-size: 10pt; font-family: ">itemLabel</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;&#8221; </span><span style="font-size: 10pt; font-family: ">itemValue</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;selImage&#8221;</span><span style="font-size: 10pt; font-family: ">/&gt;</span></p>
<p class="MsoNormal" style="margin-left: 1.5in; text-indent: -1.5in;"><span style="font-size: 10pt; font-family: ">7<span> </span></span><span style="font-size: 10pt; font-family: ">&lt;</span><span style="font-size: 10pt; font-family: ">a4j:support </span><span style="font-size: 10pt; font-family: ">event</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;onclick&#8221; </span><span style="font-size: 10pt; font-family: ">action</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;<span style="color: black;">#{controller.selectedImageRenderer}</span>&#8220;&gt;</span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.5in;"><span style="font-size: 10pt; font-family: ">8<span> </span></span><span style="font-size: 10pt; font-family: ">&lt;</span><span style="font-size: 10pt; font-family: ">f:param </span><span style="font-size: 10pt; font-family: ">name</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;selectedImageId&#8221; </span><span style="font-size: 10pt; font-family: ">value</span><span style="font-size: 10pt; font-family: ">=</span><span style="font-size: 10pt; font-family: ">&#8220;<span style="color: black;">#{ imageList[2]}</span>&#8220;<span style="color: black;"> </span><span style="color: teal;">/&gt;</span></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">&lt;/</span><span style="font-size: 10pt; font-family: ">a4j:support</span><span style="font-size: 10pt; font-family: ">&gt;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "></span><span style="font-size: 10pt; font-family: ">&lt;/</span><span style="font-size: 10pt; font-family: ">h:selectOneRadio</span><span style="font-size: 10pt; font-family: ">&gt;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">&lt;/</span><span style="font-size: 10pt; font-family: ">div</span><span style="font-size: 10pt; font-family: ">&gt;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">&lt;/</span><span style="font-size: 10pt; font-family: ">a4j:repeat</span><span style="font-size: 10pt; font-family: ">&gt;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">&lt;/</span><span style="font-size: 10pt; font-family: ">div</span><span style="font-size: 10pt; font-family: ">&gt;</span></p>
<p class="MsoNormal"> </p>
<p><strong>At line 1</strong>, The outer divs width is responsible for number of images appearing in a row. The outer divs height is responsible for number images appearing in columns after which the scroll bar shall appear. You are most welcome to play with the div to set number of images in rows/columns.<br />
<strong>At line 2</strong>, the a4j repeat tag repeats through a list of images which was populated at the controller.<br />
<strong>At line 3</strong>, we see another div whom we assigned the spacing responsibilities between the images.<br />
<strong>At line 4</strong>, the graphic image in the list is displayed. The zero index of the list contains the url to the image.<br />
<strong>At line 5</strong>, radio button is displayed for selecting an image, the value to this radio button is assigned by the first index of the imageList.</p>
<p><strong>At line 6,</strong> we define the selection criteria, basically whichever radio button element shall contain “selImage”, it will be selected.<br />
<strong>At line 7</strong>, when the event click happens on the radio button the method selectedImageRender is called, which we assigned the responsibilities of selecting an image and cleaning up the rest of the radio buttons.<span> </span>imageList[2] contains the currently selected image Id.</p>
<p>The code for the method is fairly simple and is written as follows:-</p>
<p class="MsoNormal" style="text-indent: 0.0in; text-align: left;"><span style="font-size: 10pt; font-family: ">/***</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "></span><span style="font-size: 10pt; font-family: ">*</span><span style="font-size: 10pt; font-family: "> </span><strong><span style="font-size: 10pt; font-family: ">@author</span></strong><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">waqas.rajab</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "></span><span style="font-size: 10pt; font-family: ">*</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">This</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">method</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">makes</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">the</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">selection</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">of</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">the</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">appropriate</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">image</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">selected</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">on</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">the</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">main</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">page</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "><span style="font-size: 10pt; font-family: ">*</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">This</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">method</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">also</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">clears</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">out</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">the</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">remaining</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">selection</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">of</span><span style="font-size: 10pt; font-family: "> </span><span style="font-size: 10pt; font-family: ">images.</span></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "></span><span style="font-size: 10pt; font-family: ">*/</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "></span><strong><span style="font-size: 10pt; font-family: ">public</span></strong><span style="font-size: 10pt; font-family: "> </span><strong><span style="font-size: 10pt; font-family: ">void</span></strong><span style="font-size: 10pt; font-family: "> selectedImageRenderer(){</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "><span style="font-size: 10pt; font-family: ">String param = getRequest().getParameter(</span><span style="font-size: 10pt; font-family: ">&#8220;selectedImageId&#8221;</span><span style="font-size: 10pt; font-family: ">);</span></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "></span><strong><span style="font-size: 10pt; font-family: ">for</span></strong><span style="font-size: 10pt; font-family: ">(</span><strong><span style="font-size: 10pt; font-family: ">int</span></strong><span style="font-size: 10pt; font-family: "> i=0;i&lt;</span><span style="font-size: 10pt; font-family: ">imageList</span><span style="font-size: 10pt; font-family: ">.size();i++){</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">Object[] obj = (Object[])</span><span style="font-size: 10pt; font-family: ">imageList</span><span style="font-size: 10pt; font-family: ">.get(i);</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "></span><strong><span style="font-size: 10pt; font-family: ">if</span></strong><span style="font-size: 10pt; font-family: ">(obj[2].toString().equalsIgnoreCase(param)){</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">obj[1] = </span><span style="font-size: 10pt; font-family: ">&#8220;selImage&#8221;</span><span style="font-size: 10pt; font-family: ">;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">}</span><strong><span style="font-size: 10pt; font-family: ">else</span></strong><span style="font-size: 10pt; font-family: ">{</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">obj[1] = </span><span style="font-size: 10pt; font-family: ">&#8220;&#8221;</span><span style="font-size: 10pt; font-family: ">;</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">}</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: ">}</span></p>
<p><span style="font-size: 10pt; font-family: ">}</span></p>
<p><strong>Obj[0]</strong> contains Image Url<br />
<strong>Obj[1]</strong> contains selImage i.e. showing the selected image radio button checked.<br />
<strong>Obj[2]</strong> contains the ID of the selected image sent as a parameter from the page.</p>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2008/06/18/image-selection-in-jsf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google App Engine Leaving Challenges For Amazon &amp; Microsoft</title>
		<link>http://www.zigron.com/blog/2008/04/08/google-app-engine-leaving-challenges-for-amazon-microsoft/</link>
		<comments>http://www.zigron.com/blog/2008/04/08/google-app-engine-leaving-challenges-for-amazon-microsoft/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 06:09:22 +0000</pubDate>
		<dc:creator>Qurratulain Akhtar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[google app]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.zigron.com/blog/2008/04/08/google-app-engine-leaving-challenges-for-amazon-microsoft/</guid>
		<description><![CDATA[Google announced App Engine at its CampFire One developer event on April 7 which will work not only as hosted database platform, but an entire hosted Web app platform as reported by ZDNet. It’s free to start with 500MB of storage and 5 million monthly page views, this offer is, however, limited for first 10,000 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.zigron.com/blog/wp-content/uploads/2008/04/appenginegif.jpg" alt="appenginegif.jpg" align="left" />Google announced <a href="http://code.google.com/appengine/">App Engine</a> at its CampFire One developer event on April 7 which will work not only as hosted database platform, but an entire hosted Web app platform as reported by <a href="http://blogs.zdnet.com/microsoft/?p=1320">ZDNet</a>. It’s free to start with 500MB of storage and 5 million monthly page views, this offer is, however, limited for first 10,000 developers that’s all been taken up till now.</p>
<p>Google has always been making things simple and so will App Engine do. Very simple as compared to Amazon, Google App Engine lets developers to run their entire application on Google resources. Google says that:</p>
<blockquote><p>The goal is to make it easier for web developers to build and scale applications, instead of focusing on system administration and maintenance. Leveraging Google App Engine, developers can:<br />
Write code once and deploy<br />
Absorb spikes in traffic<br />
Easily integrate with other Google services.</p></blockquote>
<p>Google is on the way to maintain its lead, leaving challenges for Amazon and Microsoft.</p>]]></content:encoded>
			<wfw:commentRss>http://www.zigron.com/blog/2008/04/08/google-app-engine-leaving-challenges-for-amazon-microsoft/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

