How to use Managed Bean reference inside faces-config.xml?

JSF-Thumbnail

Managed Bean in JSF can refer another managed bean inside the faces-config.xml. There is no restriction for the type of bean can be refered. But, JSF does not support the cyclic dependencies for Managed Bean reference. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF For example, you cannot refer […]

How to initialize List property in Managed Mean?

JSF-Thumbnail

List property in Managed Mean JSF Managed Beans can initialize its List properties in the faces-config.xml. There is a property in the faces-config.xml as list-entries. This cane be used for initializing the values and can be accessed directly through the Managed Beans in any JSP pages. also read: Introduction to JSF JSF Interview Questions Request […]

Lists and Maps as Managed Beans in JSF

JSF-Thumbnail

This tips explain how to use List and Map classes directly as Managed Beans. Here notice that you cannot use List and Map interfaces directly as Managed Beans, you can use only the implementations classes like ArrayList, Map, etc. There is no way to call constructor in the interfaces if you use List or Map […]

Publish and Subscribe messages using JMS Topic in JBoss Server

java-ee-thumbnail

Publish and Subscribe using JMS Topic This tips gives overview on how to write Java Messaging Service(JMS) code for creating Topic in the Tomcat server. This is very basic example and only show how to get started instead of looking into the advanced concepts in JMS technology. also read: Java EE Tutorials Java EE 7 […]

How to use h:selectOneRadio inside h:dataTable in JSF?

JSF-Thumbnail

h:selectOneRadio and h:dataTable This tips explains how to use the h:selectOneRadio tag inside h:dataTable iteration tag. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF Using h:selectOneRadio is not straight forward since JSF doesn’t provide easy mechanism for toggling the radio button selections. Programmer has to write the manual script […]

Custom Validator in JSF

JSF-Thumbnail

Custom Validator in JSF This tips presents sample programs for how to write the custom validator in JSF application. There is many built-in validators available in JSF. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF You can learn about the predefined tags in the article Introduction to JSF Core […]

Create simple custom Converter implementation class in JSF

JSF-Thumbnail

Custom Converter Class Implementation This article explains the simple Converter class implementation. Converter class is used for converting any given input to the desired output format or with any business logic to the input values. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF This example also includes the PhaseListener […]

How to implement f:phaseListener for h:commandButton?

JSF-Thumbnail

Introduction This article explains with basic example on how to implement the f:phaseListener in JSF. This tag is useful for registering any particular component to the Life Cycle of the phases. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF This following program provides very basic example for using f:phaseListener […]

How to read xml file and inject bean reference using Spring Framework?

spring-thumbnail

Introduction This article presents sample source code for creating the Bean instance using the Spring Framework. This is basic example to read configuration file from the file system and create the beans from the applicationContext.xml file. This xml file define two beans Employee and Address. Address bean is injected inside Employee bean using the ref […]

How to implement ActionListener (f:actionListener) in JSF?

JSF-Thumbnail

Introduction This article explains how to implement the ActionListener class in the JSF core tag library. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF An ActionListener is an event handler interface for a class that can respond to user events in your JSF page. The body content of this […]