This obviously make JSF page rendering faster and more efficient. What happens here is that the built in JavaScript library requests or sends data asynchronously and is responsible for updating only the Ajax enabled component. Only the Ajax enabled components in JSF gets updated while the user stays in the same page. The browser then loads the entire page and the user is taken to a whole new page.Ījax, on the other hand makes a partial request from the server instead of full page reload. For example, when a user clicks a button to submit a form, the browser makes a complete HTML document request and waits for the server to respond. In a traditional JSF, the browser makes an HTTP request to the server, and the server responses back with a JSF page (typically an XHTML page). Ajax comes in handy when it is to adding dynamic functionality in JSF with the advantage of less coding and more usage. Obviously, Managed bean is more than just performing validation Ajax can be its suitable sidekick in an enterprise application, especially with respect to event-based-in-page rendering. Some commercial frameworks like IceFaces, Trinidad, J4Fry, PrimeFaces, provide a large set of Ajax enabled components with some enhanced specific behavior. JSF pages can be in tune with Managed beans for validation and other purposes but Ajax when used appropriately within the JSF can leverage further and can go hand in hand boosting the performance and functionality of any mundane JSF page. In the Enterprise Java platform, Java Server Faces (JSF) provides built in support for Ajax. What actually happens is, any text entered into the text box fires a request to the server which in turn loads some suggested keywords from the database and responds back in real time asynchronously without reloading the page. They are loaded dynamically from the server end. Recall, when we enter keywords in Google search, a drop down list appears with a list of suggestions. It has become more a necessity than luxury down through the years. Using Ajax leverages efficiency in incorporating dynamic functionality of a web page.
0 Comments
Leave a Reply. |