Re: [REVIEW] Add EL coercion verbage to javadocs / renderkit docs
The issue for this is:
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=152
Roger Kitain wrote:
>
>------------------------------------------------------------------------
>
>
><< ADD DESCRIPTION HERE >>
>
>
>SECTION: Modified Files
>----------------------------
>M jsf-api/doc/standard-html-renderkit-base.xml
>M jsf-api/doc/standard-html-renderkit.xml
>M jsf-api/src/javax/faces/component/UISelectMany.java
>M jsf-api/src/javax/faces/component/UISelectOne.java
>
>SECTION: Diffs
>----------------------------
>Index: jsf-api/doc/standard-html-renderkit-base.xml
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-api/doc/standard-html-renderkit-base.xml,v
>retrieving revision 1.25
>diff -u -r1.25 standard-html-renderkit-base.xml
>--- jsf-api/doc/standard-html-renderkit-base.xml 3 Feb 2006 21:49:18 -0000 1.25
>+++ jsf-api/doc/standard-html-renderkit-base.xml 1 Mar 2006 19:47:23 -0000
>@@ -1996,7 +1996,10 @@
> render it as an attribute on the outer "table" element, the value of which
> is the <code>clientId</code> of the component per the rules at the beginning
> of this specification. The value of the current SelectItem is rendered as
>- the value of the "value" attribute. If the value of the enclosing UISelectMany
>+ the value of the "value" attribute. Coerce the value of the currently rendered
>+ child to the type of the parent UISelectMany value using the Expression Language
>+ coercion rules - <code>ExpressionFactory.coerceToType</code> before comparing
>+ the values. If the value of the enclosing UISelectMany
> matches the current value, render "checked" as the value of the
> "checked" attribute. See the
> <a href="javax.faces.SelectManyjavax.faces.Listbox.html#options">"Rendering
>@@ -2119,7 +2122,11 @@
> <code>Object []</code>, otherwise the component must be a
> <code>UISelectOne</code> instance, call its
> <code>getSubmittedValue()</code> method and create an <code>Object
>- []</code> around the result. If the resultant array is non-null,
>+ []</code> around the result. Determine the type of the resultant array
>+ if the resultant array is non-null, otherwise the type is <code>String</code>.
>+ Coerce the current item value to this type following the Expression
>+ Language coercion rules - call <code>ExpressionFactory.coerceToType</code>.
>+ If the resultant array is non-null,
> we look in the array for a value that, when we pass the renderable
> value to its <code>equals()</code> method, it returns
> <code>true</code>, meaning the current element is selected. If
>@@ -2356,6 +2363,9 @@
> render it as an attribute on the outer "table" element, the value of which
> is the <code>clientId</code> of the component per the rules at the
> beginning of this specification.
>+ Coerce the value of the currently rendered child to the type of the parent
>+ UISelectOne value using the Expression Language coercion rules -
>+ <code>ExpressionFactory.coerceToType</code> before comparing the values.
> If the value of the currently rendered child is equal to
> the value of the parent UISelectOne, render an appropriate HTML
> boolean value indicating "checked" for the enclosing "input".
>Index: jsf-api/doc/standard-html-renderkit.xml
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-api/doc/standard-html-renderkit.xml,v
>retrieving revision 1.107
>diff -u -r1.107 standard-html-renderkit.xml
>--- jsf-api/doc/standard-html-renderkit.xml 15 Feb 2006 18:38:58 -0000 1.107
>+++ jsf-api/doc/standard-html-renderkit.xml 1 Mar 2006 19:47:45 -0000
>@@ -23114,7 +23114,10 @@
> render it as an attribute on the outer "table" element, the value of which
> is the <code>clientId</code> of the component per the rules at the beginning
> of this specification. The value of the current SelectItem is rendered as
>- the value of the "value" attribute. If the value of the enclosing UISelectMany
>+ the value of the "value" attribute. Coerce the value of the currently rendered
>+ child to the type of the parent UISelectMany value using the Expression Language
>+ coercion rules - <code>ExpressionFactory.coerceToType</code> before comparing
>+ the values. If the value of the enclosing UISelectMany
> matches the current value, render "checked" as the value of the
> "checked" attribute. See the
> <a href="javax.faces.SelectManyjavax.faces.Listbox.html#options">"Rendering
>@@ -23598,7 +23601,11 @@
> <code>Object []</code>, otherwise the component must be a
> <code>UISelectOne</code> instance, call its
> <code>getSubmittedValue()</code> method and create an <code>Object
>- []</code> around the result. If the resultant array is non-null,
>+ []</code> around the result. Determine the type of the resultant array
>+ if the resultant array is non-null, otherwise the type is <code>String</code>.
>+ Coerce the current item value to this type following the Expression
>+ Language coercion rules - call <code>ExpressionFactory.coerceToType</code>.
>+ If the resultant array is non-null,
> we look in the array for a value that, when we pass the renderable
> value to its <code>equals()</code> method, it returns
> <code>true</code>, meaning the current element is selected. If
>@@ -25196,6 +25203,9 @@
> render it as an attribute on the outer "table" element, the value of which
> is the <code>clientId</code> of the component per the rules at the
> beginning of this specification.
>+ Coerce the value of the currently rendered child to the type of the parent
>+ UISelectOne value using the Expression Language coercion rules -
>+ <code>ExpressionFactory.coerceToType</code> before comparing the values.
> If the value of the currently rendered child is equal to
> the value of the parent UISelectOne, render an appropriate HTML
> boolean value indicating "checked" for the enclosing "input".
>Index: jsf-api/src/javax/faces/component/UISelectMany.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/component/UISelectMany.java,v
>retrieving revision 1.57
>diff -u -r1.57 UISelectMany.java
>--- jsf-api/src/javax/faces/component/UISelectMany.java 5 Dec 2005 16:42:47 -0000 1.57
>+++ jsf-api/src/javax/faces/component/UISelectMany.java 1 Mar 2006 19:47:46 -0000
>@@ -419,7 +419,11 @@
> /**
> * <p>In addition to the standard validation behavior inherited from
> * {_at_link UIInput}, ensure that any specified values are equal to one of
>- * the available options. If it is not, enqueue an error message
>+ * the available options. Before comparing each option, coerce the
>+ * option value type to the type of this component's value calling
>+ * {_at_link javax.el.ExpressionFactory#coerceToType} passing the option value and
>+ * <code>targetType</code>. If the specified value is not equal to any
>+ * of the options, enqueue an error message
> * and set the <code>valid</code> property to <code>false</code>.</p>
> *
> * @param context The {_at_link FacesContext} for the current request
>Index: jsf-api/src/javax/faces/component/UISelectOne.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/component/UISelectOne.java,v
>retrieving revision 1.50
>diff -u -r1.50 UISelectOne.java
>--- jsf-api/src/javax/faces/component/UISelectOne.java 5 Dec 2005 16:42:47 -0000 1.50
>+++ jsf-api/src/javax/faces/component/UISelectOne.java 1 Mar 2006 19:47:46 -0000
>@@ -111,7 +111,11 @@
> /**
> * <p>In addition to the standard validation behavior inherited from
> * {_at_link UIInput}, ensure that any specified value is equal to one of
>- * the available options. If it is not, enqueue an error message
>+ * the available options. Before comparing each option, coerce the
>+ * option value type to the type of this component's value calling
>+ * {_at_link javax.el.ExpressionFactory#coerceToType} passing the option value and
>+ * <code>targetType</code>. If the specified value is not equal to any
>+ * of the options, enqueue an error message
> * and set the <code>valid</code> property to <code>false</code>.</p>
> *
> * @param context The {_at_link FacesContext} for the current request
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>