Skip to main content

lamine_ba's Blog

Multi-Templating with JSF 2 : The Prototype

Posted by lamine_ba on August 28, 2011 at 10:24 AM PDT

Revolution is only the next step to Evolution


Here we are, Yes ladies and Gentlemen, Here we are. After having shared the story with you, here is the presentation of the prototype of the multi-templating system of JSF 2.2. Meanwhile, an application has been deployed worldwide with google app engine and below are the instructions on how to use it both remotely and locally. We sincerely hope that you will enjoy this concept and as always we value your comments.

Multi-Templating with JSF 2 : The Story

Posted by lamine_ba on June 5, 2011 at 1:56 PM PDT

One thing can have several representations but each of the representations means the same thing.
Everything is an object and every object has a virtual representation.
You don't believe me! Well, look at your shadow...


When describing a feature, one must always show to his users the set of contexts in which its use can bring a significant value for them. The feature I'm about to present is called "Multi-templating with JSF 2" and I'm starting today with a simple question. Does it make sense to have a dynamic templating system for the Java Server Faces Framework? What are the set of contexts in which its use can bring a significant value for its users? The answer is self evident for those who are in the right perspective to see the rationale of it. For the others, it might be wise to take the time to find it through the story of this web designer named Jim. So let's start by reading his profile.

The Profile

name : Jim
Job : Web designer
Skills : HTML, CSS, Javascript, JSP, Facelets, Photoshop, Illustrator

Moonlight Thoughts

Posted by lamine_ba on May 21, 2011 at 1:32 PM PDT

In computer science, in the context of data storage and transmission, serialization is the process of converting a data structure or object into a format that can be stored and "resurrected" later in the same or another computer environment. Java provides automatic serialization which requires that the object be marked by implementing the interface. Implementing the interface marks the class as "okay to serialize. There are no serialization methods defined on the Serializable interface, but a serializable class can optionally define methods with certain special names and signatures that if defined, will be called as part of the serialization/deserialization process. The language also allows the developer to override the serialization process more thoroughly by implementing another interface, the Externalizable interface, which includes two special methods that are used to save and restore the object's state.



Last week, while letting a beautiful moon shine, my friend Bob and I were discussing. We didn't find in that evening, any interesting subject other than my previous blog post, which was if you remember, the writing expression of a skeleton. The skeleton of a solution. The solution of how to "implement a cascading dropdown using the JSF framework". And today, coming again with the tremendous desire to share, my friend Bob and I are very pleased to give you a replay of that conversation so you can touch our moonlight thoughts. Furthermore, when all things are said and done, what else from an ending whisper than to fall into a deep silence and let the story begin...

Implementing a Cascading DropDown with JSF 2

Posted by lamine_ba on May 12, 2011 at 11:42 AM PDT

The Beginning

The term " Cascading DropDown" means a dynamic dependent list boxes that allow a “child” list box to refresh when a selection is made in a “parent” list box. It is a recurrent problem in the software space and it has only one solution but sadly several implementations of it that are depending on the tools that you are using and their limitations which can force you to invent ways that shouldn't be invented.This blog entry is all about how to implement a cascading dropdown using the JSF framework and today we have the simple requirement to display a list of countries and to update a list of cities once a country is selected. Having now the scenario, I think we can start to present the actors :

The Entities

  1. public class Country {
  3.         private Long id;
  4.         private String name;   
  6. }
  8. public class City {
  10.         private Long id;
  11.         private String name;
  12.         private Country country;
  14. }