JSF
JSF is a
framework that is used for developing interactive and secure Web Applications.
It provides
built-in components, such as textboxes, labels, radio buttons, and command
buttons for UI(user Interface) creation. These components are referred to as UI
creation.
JSF
Framework provides built-in support for
converting and validating user data .
It provides
navigation and event handling mechanisms.It is based on popular
Model-view-controller pattern.
It enables
the developers to easily segregate the UI(view),user data(model),and the
code(controller) that controls the navigation between user data and UI.
JSF can be used
to
create UI component and can implement the logic to process user data,handle
events and decide which page to be displayed next.
It is best
suited for presentation tier of an enterprise application.
It provides
event model that uses simple java classes (similar to Swing) for dispatching event
from client-side UI component to server.
What is
difference between JSF and Swing?
JSF
framework is used to create UIs for Web Applications that execute on server
however Swing is a collection of Java APIs that enables the user to create UIs
for desktop –based application.
JSF is used
to provide a mechanism of automatic generation of appropriate for the target
client such as html and wml(wireless markup language) browsers.
JSF and
Struts both are based on MVC pattern. The design goal of struts framework is
used to separate UI, business logic and controller. The design goal of JSF is
to create UI.
JSF TAG
LIBRARY:
There are
two types of tag Library:
- JSF HTML tag library
- JSF core tag library
HTML Tag
Library:
It is used
to create UI component for Web Application easily. you can also perform simple
validation on user entered data.
To use html
tag library you have to use namespace : http://java.sun.com/jsf/html
in your webpage.
- Head tag : it is used within html tag and is used to describe document.
< h:head > is used to denote head tag.
- Body tag: used to set boundaries of html document. < h:body > is used to denote body tag.
- Form Tag: It is used to denote a form in html page.< h:form > is used for form tag.
- Input Tags:They are used for editable text UI components.
- < h:inputText > : creates a textbox
- < h:inputTextArea > :create a multiline textbox.
- < h:inputSecret > :creates a password box
- < h:inputhidden > :creates a hidden input to store users data.
- Output Tags:
They are
used for read-only UI component.
- < h:outputLabel > : creates a Text Label to display.
- < h:outputText > : creates a non-editable Text component
- < h:outputLink > : creates a hyperlink to navigate to another webpage
- < h:outputFormat > :creates a formatted text component.
- < h:graphicImage > : creates a UI to display Image.
- Command Tags:
They are used to perform an action when they are activated.
a. < h:commandButton > : creates a button control
b. < h:commandLink >:
creates a link.
- Selection Tags:
They are used to select one or more than one values from
given list of values.
- SelectOne Components:
a. < h:selectBooleanCheckbox >:
creates a checkbox to select only one value.
b. < h:selectOneMenu > : creates a drop-down list.
c. < h:selectOneListBox > : creates a listbox
d. < h:selectOneRadio > :
creates a radiobutton.
- SelectMany Components:
a. < h:selectManyCheckbox > :
creates a checkbox for multiple selection
b. < h:selectManyMenu > :creates
a drop-down list for multiple selection
c. < h:selectManyListBox > :
creates a listbox for multiple selection.
No comments:
Post a Comment