Platinum Sponsors

SUN

ELCA

Gold Sponsors

Silver Sponsors

Partners

Partner events

Olaf Merkert

Olaf Merkert

(4060) Web Forms 2.0 for JSF Developers

Technical short talk 20 min

Thursday, 2008-06-26, 11:00 - 11:20, Arena 6

Olaf Merkert - R+A Information Consultants (speaker)

Rate this talk:

Topics

Abstract

Web Forms 2.0 Basics

  One of the many possible "futures of the web" are HTML 5 and XHTML 2 
- currently W3C working drafts ([2], [3]). Because of it's practical origin (and 
the limited time of a presentation) we focus on HTML 5 and one of its major 
improvements in the input area called "Web Forms 2.0" (not to be 
confused with MS web forms) and the opportunities it offers for JSF developers.
While XHTML 2 is of a more theoretical origin, HTML 5 was initiated by the W3C 
independent Web Hypertext Application Technology Working Group (WHAT WG) as an 
answer to practical shortcomings of HTML 4 ([1]). As the W3C stopped the 
development of HTML 4 in 1999 it seems to be the time for a new standard by now. 
Both the HTML 5 specification and one of it's major parts - Web Forms 2.0 - were 
adopted as basis for review in 05/2007 by the W3C. A Web Forms 2.0 
implementation is already available in the Opera Browser and partly in Internet 
Explorer.
Central to the new form elements are typed input elements with types like 
"date", "email" or "number". Many of these type 
definitions can be extended with attributes like "min", 
"max" or "step". A "pattern" restricting the 
expected input can also be declared. Based on these input specifications the 
browser can react on erroneous user input to avoid server round trips - without 
the need for Java Script code and according to a standardised set of 
"validation vocabulary".

Web Forms 2.0 JSF-Components

  JSF provides basic tag libraries with components mirroring the abilities of 
current HTML4 form elements. If you want more functionality on your form 
elements (like client side validation), you can choose from numerous JSF 
component libraries - commercial or open source, with or without AJAX lookups 
and DOM tree modifications. But none of these implementations consider the 
(probably) upcoming W3C standards in the HTML/Form area. All differ in concepts 
and naming.
The presentation introduces a JSF component library approach porting the Web 
Forms 2.0 concepts and language to the JSF domain. Existing parallels like the 
"required" attribute on input elements are examined and implementation 
options like the incorporation of a browser independent Java Script library 
([4]) are outlined.

References

[1] http://www.w3.org/TR/web-forms-2/ - Web Forms 2.0 - W3C Working Draft 21 
August 2006
[2] http://www.whatwg.org/specs/web-forms/current-work/ - Web Forms 2.0 - WHATWG 
- Working Draft — 12 October 2006
[3] http://www.w3.org/html/wg/ - HTML 5 - Working Draft - 20 December 2007
[4] http://code.google.com/p/webforms2/ - A cross-browser implementation of the 
WHATWG Web Forms 2.0 specification (JS-based) - Weston Ruter

Media Partners

APRESS
inside-it
netzwoche
developpez
MokaByte