<?xml version="1.0"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
      <title>NetBeans RSS Feed Filter</title>
      <description>Filter RSS feed for NetBeans category items from Blogger/Blogspot</description>
      <link>http://pipes.yahoo.com/pipes/pipe.info?_id=05c8976f752a076398231a6293ce68e8</link>
      <atom:link rel="next" href="http://pipes.yahoo.com/pipes/pipe.run?_id=05c8976f752a076398231a6293ce68e8&amp;_render=rss&amp;page=2"/>
      <pubDate>Thu, 20 Jun 2013 08:15:40 +0000</pubDate>
      <generator>http://pipes.yahoo.com/pipes/</generator>
      <item>
         <title>JSF Tip of the Day: Reading Authorization Header in JSF</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/8hrzoeOuaiU/jsf-tip-of-day-reading-authorization.html</link>
         <description>After I did the JAX-RS Tip of the Day today, I wondered about reading the authorization header from JSF. The technique is the same as the JAX-RS version, but the methods are different depending on what is available to the JSF application. The JAX-RS &lt;code&gt;Base64&lt;/code&gt; class is not part of the web profile in Java EE 6. It will be part of Java EE 7 so you could use it. I chose to add the comments in the code below, but decided that I would use the &lt;code&gt;com.sun.misc.Base64Decoder&lt;/code&gt; which is currently available in Java SE 6 and 7.&lt;br /&gt;
 
&lt;strong&gt;UPDATE:&lt;/strong&gt; I got a suggestion on Google+ from +Thomas Darimont who mentioned using &lt;code&gt;DatatypeConverter.parseBase64Binary()&lt;/code&gt; from the Java API for XML Binding (JAXB). I confirmed that it is available in Java EE 5 and 6. It is also in the Web Profile in Java EE 6.&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/8hrzoeOuaiU&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_b9c1fd98a22ca5caf5bccd3e356c3e7f</guid>
      </item>
      <item>
         <title>JAX-RS Tip of the Day: How Do I Read the Authorization Header?</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/osrv_D46NjY/jax-rs-tip-of-day-how-do-i-read.html</link>
         <description>I was looking for a simple method to read the &lt;code&gt;HttpHeaders&lt;/code&gt; to determine the username and password for a request. I didn't find a quick answer so I wrote a simple utility method that will return the Base 64 decoded values from the &lt;code&gt;authorization&lt;/code&gt; header.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/osrv_D46NjY&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_bcc30dc3b4da93a931f4adc1a95bf20f</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: RichFaces 4.3.x Charts in JSF using JSFlot, JFreeCharts, and PrimeFaces</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/XxO2dz_L7t4/jsf-2x-tip-of-day-richfaces-43x-charts.html</link>
         <description>&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left:auto;margin-right:auto;text-align:center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-EzWcptXkWx4/UWXnXkBZHTI/AAAAAAAADyE/v1VjVavs-ks/s1600/RichFacesPrimeFacesChartExamples.png&quot; style=&quot;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;http://4.bp.blogspot.com/-EzWcptXkWx4/UWXnXkBZHTI/AAAAAAAADyE/v1VjVavs-ks/s640/RichFacesPrimeFacesChartExamples.png&quot; width=&quot;640&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Sexy PrimeFaces Charts in RichFaces&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;
Introduction&lt;/h1&gt;
I was asked to look at various charting solutions for JSF. Specifically, I was asked for some choices for use with RichFaces 4.3.1. I knew that PrimeFaces has really good chart components already so I knew it might be kind of fun to integrate them if possible. I was also aware of JFreeChart which will work, but produces some... rather ugly charts. Finally, someone had suggested that I look at jsflot. This was a very promising solution. This project is a proof of concept which demonstrates integration between projects, and technologies.&lt;br /&gt;
&lt;h1&gt;
Requirements&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://code.google.com/p/jsflot/&quot;&gt;jsflot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt; This is required for the sample database, although you could create your own data.&lt;/li&gt;
&lt;/ul&gt;
The jsflot framework is currently not Mavenized, so if you are going to run my example code, you will need to download it from the link above, and install it in Maven using the command below.
 
&lt;br /&gt;
&lt;h1&gt;
Code&lt;/h1&gt;
The code for this &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt; project can be found on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bitbucket.org/&quot;&gt;BitBucket&lt;/a&gt; here: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/chart-demo&quot;&gt;chart-demo&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This is the bean that provides the data models for the charting solutions. There are a number of chart demos in the project. The two charts above are just examples.&lt;br /&gt;
&lt;h2&gt;
ChartBean.java&lt;/h2&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/XxO2dz_L7t4&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_f0befd92e554f80c440aca80b270af6d</guid>
         <media:thumbnail height="72" url="http://4.bp.blogspot.com/-EzWcptXkWx4/UWXnXkBZHTI/AAAAAAAADyE/v1VjVavs-ks/s72-c/RichFacesPrimeFacesChartExamples.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: Post Exception Back Button</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/6z0NKBCGcP0/jsf-2x-tip-of-day-post-exception-back.html</link>
         <description>&lt;h1&gt;
Introduction&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;
&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://images-onepick-opensocial.googleusercontent.com/gadgets/proxy?container=onepick&amp;amp;gadget=a&amp;amp;rewriteMime=image%2F*&amp;amp;url=http%3A%2F%2Fwww.cr-cath.pvt.k12.ia.us%2Flasalle%2FResources%2FRev%2520War%2520Websites%2FJosh%2520Michael%2520Zack%2520Rev%2520War%2FZack%2520Rev%2520War%2Fimages%2FBack%2520Button.jpg&quot; style=&quot;clear:right;float:right;margin-bottom:1em;margin-left:1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;182&quot; src=&quot;http://images-onepick-opensocial.googleusercontent.com/gadgets/proxy?container=onepick&amp;amp;gadget=a&amp;amp;rewriteMime=image%2F*&amp;amp;url=http%3A%2F%2Fwww.cr-cath.pvt.k12.ia.us%2Flasalle%2FResources%2FRev%2520War%2520Websites%2FJosh%2520Michael%2520Zack%2520Rev%2520War%2FZack%2520Rev%2520War%2Fimages%2FBack%2520Button.jpg&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/h1&gt;
This is hopefully one simple example of how to make a &quot;back&quot; button when an exception occurs, and sends you to an exception page. The question becomes &quot;How do I get back to the page where the exception occurred?&quot; The navigation back to the offending page is possible, but you want to make sure that you handle the exception, or you may get into a cycle.&lt;br /&gt;
&lt;br /&gt;
A solution was suggested to me by my friend &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.eisele.net/&quot;&gt;Markus Eisele&lt;/a&gt; using an ExceptionHandler in JSF. I had used exception handlers in the past, and thought that it was a simple and elegant idea. The code I am providing below &lt;b&gt;DOES NOT&lt;/b&gt; handle the exception. This is specific to your implementation. This is just a handler that sits on top of your exception hierarchy, and provides a&amp;nbsp;convenient mechanism to navigate back.
&lt;br /&gt;
&lt;h1&gt;
Code&lt;/h1&gt;
The example code for the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt; project can be downloaded from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bitbucket.org/&quot;&gt;BitBucket&lt;/a&gt; here: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/exception-handler-navigation-button&quot;&gt;exception-handler-navigation-button&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to register the factory below in the &lt;code&gt;faces-config.xml&lt;/code&gt; file.
&lt;br /&gt;
&lt;h2&gt;
GeneralExceptionHandlerFactory.java&lt;/h2&gt;
&lt;hr /&gt;
 

&lt;h2&gt;
GeneralExceptionHandler.java&lt;/h2&gt;
&lt;hr /&gt;
 

&lt;h1&gt;
Usage&lt;/h1&gt;
Here is an example of how to use it from an exception page.
 
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/6z0NKBCGcP0&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_d0d05311e4a1d52c75d50488dc84c434</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: PrimeFaces Chart Coding Exam</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/gkeBeMuIj4I/jsf-2x-tip-of-day-primefaces-chart.html</link>
         <description>&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:right;margin-left:1em;text-align:right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-YHSOMOezu34/UWQ9cQPYr_I/AAAAAAAADxk/0tE7bx7giwc/s1600/PrimeFacesPieChart.png&quot; style=&quot;clear:right;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-YHSOMOezu34/UWQ9cQPYr_I/AAAAAAAADxk/0tE7bx7giwc/s1600/PrimeFacesPieChart.png&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;PrimeFaces Pie Chart&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;
Background&lt;/h1&gt;
I have been asked to interview a number of engineers over the last couple of years. We were interested in hiring an engineer with a background in JSF specifically &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://primefaces.org/&quot;&gt;PrimeFaces&lt;/a&gt;, Java EE 6, and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Basically I wanted someone...like me.&lt;br /&gt;
&lt;br /&gt;
I came into work one day, and I was told that I needed to interview someone in about an hour about a position. The person claimed experience in all of the aforementioned technologies. I needed to come up with a coding exam idea for them. Tick tock tick tock.&lt;br /&gt;
&lt;br /&gt;
I decided to create a&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt;&amp;nbsp;project using the sample Java DB database, JPA, EJB facades, and a JSF front end using&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://primefaces.org/&quot;&gt;PrimeFaces&lt;/a&gt;&amp;nbsp;with a pie chart. The whole process took about 7 minutes to create. When the engineer arrived, I showed him the result and said &quot;I want to see the same results&quot;, and explained that I used the sample database from NetBeans.&lt;br /&gt;
&lt;br /&gt;
The engineer was successful and created something similar in about 30 minutes, and additionally showed me up by adding percentage tags to the chart. We hired him after the interview. I am glad to say he is an integral part of our team today.&lt;br /&gt;
&lt;h1&gt;
Coding Exam&lt;/h1&gt;
What do I want?&lt;br /&gt;
&lt;br /&gt;
Please create a JSF application using&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://primefaces.org/&quot;&gt;PrimeFaces&lt;/a&gt;&amp;nbsp;that displays a pie chart using data provided. The application must be developed using&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt;&amp;nbsp;and Java EE 6 technologies. The example data is provided using the sample Java DB database in&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt;&amp;nbsp; We would like to have a pie chart that shows sales totals by customer as a percentage of all sales. You have 1 hour to complete the code, and will be required to explain your design decisions, and results.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; I just showed them the pie chart that was generated in the browser and not the actual code. I don't want to sway the candidates decision making, or give them hints on how to solve the problem.&lt;br /&gt;
&lt;br /&gt;
Here is the code for the project: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/primefacescodingexam&quot;&gt;PrimeFacesCodingExam&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;
Conclusion&lt;/h1&gt;
Even if you don't use this in a coding exam, it is a good example of combining Java EE technologies using&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&amp;nbsp;&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://primefaces.org/&quot;&gt;PrimeFaces&lt;/a&gt;.&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/gkeBeMuIj4I&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_39d340eb1feb14b75d71c1e76a5162f3</guid>
         <media:thumbnail height="72" url="http://4.bp.blogspot.com/-YHSOMOezu34/UWQ9cQPYr_I/AAAAAAAADxk/0tE7bx7giwc/s72-c/PrimeFacesPieChart.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: JSF Expression Language (EL) Keywords and Implicit Objects</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/Uy5r4yRDRQs/jsf-2x-tip-of-day-jsf-expression.html</link>
         <description>A friend of mine asked me if there was a list of reserved words in EL and JSF. He had previously looked for it, and after some Google searching I didn't find a comprehensive list anywhere. I decided to create one for him and anyone else who may need it. If you are aware of any other keywords, please post a comment and I will add them to the listings.
