Presentation is loading. Please wait.

Presentation is loading. Please wait.

SDJ INFOSOFT PVT. LTD. 2 BROWSERBROWSER JSP JavaBean DB 1 4 3 Req Res Application Layer Enterprise server/Data Sources.

Similar presentations


Presentation on theme: "SDJ INFOSOFT PVT. LTD. 2 BROWSERBROWSER JSP JavaBean DB 1 4 3 Req Res Application Layer Enterprise server/Data Sources."— Presentation transcript:

1 SDJ INFOSOFT PVT. LTD

2 2 BROWSERBROWSER JSP JavaBean DB 1 4 3 Req Res Application Layer Enterprise server/Data Sources

3 instantiate BROWSERBROWSER JSP (VIEW) Java Bean (Model) DB 1 5 4 Req Res Application Layer Enterprise server/Data Sources CONTROLLER (Servlet) 3

4 JavaServer Faces (JSF) is a MVC web framework that simplifies the construction of user interfaces (UI) for server-based applications by using reusable UI components in a page. JSF facilitates Web application development by providing reusable UI components making easy data transfer between UI components managing UI state across multiple server requests enabling implementation of custom components wiring client side event to server side application code Page Backing Bean

5

6

7 Step -1 Click on File Menu -> New Project->Java Web->Web Application

8

9

10

11

12

13

14

15

16

17 The controller Servlet receive a request,an instance of FacesContext is created. FacesContext object is accessed and modified in almost all of the request life cycle phases. Request-Processing life cycle can be terminated in any phase,skipping other phases. (1)Restore View Phase The JSF builds the view, wires event handlers and validators to UI components and saves the view in the FacesContext instance. The FacesContext instance will now contains all the information required to process a request. (2) Apply request values After the component tree is created/restored, each component in component tree uses decode method to extract its new value from the request parameters. Component stores this value. If the conversion fails, an error message is generated and queued on FacesContext. This message will be displayed during the render response phase, along with any validation errors.

18 (3)Process validation During this phase, the JSF processes all validators registered on component tree. It examines the component attribute rules for the validation. If the local value is invalid, the JSF adds an error message to the FacesContext instance, and the life cycle advances to the render response phase and display the same page again with the error message. (4)Update model values After the JSF checks that the data is valid, it walks over the component tree and set the corresponding server- side object properties to the components' local values. The JSF will update the bean properties corresponding to input component's value attribute.

19 (5)Invoke application During this phase, the JSF handles any application- level events, such as submitting a form / linking to another page. 6)Render response During this phase, is responsible for sending responses to the clients.

20 JSF a set of tags, provided as JSP custom tag library, which makes creation of complex UI components in a web page easy. JSF Base of MVC Design Pattern. JSF manage validation of user input, state of the UI component,page navigation design, event handling. JSF supports multiple types of client devices. JSF component support internationalization and enable displaying localized messages according to specified locale.


Download ppt "SDJ INFOSOFT PVT. LTD. 2 BROWSERBROWSER JSP JavaBean DB 1 4 3 Req Res Application Layer Enterprise server/Data Sources."

Similar presentations


Ads by Google