a4j:support – Simple Example on onkeyup event

JSF-Thumbnail

a4j:support This example program demonstrates how to get started with a4j:support tag in the RiachFaces tag libraray. This is part of Ajax4jsf libraray. But, from RiachFaces 3.0, Ajax4jsf is merged with RichFaces tag libraray. a4j:support is used inside any component to provide ajax support on that particular field. also read: Introduction to JSF JSF Interview […]

How to write Throws Advice in Spring AOP?

spring-thumbnail

Throws Advice Example Throws Advice is used when throwing exception from the business methods. This interceptor will be called when there is any exception, so one can do any logic to candle the exception. also read: Spring Tutorials Spring 4 Tutorials Spring Interview Questions For writing the Throws Advice implementation you have to implement ThrowsAdvice […]

How to write Interception Around Advice in Spring AOP?

spring-thumbnail

Interception Around Advice Example In this tips we explore how to use the Interception Around Advice in Spring’s Aspect Oriented Programming(AOP). Interception Around Advice is fundamental advice type in the Spring framework. Also this advice type is derived from other frameworks like AspectJ. So it is interoporable with other frameworks, other advices in the Spring […]

Simple example for Before advice and After Advice in Spring Framework

spring-thumbnail

BeforeAdvice and AfterReturningAdvice This tips presents a very simple program for invoking the Before Advice and After Returning Advice in the Spring Framework. Thsese two methods are part of Spring’s AOP implementation and used as interceptor methods. the following program create spring beans using the standalone java program and invokes the business logic method. Business […]

Basic steps to configure Log4j using xml and properties file

java-thumbnail

This example demonstrated how to configure Log4j setup using the Properties file and XML file. These are the two most widely used techniques for configuring the Log4j for your application. But, in the recent days configuring with properties files are considered to be old technique and recommended using XML. This example program uses simple standalone […]

Batch insert in Hibernate

hibernate-thumbnail

This example program shows how to insert multiple rows using the batch processing in hibernate. when there are thousand of rows to be persisted, everytime iterating and inserting will cause the memory problem. Hibernate stores all the persisted objects in the memory. To avoid this problem use batch processing in the hibernate. also read: Introduction […]

Hibernate basic configuration example

hibernate-thumbnail

Hibernate Configuration This example demonstrates how to configure hibernate framework for running a simple standalone program. Here the sample program uses programmatic configuration to set all the properties required for running hibernate. Also the example uses derby as the database to connect and update the values. This is not the big change, you only have […]

Accessing Managed Bean methods programmatically in JSF 1.1

JSF-Thumbnail

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: […]

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 […]