Access Managed Bean methods As we know JSF managed beans are mostly access only through the JSP pages are faces-config.xml.But, there is some schenarios where you will need information stored in the managed beans for the business logic in some other beans. JSF provides API to access those values where ever you want. also read: …
JSF
How to use Managed Bean reference inside faces-config.xml?
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 …
Lists and Maps as Managed Beans in JSF
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 …
How to use h:selectOneRadio inside h:dataTable in JSF?
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 …
Create simple custom Converter implementation class in JSF
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?
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 implement ActionListener (f:actionListener) in JSF?
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 …
f:convertDateTime tag in JSF
Introduction f:convertDateTime is used for validating the date input. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF If the user enters any invlid input, it will throw the error message to the screen. Also it allows the user to specify the apttern of date format using the ‘pattern’ attribute. …