September 16, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Spinning Your Code with XSLT and JSF in Cocoon

  • May 3, 2004
  • By Michael Nash
  • Send Email »
  • More Articles »

Benefits

Either of the two approaches above has significant potential benefit, but perhaps even more so for the second method. They include:

  1. Use of the significant expressive power of XSL for the component designer (or, more accurately, the designer of the Renderer for the components).
  2. Easy page design, with the page design isolated from the complexity of XSL.
  3. The page designer can, however, select the display for each element, and specify options and formatting specifications through the use of simple attributes, just like HTML (with which they are no doubt already familiar).
  4. Capabilities (validation, state-saving, isolation from application logic) of JSF.
  5. The ability to change a component's appearance in all pages by altering one stylesheet.
  6. The ability to customize a component's appearance in a single page by calling an overriding stylesheet for that page.
  7. The ability to switch output formats (to WML, PDF, XSL, SVG, or JPG) with an alternate rendering stylesheet, no application changes required.
  8. All of Cocoon's other functionality (such as easy internationalization) is available to the developer.

Hopefully, you've seen in this article that it is not only possible, but indeed quite practical, to put the new JSF standard to use with a display technology other than JSF, and have gained some idea how that might be done. A number of open-source projects are already underway to provide implementations of the JSF standard, including MyFaces, Smile, and the Keel meta-framework, from which the above examples were drawn.

About the Author

Michael Nash is the president of JGlobal Limited, a software development, consulting, training and support company specializing in open source Java technologies. He is also a core developer of the Keel meta-framework, the author of two books and a number of articles and papers about next-generation web-application development with Java, and a member of the JSR-127 (JavaServer Faces) Expert Group. He can be reached at mnash@jglobal.com.



Page 3 of 3



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel