Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Learning from Reverse Engineered JSF Components (Part 1)

DZone's Guide to

Learning from Reverse Engineered JSF Components (Part 1)

· Java Zone ·
Free Resource

Build vs Buy a Data Quality Solution: Which is Best for You? Gain insights on a hybrid approach. Download white paper now!

One thing I really enjoy doing is reverse engineering technology solutions to learn from them. A case in point is Manfred Riem's set of JSF components, with sources available at the Manor Rock site.

In this context I took the sources of Manfred's NAL Component. (Here NAL stands for "name and location", consisting of a common set of entry fields on many web applications, for inputting the name and address details of the customer in question.) This is a JSF component that requires nothing more than this tag in a JSF file:

<nal:inputNAL value="#{NalBean}" />

Then, if the referenced bean is a registered JSF managed bean that extends the JSF component's NAL class, the tag above will magically render as follows:

This was a nicely understandable scenario, so I took the sources and imported them into NetBeans IDE, as a standard Java application, which is the first application you see in the screenshot below. The second application is the web application where I've implemented the JSF component:

Handily, by putting the Java application that provides the JSF component on the web application's classpath (i.e., via the Libraries node in the lower part of the screenshot above) in NetBeans IDE, it is rebuilt whenever I rebuild the web application. That's pretty useful.

In the next part, we'll look at all the files in the JSF component, to see how they work together to let the web application developer make use of the JSF tag shown above!

Read Part 2 Here 

 

Build vs Buy a Data Quality Solution: Which is Best for You? Maintaining high quality data is essential for operational efficiency, meaningful analytics and good long-term customer relationships. But, when dealing with multiple sources of data, data quality becomes complex, so you need to know when you should build a custom data quality tools effort over canned solutions. Download our whitepaper for more insights into a hybrid approach.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}