,ch14.9433  Page 486  Monday, February 14, 2005  12:55 PM
Example 14 35. XSL stylesheet that generates an HTML form (continued)
Unlike a conventional Struts application, STXX doesn't use the Commons BeanUtils
classes to populate the
. Instead, it treats the
attribute as an XPath
expression into the XML form model specified for the action form.
Figure 14 10 shows the rendered form for adding a user.
Figure 14 10.  STXX generated HTML form
The /saveUser action receives and processes this form:
, shown in Example 14 36, extracts the data from the JDOM 
backed form and updates the model stored in the servlet context.
Example 14 36. Action that retrieves XML data from an action form
package com.oreilly.strutsckbk.ch14;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
486 | Chapter 14: Tiles and Other Presentation Approaches
This is the Title of the Book, eMatter Edition
Copyright   2005 O'Reilly & Associates, Inc. All rights reserved.






 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

strutsweb hosting


Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved