|By Ric Smith||
|March 17, 2007 01:30 PM EDT||
Rich Components Versus Mashup Components
Using Shale Remoting
The function is called when a user enters his or her name into a text field, and a response for each event is displayed in a div below the text field. Listing 1 shows the complete JSP page. The HelloBean managed bean defines three methods: welcomeUser, getParam, and writeResponse.
The latter two methods are simply utility functions. The getParam method extracts a value from the request string via the RequestParameterMap for a given parameter. The writeResponse method writes a response to the FacesContext, which is rendered to the client and processed by an XMLHttpRequest handler (more on this later).
The welcomeUser method is invoked with the URL faces/dynamic/hellobean/welcomeUser. This method extracts the value associated with the username parameter from the request, manipulates the extracted value, and then writes a response to the client using the writeResponse method. A parameter can be passed to the welcomeUser method by using the URL faces/dynamic/hellobean/welcomeUser?username=Ric, which calls the method and provides a name/value pair as a parameter. Accessing the URL via a browser provides a simple way to test this, and should display a response similar to that shown in Figure 2.
- Where Are RIA Technologies Headed in 2008?
- i-Technology Predictions for 2007: Where's It All Headed?
- Cloud People: A Who's Who of Cloud Computing
- "Mobile Web 2.0" – How Web 2.0 Impacts Mobility & Digital Convergence
- "Real-World Flex" by Adobe's Christophe Coenraets
- The OpenAjax Technology Vision: Accelerating Customer Success with AJAX
- A Compelling Ajax Discussion in New York City
- SOA World Expo: Enterprise Mashup Services
- Coach Wei's "Direct From Web 2.0" Blog: The Converging Developer Community
- Implementing SOA Without Enterprise Mashups? You Might As Well Kiss Your Job Goodbye!