&lt;br/&gt;&lt;br/&gt;
&lt;table&gt;
&lt;caption&gt;&lt;b&gt;Expression Language (EL) Reserved Keywords&lt;/b&gt;&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;and&lt;/td&gt;
&lt;td&gt;Logical operator alternative to (&amp;amp;&amp;amp;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;Boolean literal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;le&lt;/td&gt;
&lt;td&gt;Relation operator less than or equal to alternative to (&amp;lt;=)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;not&lt;/td&gt;
&lt;td&gt;Logical operator reverse alternative to (!)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;div&lt;/td&gt;
&lt;td&gt;Arithmetic operator division alternative to (/)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ge&lt;/td&gt;
&lt;td&gt;Relational operator greater or equal to alternative to (&amp;gt;=)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lt&lt;/td&gt;
&lt;td&gt;Relational operator less than alternative to (&amp;lt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;td&gt;Null literal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;empty&lt;/td&gt;
&lt;td&gt;The empty operator is a prefix operation that can be used to determine whether a value is null or empty.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gt&lt;/td&gt;
&lt;td&gt;Relational operator greater than alternative to (&amp;gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mod&lt;/td&gt;
&lt;td&gt;Arithmetic operator modulo alternative to (%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;or&lt;/td&gt;
&lt;td&gt;Logical operator alternative to (||)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;eq&lt;/td&gt;
&lt;td&gt;Logical operator alternative to (==)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;instanceof&lt;/td&gt;
&lt;td&gt;Java Keyword to do a Class comparison between Objects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ne&lt;/td&gt;
&lt;td&gt;Relational operator not equal alternative to (!=)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;Boolean literal&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;table&gt;
&lt;caption&gt;&lt;b&gt;JSF 2.x Expression Language (EL) Implicit Objects&lt;/b&gt;&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;application&lt;/td&gt;
&lt;td&gt;This provides user access to the &lt;code&gt;ApplicationContext&lt;/code&gt; implementation of &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html&quot;&gt;ServletContext&lt;/a&gt;&lt;/code&gt; that represents a web application's execution environment.&lt;br/&gt;&lt;b&gt;Note:&lt;/b&gt; This is not related to the JSF &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/application/Application.html&quot;&gt;Application&lt;/a&gt;&lt;/code&gt; object.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;applicationScope&lt;/td&gt;
&lt;td&gt;Maps application-scoped variable names to their values.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cc&lt;/td&gt;
&lt;td&gt;Implicit EL object that provides access to the JSF Composite Component. &lt;code&gt;cc&lt;/code&gt; refers to the top level composite component processed at the time of evaluation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;component&lt;/td&gt;
&lt;td&gt;Implicit EL object representing &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/UIComponent.html&quot;&gt;javax.faces.component.UIComponent&lt;/a&gt;&lt;/code&gt;for the current component.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cookie&lt;/td&gt;
&lt;td&gt;Maps a cookie name to a single cookie.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;facesContext&lt;/td&gt;
&lt;td&gt;The FacesContext instance for the current request.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;flash&lt;/td&gt;
&lt;td&gt;Provides user access to the EL implicit &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/context/Flash.html&quot;&gt;javax.faces.context.Flash&lt;/a&gt;&lt;/code&gt; object. It may additional obtained via #{facesContext.externalContext.flash}. The implementation must ensure that the flash is usable from both JSP and from Facelets for JSF 2.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;header&lt;/td&gt;
&lt;td&gt;Maps a request header name to a single value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;headerValues&lt;/td&gt;
&lt;td&gt;Maps a request header name to an array of values.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;initParam&lt;/td&gt;
&lt;td&gt;Maps a context initialization parameter name to a single value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;param&lt;/td&gt;
&lt;td&gt;Maps a request parameter name to a single value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;paramValues&lt;/td&gt;
&lt;td&gt;Maps a request parameter name to an array of values.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;request&lt;/td&gt;
&lt;td&gt;EL implicit object for current request.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;requestScope&lt;/td&gt;
&lt;td&gt;Maps request-scoped variable names to their values.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;resource&lt;/td&gt;
&lt;td&gt;EL implicit object for &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/application/ResourceHandler.html&quot;&gt;javax.faces.application.ResourceHandler&lt;/a&gt;&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;session&lt;/td&gt;
&lt;td&gt;Provides EL access to the current &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSession.html&quot;&gt;HttpSession&lt;/a&gt;&lt;code&gt; object.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sessionScope&lt;/td&gt;
&lt;td&gt;Maps session-scoped variable names to their values.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;view&lt;/td&gt;
&lt;td&gt;Provides access to the &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/UIViewRoot.html&quot;&gt;javax.faces.component.UIViewRoot&lt;/a&gt;&lt;/code&gt; for the current instance.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;viewScope&lt;/td&gt;
&lt;td&gt;Maps view-scoped variable names to their values.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/Uy5r4yRDRQs&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;/code&gt;&lt;/code&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_40e9169b97c4fa334c67514b55ea0be5</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: RichFaces  Component Examples</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/01CVJexpHPw/jsf-2x-tip-of-day-richfaces-component.html</link>
         <description>&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:right;margin-left:1em;text-align:right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-RCY3MrSnyrs/UVr7R_Q_yAI/AAAAAAAADvs/6Icw9HhJvJA/s1600/RichFacesCustomModelTree.png&quot; style=&quot;clear:left;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-RCY3MrSnyrs/UVr7R_Q_yAI/AAAAAAAADvs/6Icw9HhJvJA/s320/RichFacesCustomModelTree.png&quot; width=&quot;268&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Custom TreeModel and TreeNode&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
I have some code that I originally wrote for a proof of concept for doing some &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.jboss.org/richfaces&quot;&gt;RichFaces&lt;/a&gt; &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.jboss.org/richfaces/latest_4_X/vdldoc/rich/tree.html&quot;&gt;&amp;lt;rich:tree /&amp;gt;&lt;/a&gt;&lt;/code&gt; examples. The modified code in these examples demonstrate how to use custom &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.jboss.org/richfaces/4.3.X/4.3.1.Final/javadoc/richfaces-components-api/org/richfaces/model/TreeNode.html&quot;&gt;TreeNode&lt;/a&gt;&lt;/code&gt;, and &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.jboss.org/richfaces/4.3.X/4.3.1.Final/javadoc/richfaces-components-api/org/richfaces/model/TreeDataModel.html&quot;&gt;TreeDataModel&lt;/a&gt;&lt;/code&gt; implementations to make really nice and functional trees. The code for my generic &lt;code&gt;TypedTreeNode&lt;/code&gt; and &lt;code&gt;TreeNodesSequenceKeyModel&lt;/code&gt; are fully functional and can be used out of the box as the basis of your own tree implementations.&lt;br /&gt;
&lt;br /&gt;
The examples include the model provided by &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.jboss.org/richfaces&quot;&gt;RichFaces&lt;/a&gt;, my custom model (&lt;code&gt;TreeNodesSequenceKeyModel&lt;/code&gt;), and a custom implementation of a node. The custom node is generic so you can pass in any object you like. I chose to use text, but you could use a more complex object.&lt;br /&gt;
&lt;br /&gt;
The custom model, custom node, and tree are shown in the image on the right. This also has events being shown when a node is selected, or toggled.&lt;br /&gt;
&lt;br /&gt;
The project was developed using &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt; along with &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://maven.apache.org/&quot;&gt;Apache Maven&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://mercurial.selenic.com/&quot;&gt;Mercurial&lt;/a&gt; project can be found on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bitbucket.org/&quot;&gt;BitBucket&lt;/a&gt; here: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/richfaces-tree&quot;&gt;richfaces-tree&lt;/a&gt;
&lt;br /&gt;
&lt;h1&gt;
Code&lt;/h1&gt;
&lt;h2&gt;
TypedTreeNode.java&lt;/h2&gt;
&lt;hr /&gt;
 

&lt;br /&gt;
&lt;h2&gt;
TreeNodesSequenceKeyModel.java&lt;/h2&gt;
&lt;hr /&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/01CVJexpHPw&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_119421212c36b5175b4d11071f5049d7</guid>
         <media:thumbnail height="72" url="http://4.bp.blogspot.com/-RCY3MrSnyrs/UVr7R_Q_yAI/AAAAAAAADvs/6Icw9HhJvJA/s72-c/RichFacesCustomModelTree.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>Determining What Classes are Loaded by ClassLoaders</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/EL6pOJcltJI/determining-what-classes-are-loaded-by.html</link>
         <description>I saw a question posted a couple of months ago on stackoverflow, or a forum. I can't remember where I saw it actually. The question was how do I determine what classes are currently loaded by the &lt;code&gt;ClassLoader&lt;/code&gt; when an application is loaded and running. A number of folks posted various solutions like using &lt;code&gt;java -verbose&lt;/code&gt; which are of limited help. Another solution was to get using something like &lt;code&gt;ClassLoader.getSystemClassLoader();&lt;/code&gt;. The latter looks very promising, but is wrong. I knew that there are a number of classes that are loaded that this would not display.&lt;br /&gt;
&lt;br /&gt;
Ssssh... I will show you how I know.&lt;br /&gt;
&lt;br /&gt;
The problem and solution is surprisingly non-trivial. I thought I would come up with a solution like the one above in 5 minutes. I did come up with one above in about that much time. It turns out to be incorrect.&lt;br /&gt;
&lt;br /&gt;
The solution is to use a Java agent to instrument the JVM and see what it is loading. I am sure a number of you have seen the &lt;code&gt;-javaagent: [= ]&lt;/code&gt; flag for the VM and wondered what is that for. I am going to show you.&lt;br /&gt;
&lt;br /&gt;
First some results:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;&lt;span style=&quot;font-size:large;&quot;&gt;all length -&amp;gt; 815
system length -&amp;gt; 163
appLoader length -&amp;gt; 163
classes size -&amp;gt; 61&lt;/span&gt;&lt;/b&gt;
&lt;/pre&gt;
&lt;br /&gt;
The first value &lt;b&gt;all&lt;/b&gt; indicates all of the classes loaded by the JVM. That is a lot of classes. This is via an Instrumentation agent.&lt;br /&gt;
&lt;br /&gt;
The second value &lt;b&gt;system&lt;/b&gt; indicates all of the classes loaded by the System &lt;code&gt;ClassLoader&lt;/code&gt;. This is significantly less than loaded by the JVM. This is via an Instrumentation agent.&lt;br /&gt;
&lt;br /&gt;
The third value is the &lt;b&gt;appLoader&lt;/b&gt; which is the application classloader. It matches the System, but this may not always be the case. This is via an Instrumentation agent.&lt;br /&gt;
&lt;br /&gt;
Finally, the last value &lt;b&gt;classes&lt;/b&gt; is what you get from the &lt;code&gt;ClassLoader&lt;/code&gt; without instrumentation. It is a paltry amount of the total classes loaded.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So which one is right?&lt;/b&gt; Good question... Here is an answer only a parent, or teacher can give. &lt;b&gt;&quot;It depends.&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If I am looking at everything being loaded to check for something forensically I would use the 815 and look at what these classes are and where they came from. If I am checking which classes are loaded to help with reflection, I would look at the 61.&lt;br /&gt;
&lt;br /&gt;
If you have read this far, then you want the code to look at. I have split it into a couple of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt; projects hosted on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bitbucket.org/&quot;&gt;BitBucket&lt;/a&gt; using &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://mercurial.selenic.com/&quot;&gt;Mercurial&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/instrumentation-agent&quot;&gt;instrumentation-agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/find-classes-classloader&quot;&gt;find-classes-classloader&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h1&gt;Code&lt;/h1&gt;
&lt;h2&gt;InstrumentationAgent.java&lt;/h2&gt;
&lt;hr/&gt;
 
&lt;h2&gt;AgentLoader.java&lt;/h2&gt;
&lt;hr/&gt;
 
&lt;h2&gt;App.java&lt;/h2&gt;
&lt;hr/&gt;
 

&lt;b&gt;Note:&lt;/b&gt; I had to put the tools.jar in my Maven repository to make it easy to add as a library.
&lt;h1&gt;References&lt;/h1&gt;
We can not achieve success alone. It is on the shoulders of giants that we see further. I used an example from Dhruba Bandopadhyay to figure out some of the instrumentation process.

&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://dhruba.name/2010/02/07/creation-dynamic-loading-and-instrumentation-with-javaagents/&quot;&gt;Creation, dynamic loading and instrumentation with javaagents - Dhruba Bandopadhyay&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/EL6pOJcltJI&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_bb22c5aabc13895061e70b8312a22bf1</guid>
      </item>
      <item>
         <title>JSF 2.1 Tip of the Day: RichFaces 4.3.x Drag and Drop</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/B7B037GeJ4s/jsf-21-tip-of-day-richfaces-43x-drag.html</link>
         <description>&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:right;margin-left:1em;text-align:right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-DHnwjW7Udlw/UVBzTubByEI/AAAAAAAADuE/Og6vIsDWF6k/s1600/MultipleTargetPanels.png&quot; style=&quot;clear:right;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://4.bp.blogspot.com/-DHnwjW7Udlw/UVBzTubByEI/AAAAAAAADuE/Og6vIsDWF6k/s400/MultipleTargetPanels.png&quot; width=&quot;380&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Multiple DnD Targets&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
The Primefaces version of my drag-n-drop (DnD) for JSF has been very popular. I didn't want my friends at Red Hat feeling left out. I did a couple of examples using drag-n-drop with the same arrow demo as the Primefaces example: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaevangelist.blogspot.com/2013/03/jsf-21x-tip-of-day-primefaces-35-drag-n.html&quot;&gt;JSF 2.1.x Tip of the Day: Primefaces 3.5 &amp;lt;p:ring/&amp;gt; Drag-N-Drop Example&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I did have a little more fun with using Java to &lt;code&gt;clone&lt;/code&gt; some of the arrows so that you could see how to use them multiple times.
&lt;br /&gt;
&lt;h1&gt;
Requirements&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/download.html&quot;&gt;Mojarra 2.1.20&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.jboss.org/richfaces/download/stable&quot;&gt;richfaces-core-api 4.3.1.Final&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.jboss.org/richfaces/download/stable&quot;&gt;richfaces-core-impl 4.3.1.Final&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.jboss.org/richfaces/download/stable&quot;&gt;richfaces-components-api 4.3.1.Final&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.jboss.org/richfaces/download/stable&quot;&gt;richfaces-components-ui 4.3.1.Final&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
Details&lt;/h1&gt;
The project was developed using &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans 7.3&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://maven.apache.org/&quot;&gt;Apache Maven&lt;/a&gt;. The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://mercurial.selenic.com/&quot;&gt;Mercurial&lt;/a&gt; project can be found on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bitbucket.org/&quot;&gt;BitBucket&lt;/a&gt; here: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/richfaces-dnd-examples&quot;&gt;richfaces-dnd-examples&lt;/a&gt;
&lt;br /&gt;
&lt;h2&gt;
Code&lt;/h2&gt;
&lt;hr /&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/B7B037GeJ4s&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_e6992448f246d46adb15e0d8b6764dd9</guid>
         <media:thumbnail height="72" url="http://4.bp.blogspot.com/-DHnwjW7Udlw/UVBzTubByEI/AAAAAAAADuE/Og6vIsDWF6k/s72-c/MultipleTargetPanels.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>JSF 2.1.x Tip of the Day: Primefaces 3.5  Drag-N-Drop Example</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/5ZyBr9YMxh8/jsf-21x-tip-of-day-primefaces-35-drag-n.html</link>
         <description>&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:left;margin-right:1em;text-align:left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-aC5ppfXb06U/UU0gfhdzeaI/AAAAAAAADcw/j0qGGTK1yx0/s1600/IMG_0260.JPG&quot; style=&quot;clear:left;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;http://1.bp.blogspot.com/-aC5ppfXb06U/UU0gfhdzeaI/AAAAAAAADcw/j0qGGTK1yx0/s320/IMG_0260.JPG&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Camp Old Indian&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
I was trying to come up with an example to demonstrate &lt;code&gt;&amp;lt;p:ring /&amp;gt;&lt;/code&gt; along with Drag-and-Drop (DnD). I had an idea of using a target to drop things on. I was sitting in my living room watching my youngest son creating a world on little big planet, and I remembered his first time shooting a bow. He had a perfect bullseye.&lt;br /&gt;
&lt;br /&gt;
I decided that I would drag-n-drop arrows in honor of my son. I mentioned the idea to him, and he loved it. So here it is... a useful example that was fun to create. In this example, I will demonstrate the &lt;code&gt;&amp;lt;p:ring /&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;p:fieldSet /&amp;gt;&lt;/code&gt; components primarily. I have added some effects to a &lt;code&gt;&amp;lt;p:dialog /&amp;gt;&lt;/code&gt; if you select an arrow and dismiss it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;
Requirements&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://primefaces.org/&quot;&gt;PrimeFaces 3.5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/&quot;&gt;Mojarra 2.1.20&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
I used &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans 7.3&lt;/a&gt; to develop the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://maven.apache.org/&quot;&gt;Apache Maven&lt;/a&gt; based project. The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://mercurial.selenic.com/&quot;&gt;Mercurial&lt;/a&gt; project can be found on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bitbucket.org/&quot;&gt;BitBucket&lt;/a&gt; here: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/primefaces-ring-dnd&quot;&gt;primefaces-ring-dnd&lt;/a&gt;.
&lt;br /&gt;
&lt;h1&gt;
Example&lt;/h1&gt;
&lt;h2&gt;
index.xhtml&lt;/h2&gt;
&lt;hr /&gt;
 

&lt;br /&gt;
&lt;h2&gt;
IndexBean.java&lt;/h2&gt;
&lt;hr /&gt;
 

&lt;br /&gt;
&lt;h2&gt;
Arrow.java&lt;/h2&gt;
&lt;hr /&gt;
 

&lt;br /&gt;
&lt;h1&gt;
Conclusion&lt;/h1&gt;
This is a very simple example of what you can do with a Primefaces, Mojarra, and Netbeans.
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left:auto;margin-right:auto;text-align:center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-N6mzgouYQqs/UU0mbO13UmI/AAAAAAAADc4/oO0QCzE33gw/s1600/ArrowPanel.png&quot; style=&quot;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;http://3.bp.blogspot.com/-N6mzgouYQqs/UU0mbO13UmI/AAAAAAAADc4/oO0QCzE33gw/s640/ArrowPanel.png&quot; width=&quot;640&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Arrow Ring and Target&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/5ZyBr9YMxh8&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_37446be52235c88e2c34c5f8a4db3dd0</guid>
         <media:thumbnail height="72" url="http://1.bp.blogspot.com/-aC5ppfXb06U/UU0gfhdzeaI/AAAAAAAADcw/j0qGGTK1yx0/s72-c/IMG_0260.JPG" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>JSF Tip of the Day: PrimeFaces 3.0 Tree Drag and Drop Example</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/e-EiBEy6E04/jsf-tip-of-day-primefaces-30-tree-drag.html</link>
         <description>I worked on a proof of concept for a drag and drop enabled &lt;code&gt;&amp;lt;p:tree /&amp;gt;&lt;/code&gt; for a project I was working on. At the time, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://primefaces.org/&quot;&gt;PrimeFaces&lt;/a&gt; was just starting the path to 3.0, and I was working with a snapshot. The POC was part of a decision making process on which JSF framework, or combination of frameworks to use.&lt;br /&gt;
&lt;br /&gt;
This drag and drop example was part of the the work &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.primefaces.org/?author=1&quot;&gt;Optimus Prime&lt;/a&gt; and his team created as a potential functionality for the &lt;code&gt;&amp;lt;p:tree /&amp;gt;&lt;/code&gt; component. In the final release, this functionality was removed. I still have high hopes that in &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://primefaces.org/&quot;&gt;PrimeFaces&lt;/a&gt; 3.5.+ that it will be added back into the product. It was a cool idea and one that we had hoped to take advantage of in our products.&lt;br /&gt;
&lt;br /&gt;
If you need this functionality currently, and don't mind using a 3.0-SNAPSHOT release, you can have a drag and drop &lt;code&gt;&amp;lt;p:tree /&amp;gt;&lt;/code&gt;. I published this since it was a good example, and I thought someone might need this specific functionality. Otherwise it is code lost in time.&lt;br /&gt;
&lt;br /&gt;
The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://mercurial.selenic.com/&quot;&gt;Mercurial&lt;/a&gt; project can be pulled from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bitbucket.org/&quot;&gt;BitBucket&lt;/a&gt; and was developed using &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans&lt;/a&gt; and Apache &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The code can be found here:&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/primefaces-tree-dragdrop-demo&quot;&gt;primefaces-tree-dragdrop-demo&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
Example&lt;/h2&gt;
&lt;hr /&gt;
 

&lt;br /&gt;
&lt;hr /&gt;
 

&lt;hr /&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/e-EiBEy6E04&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_0fee96140701dec11a58a0de363b9b1c</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: What is  and Why Do I Care?</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/ugPrVlp7V28/jsf-2x-tip-of-day-what-is-and-why-do-i.html</link>
         <description>One of the JSF Components that is new in JSF 2.1 is the &lt;code&gt;&amp;lt;h:link /&amp;gt;&lt;/code&gt; component. This&amp;nbsp;component&amp;nbsp;represents an HTML &lt;code&gt;&amp;lt;a /&amp;gt;&lt;/code&gt; (anchor) tag. In most cases, I would actually recommend using an &lt;code&gt;&amp;lt;a /&amp;gt;&lt;/code&gt; tag over this component. The anchor tag can use Expression Language (EL) which is what most people are after. The &lt;code&gt;&amp;lt;h:link /&amp;gt;&lt;/code&gt; is more overkill than most people need. However, there are a couple of cases where the &lt;code&gt;&amp;lt;h:link /&amp;gt;&lt;/code&gt; really does shine.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;disabled=&quot;true&quot;&lt;/code&gt; attribute renders a &lt;code&gt;&amp;lt;span /&amp;gt;&lt;/code&gt; that can serve as a space holder.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;rendered&lt;/code&gt; attribute can be programmatically controlled using EL, or via binding of the component. You don't need to use JS, or a JS Framework like jquery to hide it. It simply does not render.&lt;/li&gt;
&lt;li&gt;The component can be programatically created using a binding &lt;code&gt;&amp;lt;h:link binding=&quot;#{bean.link}&quot; /&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Built-in support for JSF navigation using the &lt;code&gt;outcome&lt;/code&gt; attribute.&lt;/li&gt;
&lt;li&gt;Supports passing JSF ViewParameters through the use of the &lt;code&gt;includeviewParams&lt;/code&gt; attribute.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
The real significant disadvantage is that you can't use it like a normal anchor tag and direct the &lt;code&gt;href&lt;/code&gt; to another site without some tricks. In that case you are better off using a &lt;code&gt;&amp;lt;h:commandLink/&amp;gt;&lt;/code&gt; or a plain &lt;code&gt;&amp;lt;a/&amp;gt;&lt;/code&gt; tag.
&lt;br /&gt;
&lt;h2&gt;
References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.mozilla.org/en-US/docs/HTML/Element/a&quot;&gt;HTML Anchor Element&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/vdldocs/facelets/h/link.html&quot;&gt;JSF 2.1 &amp;lt;h:link /&amp;gt; VDL&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Examples&lt;/h2&gt;
&lt;hr /&gt;
 
&lt;h2&gt;Project Files&lt;/h2&gt;
&lt;hr/&gt;
Here is the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt;NetBeans 7.3&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://maven.apache.org/&quot;&gt;Maven&lt;/a&gt; Project: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/jsf-link-example&quot;&gt;jsf-link-example&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/ugPrVlp7V28&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_58986936de73a510712d8d5696faeca0</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: Great Blog Posts Explaining JSTL vs. JSF</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/eFv3aEMUTn4/jsf-2x-tip-of-day-great-blog-posts.html</link>
         <description>The question comes up quite frequently on various forums, stackoverflow, etc. on JSTL and JSF. I don't want to beat a dead horse so I will leave it to the authors of these posts to explain the differences.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.znetdevelopment.com/blogs/2008/10/18/jstl-with-jsffacelets/&quot;&gt;JSTL with JSF/Facelets&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets&quot;&gt;c:forEach vs ui:repeat in Facelets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://stackoverflow.com/a/5246655/160361&quot;&gt;Finding n-th component nested in a4j:repeat tag in JSF tree&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

If you have any other good posts, please let me know and I will aggregate them here.&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/eFv3aEMUTn4&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_02049f66682087f38ade20355e7bc0d0</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: AJAX Redirection from @WebFilter (Filter)</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/cnBMEdkjkq0/jsf-2x-tip-of-day-ajax-redirection-from.html</link>
         <description>I was working on an application where I needed to have it redirect to a login page when certain conditions exist in the application, e.g. session timeout, etc. A &lt;code&gt;ViewExpiredException&lt;/code&gt; custom exception handler (available in JSF 2.0) can handle this case, but I had a need for another type of &quot;Session&quot; object to be monitored to determine if I should redirect based on its status. The other object was stored in the &lt;code&gt;HttpSession&lt;/code&gt; object as an attribute so I decided to handle it with a &lt;code&gt;Filter&lt;/code&gt; (&lt;code&gt;@WebFilter&lt;/code&gt;).&lt;br /&gt;
&lt;br /&gt;
The first thing is to determine if the request is a &lt;code&gt;partial/ajax&lt;/code&gt; request. If it is a normal post, we can handle it with a &lt;code&gt;HttpResponse.sendRedirect(String location)&lt;/code&gt; mechanism. If it is AJAX, we need to handle it in a completely different manner.

 

Once I determined that the request was AJAX, I needed to be able to pass the appropriate response back to the JSF page in a format that it could understand. A great tip came from Jim Driscoll's blog: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://weblogs.java.net/blog/driscoll/archive/2009/05/redirecting_fro.html&quot;&gt;Redirecting from a JSF 2.0 Ajax Request&lt;/a&gt; which gave me the general syntax for what I needed to send back. 
&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is being intercepted in a Filter so I don't have access to the FacesContext.

Here is a partial code snippet of how to send the redirect. You would need to set the variable &lt;code&gt;TARGET&lt;/code&gt; to go to the desired location.

&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/cnBMEdkjkq0&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_9e36210ad98a8240e737014c12de4119</guid>
      </item>
      <item>
         <title>GlassFish 3 Tip of the Day: Using JDK 7 with JSP Code</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/KobHhwsQlOE/glassfish-3-tip-of-day-using-jdk-7-with.html</link>
         <description>A question came up on the&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://netbeans.org/&quot;&gt; NetBeans&lt;/a&gt; J2EE Mailing List about using JDK 7 with GlassFish 3.1.2. Specifically, they were getting the error:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color:white;color:#222222;font-family:arial, sans-serif;font-size:13px;&quot;&gt;org.apache.jasper.&lt;/span&gt;&lt;u style=&quot;background-color:white;color:#222222;font-family:arial, sans-serif;font-size:13px;&quot;&gt;&lt;/u&gt;&lt;span style=&quot;background-color:white;color:#222222;font-family:arial, sans-serif;font-size:13px;&quot;&gt;JasperExcept&lt;/span&gt;&lt;span style=&quot;background-color:white;color:#222222;font-family:arial, sans-serif;font-size:13px;&quot;&gt;ion: PWC6033: Error in Javac compilation for JSP&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color:white;color:#222222;font-family:arial, sans-serif;font-size:13px;&quot;&gt;PWC6197: An error occurred at line: 4 in the jsp file: /index.jsp&lt;/span&gt;&lt;span style=&quot;background-color:white;color:#222222;font-family:arial, sans-serif;font-size:13px;&quot;&gt;PWC6199: Generated servlet error:&lt;/span&gt;&lt;span style=&quot;background-color:white;color:#222222;font-family:arial, sans-serif;font-size:13px;&quot;&gt;strings in switch are not supported in -source 1.5&lt;/span&gt;&lt;span style=&quot;background-color:white;color:#222222;font-family:arial, sans-serif;font-size:13px;&quot;&gt;&amp;nbsp; (use -source 7 or higher to enable strings in switch)&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
The fix is quite simple. You must include a &lt;code&gt;glassfish-web.xml&lt;/code&gt; file in your project, and set a couple of properties. &lt;code&gt;compilerSourceVM&lt;/code&gt; and &lt;code&gt;compilerTargetVM&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
Please see the example below for a complete configuration.

 
&lt;br /&gt;
The project will now compile and use JDK7.&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/KobHhwsQlOE&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_601f96b1836f386bc7e526061d1fd59f</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: RichFaces Table Sorting (3-position switch design)</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/VFl1Hkj1V3w/jsf-2x-tip-of-day-richfaces-table.html</link>
         <description>A technique I like to call the three position switch is what I use for sorting on my RichFaces tables. This consists of default (unsorted), ascending, and descending. It is implemented very easily by setting the &lt;code&gt;&amp;lt;rich:column/&amp;gt;&lt;/code&gt; sortOrder attribute to point to our current sort, and using an &lt;code&gt;&amp;lt;a4j:commandLink&amp;gt;&lt;/code&gt; in the header facet to control the sort as shown in the example below. This simple technique makes sorting simple and sexy.
&lt;h2&gt;code&lt;/h2&gt;
 
&lt;br/&gt;
 
&lt;br/&gt;
This additional code will let the user know which sorting direction we are currently using.
&lt;br/&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/VFl1Hkj1V3w&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_16e22f8a3c319dd8cf4f13185d2717ef</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: Programmatically Creating a</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/-9zyzDs2Lik/jsf-2x-tip-of-day-programmatically.html</link>
         <description>&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;
&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://2008.igem.org/wiki/images/d/db/Pictogram_output.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;198&quot; src=&quot;http://2008.igem.org/wiki/images/d/db/Pictogram_output.png&quot; width=&quot;200&quot;/&gt;&lt;/a&gt;&lt;/div&gt;
In this tip of the day we create one of the most basic components in our JSF arsenal: &lt;code&gt;&amp;lt;h:outputText&amp;gt;&lt;/code&gt;.
&lt;br /&gt;
This example uses another library called &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/jsf-utils&quot;&gt;jsf-utils&lt;/a&gt; to handle the heavy lifting.

&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/-9zyzDs2Lik&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_861afa0f59645e0d82b92293dfda615d</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: RichFaces Programmatically Creating an</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/SOl2XJ-DGvA/jsf-2x-tip-of-day-richfaces.html</link>
         <description>This example of how to create an &lt;code&gt;&amp;lt;a4j:commandLink/&amp;gt;&lt;/code&gt; uses another library called &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/jsf-utils&quot;&gt;jsf-utils&lt;/a&gt; to handle the heavy lifting.
&lt;br/&gt;&lt;br/&gt;
The method below will create the &lt;code&gt;&amp;lt;a4j:commandLink/&amp;gt;&lt;/code&gt; component, any additional configuration will need to be performed programmatically, or using the tag attributes.
&lt;br/&gt;&lt;br/&gt;
 

You would bind it to a backing bean to a &lt;code&gt;UICommandLink&lt;/code&gt; component;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/SOl2XJ-DGvA&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_7cd9a430ea6642ee022246851beeb04d</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: Determining the Base URL</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/KrAlCEPAYH0/jsf-2x-tip-of-day-determining-base-url.html</link>
         <description>This question has come up a couple of times in the last few days, so I thought I would write a couple of convenience methods to determine the Base URL.
&lt;br/&gt;
&lt;br/&gt;
I added them to my &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://code.bluelotussoftware.com/jsf-utils/&quot;&gt;jsf-utils&lt;/a&gt; project for those who want to use my utilities.
&lt;br/&gt;
&lt;br/&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/KrAlCEPAYH0&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_9230393b53843809c1197001c592a2e9</guid>
      </item>
      <item>
         <title>JSF 2.x Tip of the Day: Displaying Content Conditionally by FacesMessage.Severity</title>
         <link>http://feedproxy.google.com/~r/JavaEvangelistJohnYearysBlog/~3/jkBk7weiMZY/jsf-2x-tip-of-day-displaying-content.html</link>
         <description>&lt;style type=&quot;text/css&quot;&gt;
.nobrtable br {display:none;}
tr {
text-align:center;}
table {
width:200px;border:1px solid #FF0000;border-collapse:collapse;
}
table th, td{
border:1px solid #FF0000;}
caption {caption-side:bottom;}
&lt;/style&gt;
Many times we do, or do not want to display content based on whether there are &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/application/FacesMessage.html&quot;&gt;&lt;code&gt;FacesMessage&lt;/code&gt;&amp;nbsp;&lt;/a&gt;queued to be displayed. The &lt;code&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/application/FacesMessage.Severity.html&quot;&gt;FacesMessage.Severity&lt;/a&gt;&lt;/code&gt; can be used to help us determine if messages should be displayed. Please see the table below.
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;nobrtable&quot;&gt;
&lt;table&gt;
&lt;caption&gt;FacesMessage Values&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Ordinal&lt;/th&gt;
&lt;th&gt;Severity&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;&lt;thead&gt;
&lt;/thead&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;INFO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;WARN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;ERROR&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;FATAL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The examples below demonstrate a couple of techniques to determine if a component (in this case a &amp;lt;ui:fragment/&amp;gt; containing a &amp;lt;ui:include/&amp;gt;) should be displayed based on whether&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/application/FacesMessage.Severity.html&quot; style=&quot;font-family:monospace;&quot;&gt;FacesMessage.Severity&lt;/a&gt;&amp;nbsp;are present and if they are not equal to an informational message.
&lt;br /&gt;
&lt;br /&gt;
 

This is equivalent to the listing above.
&lt;br /&gt;
 

This displays if the messages are &lt;strong&gt;WARN&lt;/strong&gt; or less.
&lt;br /&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/JavaEvangelistJohnYearysBlog/~4/jkBk7weiMZY&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;</description>
         <author>noreply@blogger.com (John Yeary)</author>
         <guid isPermaLink="false">05c8976f752a076398231a6293ce68e8_2c50d346127ae102b898cb70ea99206b</guid>
      </item>
   </channel>
</rss>
<!-- fe2.yql.bf1.yahoo.com compressed/chunked Thu Jun 20 08:15:39 UTC 2013 -->
