Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

6.6.  Xml Files

Seam drastically reduces the amount of xml coding that needs to be done. One file that is of interest is the pages.xml, packaged in the app.war file's WEB-INF directory. This file is available in the resources/WEB-INF directory in the source code bundle. The pages.xml file is used to define page descriptions including Seam page parameters (HTTP GET parameters), page actions, page navigation rules, error pages etc. Among other things it can be used in a Seam application to define exception handlers and redirections.
In the case of our sample application we are using it to define a Seam page parameter. The pages.xml in this example contains the following code:
<page view-id="/edit.xhtml">
    <param name="tid" value="#{todoDao.id}" 
           converterId="javax.faces.Long"/>
</page>
This defines a parameter named tid for the edit.xhtml page. When the edit.xhtml page is loaded, the HTTP GET request parameter tid is converted to a Long value and assigned to the id property of the todoDao object. You can have as many page parameters as required to bind HTTP GET request parameters to the back-end components in your application.

 
 
  Published under the terms of the Open Publication License Design by Interspire