Help

Controls

Switch Workspace

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Comparing current revision with historical revision 6.
Document History: JSF2
Current revision:
12
Parent:
Documentation
Created On:
28. Apr 2008, 12:56 (pete)
Last Modified On:
25. Feb 2009, 20:56 (dan)
Historical revisions:
11 25. Feb 2009, 07:48 (dan) ShowDiff
10 25. Feb 2009, 01:18 (dan) ShowDiff
9 25. Feb 2009, 01:00 (dan) ShowDiff
8 25. Feb 2009, 00:38 (dan) ShowDiff
7 17. Dec 2008, 13:19 (dan) ShowDiff
6 31. Oct 2008, 10:40 (dan) ShowDiff
5 23. Sep 2008, 20:36 (dan) ShowDiff
4 23. Sep 2008, 20:34 (dan) ShowDiff
3 23. Sep 2008, 20:28 (dan) ShowDiff
2 23. Sep 2008, 19:15 (dan) ShowDiff
1 31. Aug 2008, 23:46 (dan) ShowDiff
0 28. Apr 2008, 13:05 (christian) ShowDiff

From line 16 deleted to line 16:
= [273=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=273] - EZComp umbrella issue
From lines 35 to 36 deleted to line 34:
= [293=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=293] - Umbrella issue for Ajax

From lines 55 to 56 deleted to line 52:
= [291=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=291] Umbrella issue

From lines 93 to 94 deleted to line 88:
= [488=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=488] - Umbrella issue

From line 129 deleted to line 122:
= [455=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=455] - umbrella issue
From line 132 changed to line 124:
= [170=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=170] - allow |<f:param />| as a child of |<h:commandButton />|
= ~[170=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=170]~ - allow |<f:param />| as a child of |<h:commandButton />|
From line 135 changed to line 127:
= [359=> https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=359] - allow EL in |<to-view-id />|
= [359=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=359] - allow EL in |<to-view-id />|
From line 139 added to lines 131 to 138:
The following proposals and discussions relate to improvements to the validation system. There are many styles of validation and these issues try to address poor assumptions made in JSF and ways to make validation more DRY.

++ Subtree validation (481)

Moved to [Subtree validation=>wiki://64561#SubtreeValidationP1] on the JSF 2.1 page.

++ Inter-component validation

From line 141 changed to line 141:
I'm not a fan of client side validation - but I really like ajax style validation (use server side validation, and just re-render the relevant field). But *if* client-side validation was used where possible (e.g. required fields) and then ajax was used if not possible, and the messages just completed as necessary this would be cool!
<hr/>
From line 143 added to lines 143 to 154:
I (Dan) don't think that cross-field validation is a difficult problem to solve from the specification level. The reason cross-field validation is difficult today is because each field is converted individually, just prior to being validated. Therefore, when the validate() method is called on a UIInput component, there is no guarantee that any other component in the form will have been converted at that time. It depends on the relative placement of the components in the form, a fact which should not be relied on in a validator.

The current strategy puts the onus of having to convert the related field(s) on the validator that is attempting to perform a cross-field check. Naive developers will simply ignore the converters on that field. The developers that do use the proper converter logic may still get sloppy with exception handling. Refer to either the [EqualityValidator=>http://anonsvn.jboss.org/repos/seam/trunk/ui/src/main/java/org/jboss/seam/ui/validator/EqualityValidator.java] in Seam or Tomahawk to witness the ridiculous amount of code that must be used to handle all of these concerns properly.

A better way to implement validation is to first convert all of the components in the form. Once all the conversions are complete, then the validators run. An extra walk of the component tree can be avoided by putting the input components that were converted into an ordered collection (or map) and then iterating over that collection (or map) to apply the validators. Using this suggested strategy, implementing a multi-component validator is no more difficult than implementing a validator on a single component. The validator tag would need to provide some way to declaratively refer to the related components, such as by ID or value expression.

Frankly, I don't feel it is the responsibility of the specification to create a multi-component validator solution. What the specification should do is make it easy to create such a solution. With that said, I do believe it would be a good idea to implement a couple of basic multi-component validators to demonstrate 1) how it's done and 2) the ease in which it can be done with conversion and validation happening in distinct steps. Reference validators would include an equality validator (one or more components), a greater and less than validator, and perhaps a switch validator (a boolean component toggles the required flag on another component).

<hr/>

I'm not a fan of client side validation - but I really like Ajax-style validation (use server side validation, and just re-render the relevant field). But *if* client-side validation was used where possible (e.g. required fields) and then Ajax was used if not possible, and the messages just completed as necessary this would be cool!

From line 145 changed to line 157:
Handling of JSF messages is also weak: A message is either global or bound to a particular component. On the view, you can show either all global messages or the message for a particular component. There is no way to say, "convert" a component-bound message to a global message. I should be able to display and bundle whatever messages I feel necessary to show in whatever location.
Handling of JSF messages is also weak: A message is either global or bound to a particular component. On the view, you can show either all global messages or the message for a particular component. There is no way to say, "convert" a component-bound message to a global message. I should be able to display and bundle whatever messages I feel necessary to show in whatever location. What would really be cool is to be able to assign tags to a message so that it would be possible to group them by different aspects and possibility even use the same message in multiple places on the page by tag.
From line 170 deleted to line 182:
= [440=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=440] Umbrella issue for UIData
From line 180 changed to line 191:
=[451=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=451] - Support for a "noSelection" in h:select\*
=~[451=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=451]~ - Support for a "noSelection" in h:select\*
From line 204 added to lines 215 to 220:
+++Default Application Time Zone (P2)

Moved to [Default application time zone=>wiki://64561#DefaultApplicationTimeZoneP1] on the JSF 2.1 page

<hr/>

From line 214 changed to line 231:
= (P1) [161=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=161] Allow alteration of naming container separator character
= (P1) ~[161=>https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=161]~ Allow alteration of naming container separator character