In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to talk about JSF and Dojo widgets, the content is very detailed, interested friends can refer to, hope to be helpful to you.
As a Web framework, JavaServer Faces (JSF) provides end-to-end lifecycle management and a rich component model with complete event handling and data binding. Dojo is a very popular Asynchronous JavaScript + XML (Ajax) library that provides rich widgets and wonderful effects for Web2.0 applications. With JSF and Dojo technologies, you can create a better user experience by using JSF integration features on the server side and Dojo user interfaces on the client side. This article introduced this process and showed you how you can easily build Web applications to provide a better user experience for your users.
Brief introduction
JSF is a popular Web framework, quite stable and has been widely used in the field of Java ™Platform, Enterprise Edition (Java EE). Dojo is one of the most powerful Web 2.0 libraries that can be used to create rich interfaces for your Web applications.
By combining these two technologies, you can enjoy the benefits of both technologies. On the server side, the benefits lie in end-to-end lifecycle management of components, back-end bean data bundling, and event handling. On the client side, you will be able to take advantage of Dojo's rich widgets, real-time animation (such as fade-out and slip effects), and drag-and-drop capabilities. In addition, with the API support of the Dojo framework, you can improve performance by putting more logic on the client side.
The following is a way to leverage JSF and Dojo technologies:
◆ delay bundling JSF components and client-side Dojo widgets
◆ builds a custom JSF component to enable Dojo widgets
◆ deferred injection and parsing of JSF components into Dojo widgets
The following example JSF application consists of two pages: Create Project and Project result. Figures 1 and 2 show these two pages. For ease of understanding, the examples shown in the figure will be used in all the ways described to show how to integrate Dojo and a JSF application
Method 1: delay bundling JSF components and client-side Dojo widgets
This is the easiest way to apply Dojo styles to JSF components. We just need to use JavaScript to bind the JSF component to the client-side Dojo widget. By using JavaScript, data can be passed and consistent between JSF components and Dojo widgets.
Method 2: build custom JSF components to enable Dojo widgets
JSF is a powerful Web framework. Not only does it provide standard user interface components for Web applications, it is also a very flexible API that allows users to customize. In this section, we will show you how to develop custom JSF components that integrate Dojo styles.
Typically, the JSF component will contain the following sections:
◆ UIComponent Class: this class is obtained from UIComponentBase or other existing JSF components, such as outputText. This class represents the core logic of the entire JSF component.
◆ Render Class: this class is used to render components. Typically, it is responsible for how to generate the HTML code to be rendered, so it is the key to this section. We need to change this class and have it generate Dojo-style HTML code.
◆ UI Component Tag Class: it is a JSP tag handler class that allows UI Component to be used for JSP pages. It can also be associated with a separate rendering class and a UIComponent class.
◆ Tag Library Descriptor File: this is a standard JavaEE JSP tag library descriptor (tld) file that associates a tag handler class with an available tag within a JSP page.
We will continue to take the scenario of creating a project as an example to show how to create an input text JSF component with dojo validation.
On how to talk about JSF and Dojo widgets to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.