Profile

Cover photo
285 followers|175,116 views
AboutPostsPhotosVideos

Stream

JavaBeat

Shared publicly  - 
1
Add a comment...

JavaBeat

Shared publicly  - 
 
In #JSF, what are #Validators?

Answer:
JSF provides a set of standard classes and associated tags that page authors and application developers can use to validate a component’s data. The Validator classes in JSF are:
• BeanValidator - Registers a bean validator for the component.
• DoubleRangeValidator -Checks whether the local value of a component is within a certain range
• LengthValidator - Checks whether the length of a component’s local value is within a certain range. The value must be a java.lang.String.
• LongRangeValidator -Checks whether the local value of a component is within a certain range.
• RegexValidator -Checks whether the local value of a component is a match against a regular expression from the java.util.regex package.
• RequiredValidator -Ensures that the local value is not empty on an javax.faces.component.EditableValueHolder component.

All these validator classes implement the javax.faces.validator.Validator interface. Custom validators can be created by implementing this interface.
1
Add a comment...

JavaBeat

Shared publicly  - 
 
Oracle have chosen to prioritize lambdas, modularization and value types as key language features over the #JDK 8 to 10 timescale.
1
Add a comment...

JavaBeat

Shared publicly  - 
1
Add a comment...

JavaBeat

Shared publicly  - 
 
What are the tag libraries supported by #JSF?

Answer:
The tag libraries supported by JSF are:

1. JavaServer Faces Core Tag Library - This library consists of tags for JavaServer Faces custom actions that are independent of any particular render kit. This has a prefix as 'f:' and the URI is http://bit.ly/17ybQsY
2. JavaServer Faces HTML Tag Library - This library consists of JavaServer Faces component tags for all UIComponent objects in a web application. This has a prefix as 'h:' and the URI is http://bit.ly/17ybSkF
3. JavaServer Faces Facelets Tag Library - This library consists of tags for templating. This has a prefix as 'ui:' and the URI is http://bit.ly/17ybSkG

In addition to these tag libraries, JSTL Core Tag library and JSTL Functions Tag Library are also supported.
1
Add a comment...

JavaBeat

Shared publicly  - 
 
JSF LifeCycle
1
Add a comment...
Have them in circles
285 people
Miguel Angel Damián López's profile photo
Alessandro Mattiuzzi's profile photo
dipak sodani's profile photo
Sonia GUESMI's profile photo
Juan Francisco Sanchez Hernandez's profile photo
Roberts Polis's profile photo
Harsh Shrivastav's profile photo
renu dubey's profile photo
leejh1117's profile photo

JavaBeat

Shared publicly  - 
 
What are composite components in #Facelets in #JSF?

Answer:
JavaServer Faces technology offers the concept of composite components with Facelets. A composite component is a special type of template that acts as a component.

Any component is essentially a piece of reusable code that behaves in a particular way. For example, an input component accepts user input. A component can also have validators, converters, and listeners attached to it to perform certain defined actions.
A composite component consists of a collection of markup tags and other existing components. This reusable, user-created component has a customized, defined functionality and can have validators, converters, and listeners attached to it like any other component.
1
Add a comment...

JavaBeat

Shared publicly  - 
 
What is a managed bean in #JSF?

Answer:
A managed bean is a lightweight container-managed object (POJO) that works as a model for UI component. A managed bean is created with a constructor with no arguments, a set of properties, and a set of methods that perform functions for a component. Managed beans typically perform the following function:
• Validating a component’s data
• Handling an event fired by a component
• Performing processing to determine the next page to which the application must navigate
Managed beans are created using Stephan Andresen annotation or using managed-bean tag in faces-config.xml. For example, a Student managed bean can be written as follows:

Stephan Andresen
public class Student {
private String studentName;
private Integer studentId;
public void setStudentName(String studentName) {
this.studentName = studentName;
}
public String getStudentName() {
return this.studentName;
}
public void setStudentId(Integer studentId) {
this.studentId = studentId;
}
public Integer getStudentId() {
return this.studentId;
}
....
}

The managed bean's properties can be accessed using EL, #{student.studentName} and #{student.studentId}.
1
Add a comment...

JavaBeat

Shared publicly  - 
 
#PrimeFaces is a component suite open source UI component library for JavaServer Faces (#JSF) based applications
1
Add a comment...

JavaBeat

Shared publicly  - 
 
What is #JdbcTemplate in #Spring #DAO?

Answer:
Spring's JdbcTemplate class is the central class to interact with a database through JDBC. It handles the creation and release of resources. It performs the basic tasks of the core JDBC workflow such as statement creation and execution, leaving application code to provide SQL and extract results.
The JdbcTemplate class executes SQL queries, update statements and stored procedure calls, performs iteration over ResultSets and extraction of returned parameter values. It also catches JDBC exceptions and translates them to the generic, more informative, exception hierarchy defined in the org.springframework.dao package.
1
Add a comment...

JavaBeat

Shared publicly  - 
 
What are the different approaches for #JDBC database access in #Spring?

Answer:
There are several approaches for JDBC database access in Spring and they are:
• JdbcTemplate is the classic Spring JDBC approach and the most popular. This "lowest level" approach and all others use a JdbcTemplate under the covers.

• NamedParameterJdbcTemplate wraps a JdbcTemplate to provide named parameters instead of the traditional JDBC "?" placeholders. This approach provides better documentation and ease of use when you have multiple parameters for an SQL statement.

• SimpleJdbcInsert and SimpleJdbcCall optimize database metadata to limit the amount of necessary configuration. This approach simplifies coding so that you only need to provide the name of the table or procedure and provide a map of parameters matching the column names. This only works if the database provides adequate metadata. If the database doesn’t provide this metadata, you will have to provide explicit configuration of the parameters.

• RDBMS Objects including MappingSqlQuery, SqlUpdate and StoredProcedure requires you to create reusable and thread-safe objects during initialization of your data access layer. This approach is modeled after JDO Query wherein you define your query string, declare parameters, and compile the query. Once you do that, execute methods can be called multiple times with various parameter values passed in.
1
Add a comment...

JavaBeat

Shared publicly  - 
 
Explain about the Data Access Object (#DAO) support in #Spring.

Answer:
The Data Access Object (DAO) support in Spring is aimed at making it easy to work with data access technologies like JDBC, Hibernate, JPA or JDO in a consistent way. This allows one to switch between the persistence technologies fairly easily and it also allows one to code without worrying about catching exceptions that are specific to each technology.
1
Add a comment...
People
Have them in circles
285 people
Miguel Angel Damián López's profile photo
Alessandro Mattiuzzi's profile photo
dipak sodani's profile photo
Sonia GUESMI's profile photo
Juan Francisco Sanchez Hernandez's profile photo
Roberts Polis's profile photo
Harsh Shrivastav's profile photo
renu dubey's profile photo
leejh1117's profile photo
Contact Information
Contact info
Phone
+919740134466
Story
Tagline
Java Technology News
Introduction
www.javabeat.net writes latest news on Java and related technology topics.
Links