Website to keep web page updating

The inventory information such as book categories and the number of books in each category is displayed in the Web home page (see Figure 1).View image at full size To reflect accurate information, you need to synchronize the inventory information of the page with the server-side data in real time.You'll understand the Next, I'll talk about the other sub-process, creating dynamic GUI elements.The dynamic GUI elements in this case are the category links (see Figure 1).Now let's talk about how to bind different category detail information to different category links.I want to iterate an Array, transfer each element to a GUI component, and insert it into the JSF components tree.The other way is to bind the dynamic elements directly to the Web page.This method is easier than the first because there is no need to find the parent node in the JSF components tree.

Using the methods outlined in Listing 1 through Listing 3, you establish a framework for a managed bean to monitor changes of the server-side data.

The poll results and the real-time trading data are dynamic elements that are unknown until run time, but elements that should be added or updated when the server side sends a signal. A previous developer Works article, "Craft Ajax applications using JSF with CSS and Java Script, Part 2: Dynamic JSF forms" explains how to hide and display optional JSF components without refreshing a Web page.

However, you can't use the method described in that article to solve this problem.

At this time, JSF has no good solution to this problem.

Although you may be familiar with Java Swing applications such as "clock," in which data changes prompt GUI updates, or you might have read the implementation details of such applications in some basic Swing development guides, this approach will not work with my scenarios.

Leave a Reply