User's Manual

26 Chapter 5. WAF Component: Presentation
Figure 5-1. Tabbed Pane Using Bebop Components
5.4.1. Working With Bebop
Chapter 12 Presentation (Bebop) Tutorial discusses specifics of implementing Bebop. This section is
a more abstract look into the design and usage of Bebop.
Bebop components follow these guidelines:
Provide a tree of components; components are also containers.
Consolidate parameter validation logic and support for custom validators.
Lock data structures for reuse across requests.
Automate state preservation and services to allow components to control their own state.
Multiplex Swing-like events onto the HTTP request.
For a given request, one component is selected and has control.
Transforms XML for global style; no HTML in Java strings.
The code in Example 5-2 gives an idea of how Bebop is used.
public void service(HttpServletRequest sreq, HttpServletResponse sresp) {
Page page = new Page("Content Section");
page.add(new Label("Content Section"));