Processing to decide what page application navigates next.Manage the execution of a component event.It acts as a model to the JSF framework and offers functionalities like, Q #5) What are the scopes of managed beans?Īnswer: Managed Beans are a Java class that consists of a set of getter/setter methods and properties. They act as a Model for UI components in the MVC framework.įor JSF 1.2, it is required to register them in the JSF configuration file, faces-config.xml, whereas, from JSF 2.0 onwards, annotations are used to register managed beans. Q #4) What is the significance of managed beans in Java Server Faces?Īnswer: Managed Beans are Java beans that comprise getter and setter methods and have business logic designed in it. The response state is saved after view content is rendered, making successive requests can access the state and its availability to restore view phase. Otherwise, an already built component tree need not add any components JSP container move tags and renders components. #6) Render response: In case the application has JSP pages, JSF requests the application server to render the page, thereby adds components on the page to the component tree. #5) Invoke application: Application-level events like submitting form or forwarding to another page are being handled by Java Server Faces during this phase. When renderResponse from the current instance of FacesContext is being called by updateModels methods, JSF moves to the render response phase. #4) Model value update: After JSF verifies valid data, it sets the corresponding server-side object properties to the component’s local values and updates the bean properties, corresponding to the value attribute of the input component. In case of invalid local value, JSF adds an error message to FacesContext instance, displaying the same page with an error message and with JSF life cycle moving further towards render response phase. #3) Process validation: During this phase, JSF processes component tree validators, examines attribute rules for validation, and compares them with the stored local value of the component. JSF moves to render response phase when decode method event listeners call renderResponse method. It will display validation messages or errors during the render response phase. In case of any failure during conversion, it generates an error message and lists it on FacesContext. Use the decode method that captures and saves new values from request parameters. #2) Apply request: Here, each component from the component tree is created. Provides all information to FacesContext to process request.Saves this View in FacesContext instance.Connects event handlers and validators to user interface components. ![]() When a link or button is clicked on the web page, a request is sent to JSF with operations as listed below: #1) Restore view: The life cycle begins with the restore view phase. Supports internationalization of UI labels and textĪnswer: The life cycle contains 6 phases, as explained below:.Rapid application development (RAD) approach.Extensive tool support from Borland, Exadel, Sun, Oracle, IBM, BEA, etc.Ease of implementing 3rd party components. ![]() Event-driven programming model that is handled on the server. ![]() Q #2) What features Java Server Faces offer in web development? JSF has a tag library, API, Facelets, and UI components and managed beans to create web applications. Frequently Asked JSF Interview QuestionsĪnswer: It is a Java framework based on MVC design that has rich API and tag libraries that offer the creation of server-side user interface components for web development. JSF provides core library, standard HTML input elements as base UI components, based on various devices and client type say HTML browser, WAP or wireless devices, provides rendering capability to UI components. It connects components with the application data source and client-generated events to server-side event handlers, maintains UI state across multiple server requests as well as implements custom components. Java Server Faces technology offers API to build reusable user interface components in the web pages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |