|
|
|
|
|
|
Hibernate basic configuration example
Author :
JavaBeat
Date : Sun Jul 13th, 2008
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 to
change few parameters if you are using any other databases.
Accessing Managed Bean methods programmatically in JSF 1.1
Author :
JavaBeat
Date : Sat Jul 12th, 2008
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.
How to use Managed Bean reference inside faces-config.xml?
Author :
JavaBeat
Date : Sat Jul 12th, 2008
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. For example, you cannot refer bean B from bean A while bean B also refers to bean A. The following simple program
demonstrates how to refer a listBean inside a normal JSF Managed Bean. For simplicity purpose this example
use List as managed bean. You can use any type of bean for the reference.
How to initialize Map property in Managed Mean?
Author :
JavaBeat
Date : Sat Jul 12th, 2008
JSF Managed Beans can initialize its Map properties in the faces-config.xml. There is a property
in the faces-config.xml as map-entries. This cane be used for initializing the values and can
be accessed directly through the Managed Beans in any JSP pages.
How to initialize List property in Managed Mean?
Author :
JavaBeat
Date : Sat Jul 12th, 2008
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.
Lists and Maps as Managed Beans in JSF
Author :
JavaBeat
Date : Sat Jul 12th, 2008
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
directly.
Publish and Subscribe messages using JMS Topic in JBoss Server
Author :
JavaBeat
Date : Thu Jul 10th, 2008
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.
How to use h:selectOneRadio inside h:dataTable in JSF?
Author :
JavaBeat
Date : Wed Jul 9th, 2008
This tips explains how to use the h:selectOneRadio tag inside h:dataTable iteration tag.
Using h:selectOneRadio is not straight forward since JSF dowsn't provide easy mechanism
for toggling the radio button selectios. Programmer has to write the manual script code to
toggle the radio selections.
Write your own Validator in JSF
Author :
JavaBeat
Date : Wed Jul 9th, 2008
This tips presents sample programs for how to write the custom validator in JSF application.
There is many built-in validators available in JSF.
Create simple custom Converter implementation class in JSF
Author :
JavaBeat
Date : Tue Jul 8th, 2008
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. This example
also includes the PhaseListener to identify in which JSF lifecycle phase the convertion happens.
|
|
|
|
|
|
|