Wednesday, January 20, 2010

Using Implicit Objects in Component Value

Using Implicit object in JSF is same as Implicit object of JSP. but one thing is that, how to use those objects in component value. Bellow is a small code snippet for that:


<h:outputFormat title="thanks" value="#{bundle.ThankYouParam}">
<f:param value="#{sessionScope.name}"/>
</h:outputFormat>


This tag gets the name of the customer from the session scope and inserts it into the parameterized message at the key ThankYouParam from the resource bundle. For example, if the name of the customer is Prabir Karmakar, this tag will render:

Thank you, Prabir Karmakar.

No comments:

Post a Comment