[jsr-314-open-mirror] [jsr-314-open] Auto Reply: CDI for Websphere 7
by barbara.louis@oracle.com
This is an auto-replied message. I am out of office right now. I will be back in office on Aug 17th.
Contacts for each area listed below:
JAX-WS: Jitu (Jitendra.Kotamraju(a)oracle.com)
109: Rama (Rama.Pulavarthi(a)oracle.COM)/ Bhakti (bhakti.mehta(a)oracle.com)
JSF: Ed Burns (edward.burns(a)oracle.com)
CDI: Siva (Sivakumar.Thyagarajan(a)Sun.COM)
Management issues: Abhijit Kumar
Thanks,
Barbara
14 years, 4 months
[jsr-314-open-mirror] [jsr-314-open] Auto Reply: Re: [490-XmlViews] Proposal
by barbara.louis@oracle.com
This is an auto-replied message. I am out of office right now. I will be back in office on Aug 17th.
Contacts for each area listed below:
JAX-WS: Jitu (Jitendra.Kotamraju(a)oracle.com)
109: Rama (Rama.Pulavarthi(a)oracle.COM)/ Bhakti (bhakti.mehta(a)oracle.com)
JSF: Ed Burns (edward.burns(a)oracle.com)
CDI: Siva (Sivakumar.Thyagarajan(a)Sun.COM)
Management issues: Abhijit Kumar
Thanks,
Barbara
14 years, 4 months
[jsr-314-open-mirror] [jsr-314-open] [490-XmlViews] Proposal
by Ed Burns
ACTION: Review and comment by 23:59 EDT 17 August 2010.
Proposal for XML JSF Views https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=490
SECTION: Modified Files
----------------------------
M jsf-api/doc/standard-html-renderkit-base.xml
M jsf-api/doc/standard-html-renderkit.xml
M jsf-ri/src/main/resources/com/sun/faces/standard-html-renderkit-impl.xml
M jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/html/HtmlLibrary.java
A jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/TitleRenderer.java
A jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlRenderer.java
- New standard components
+ <component-type>javax.faces.OutputHtml</component-type>
+ <component-class>javax.faces.component.html.Html</component-class>
+ <component-type>javax.faces.OutputTitle</component-type>
+ <component-class>javax.faces.component.html.HtmlTitle</component-class>
- New standard renderers
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>javax.faces.Html</renderer-type>
This operates exactly like h:head and h:body except that it renders
<html>. It also allows resources to be output, in the same way as
h:head and h:body.
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>javax.faces.Title</renderer-type>
This just outputs <title> and </title>
A jsf-api/doc/web-facesview_2_1.xsd
- This simple schema is necessary to declare the root node, on which the
XML namespaces to be used in a Facelets XML View document must be
declared.
It is essentially the following:
+ <xsd:element name = "faces-view" type="javaee:faces-viewType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-view" element is the root of the UIComponent hierarchy,
+ and contains nested elements for all
+ of the other components.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-viewType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for faces-view. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
M jsf-api/src/main/java/javax/faces/application/ViewHandler.java
- make constant DEFAULT_SUFFIX be
+ public static final String DEFAULT_SUFFIX = ".xhtml .view.xml .jsp";
M jsf-ri/src/main/java/com/sun/faces/application/ApplicationAssociate.java
A jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml
A jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/XmlLibrary.java
A jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/NoOpHandler.java
- add XmlLibrary and a tag handler for <faces-view>. This lets us have
faces views in XML, as shown in the example section.
M jsf-ri/systest/web/WEB-INF/web.xml.template
- necessary context params to make it generate valid HTML when the only
thing accessed is a .view.xml page.
+
<context-param>
+ <param-name>com.sun.faces.autoCompleteOffOnViewState</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.FACELETS_SUPPRESS_XML_DECLARATION</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <context-param>
A jsf-ri/systest/web/view.xml
A jsf-ri/systest/web/view.xml/index.view.xml
- See example section
SECTION: index.view.xml
<?xml version="1.0" encoding="UTF-8"?>
<faces-view xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesview_2_1.xsd"
version="2.1"
xmlns:h="http://java.sun.com/jsf/html">
<h:html>
<h:head><h:title>Raw XML View</h:title></h:head>
<h:body>
<h:form>
<h:panelGrid column="2">
<h:outputText value="hello"></h:outputText>
<h:commandButton value="reload"></h:commandButton>
</h:panelGrid>
</h:form>
</h:body>
</h:html>
</faces-view>
Here is an HTTP transaction log for this view.
++++++CLIENT REQUEST:
GET http://localhost:8080/jsf-systest/view.xml/index.faces HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.7,de;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Cookie: JSESSIONID=848d17af367c6b905f4b650bee7c
-----PROXY RESPONSE:
HTTP/1.1 200 OK
X-Powered-By: Servlet/3.0
Server: GlassFish v3
X-Powered-By: JSF/2.0
Set-Cookie: JSESSIONID=85198d4e88aaced7c0a028544010; Path=/jsf-systest
Content-Type: text/html;charset=UTF-8
Content-Length: 507
Date: Thu, 12 Aug 2010 22:00:32 GMT
Connection: close
<html><head><title>Raw XML View</title></head><body>
<form id="j_idt6" name="j_idt6" method="post" action="/jsf-systest/view.xml/index.view.faces" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="j_idt6" value="j_idt6" />
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id1:j_id2" />
<table>
<tbody>
<tr>
<td>hello</td>
</tr>
<tr>
<td><input type="submit" name="j_idt6:j_idt9" value="reload" /></td>
</tr>
</tbody>
</table>
</form></body></html>
---
For some unknown reason, this *does not* render in Safari or Chrome
(WebKit browsers). It renders fine in Firefox. Any ideas?
Ed
SECTION: Diffs
----------------------------
Index: jsf-api/doc/standard-html-renderkit-base.xml
===================================================================
--- jsf-api/doc/standard-html-renderkit-base.xml (revision 8552)
+++ jsf-api/doc/standard-html-renderkit-base.xml (working copy)
@@ -996,6 +996,20 @@
<component>
<description>NONE</description>
+ <display-name>html</display-name>
+ <component-type>javax.faces.OutputHtml</component-type>
+ <component-class>javax.faces.component.html.Html</component-class>
+
+ <xi:include href="i18n-props.xml" xpointer="xpointer(/root/*)"/>
+
+ <component-extension>
+ <base-component-type>javax.faces.Output</base-component-type>
+ <renderer-type>javax.faces.Html</renderer-type>
+ </component-extension>
+ </component>
+
+ <component>
+ <description>NONE</description>
<display-name>head</display-name>
<component-type>javax.faces.OutputHead</component-type>
<component-class>javax.faces.component.html.HtmlHead</component-class>
@@ -1010,6 +1024,20 @@
<component>
<description>NONE</description>
+ <display-name>title</display-name>
+ <component-type>javax.faces.OutputTitle</component-type>
+ <component-class>javax.faces.component.html.HtmlTitle</component-class>
+
+ <xi:include href="i18n-props.xml" xpointer="xpointer(/root/*)"/>
+
+ <component-extension>
+ <base-component-type>javax.faces.Output</base-component-type>
+ <renderer-type>javax.faces.Title</renderer-type>
+ </component-extension>
+ </component>
+
+ <component>
+ <description>NONE</description>
<display-name>body</display-name>
<component-type>javax.faces.OutputBody</component-type>
<component-class>javax.faces.component.html.HtmlBody</component-class>
@@ -3484,6 +3512,70 @@
</renderer-extension>
</renderer>
+<renderer>
+ <description><![CDATA[<div class="changed_added_2_1">
+
+<p><span class="changed_modified_2_1">Render</span> the markup for
+a <code><html></code> element.</p>
+
+ <p>Decode Behavior</p>
+
+ <ul>
+
+<p>No action is required during decode for this renderer.</p>
+
+</ul>
+
+ <p>Encode Behavior</p>
+
+ <ul>
+
+<p>Render the starting <code><html></code> element tag. Any
+attributes declared on the element must be passed through unmodified to
+the rendered output. At some
+point before rendering the closing <code></html></code> element
+tag, render any resources that have been targeted for this "html"
+element:
+ <ul>
+ <li>Obtain a <code>UIViewRoot</code> instance.</li>
+ <li>Obtain a <code>List</code> of component resources targeted for
+ this "html" element with a call to <code>UIViewRoot.getComponentResources()</code>
+ with the <code>String "html"</code> as the argument.</li>
+ <li>Iterate over the returned <code>List</code> of <code>UIComponent</code> instances
+ and call <code>encodeAll</code> on each <code>UIComponent</code> instance.
+
+<p>Any attributes declared on the element must be passed through
+unmodified to the rendered output.</p>
+
+ </ul>
+
+ <p>Note that due to the cascading nature of CSS files, the order
+ in which these files have been added to the view must be preserved
+ when rendering the references to the files within the
+ <code><head></code> element. Also, the end result of the
+ rendered <code><head></code> section must be that any CSS
+ files referenced due to previous calls to
+ <code>addComponentResource()</code> do not adversely interfere
+ with any CSS files manually placed in this section by the page
+ author.</p>
+
+ <p>Render the ending <code></html></code> element tag.</p>
+
+</div>]]></description>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>javax.faces.Html</renderer-type>
+ <renderer-class>
+ <xi:include href="standard-html-renderkit-impl.xml" xpointer="xpointer(/root/output-html-renderer-class/text())"/>
+ </renderer-class>
+
+ <xi:include href="i18n-attrs.xml" xpointer="xpointer(/root/*)"/>
+
+ <renderer-extension>
+ <jsp-ignore>true</jsp-ignore>
+ <tag-name>html</tag-name>
+ </renderer-extension>
+ </renderer>
+
<renderer>
<description><![CDATA[<div class="changed_added_2_0">
@@ -3553,6 +3645,47 @@
</renderer>
<renderer>
+ <description><![CDATA[<div class="changed_added_2_1">
+
+<p><span class="changed_modified_2_0_rev_a">Render</span> the markup for
+a <code><title></code> element.</p>
+
+ <p>Decode Behavior</p>
+
+ <ul>
+
+<p>No action is required during decode for this renderer.</p>
+
+</ul>
+
+ <p>Encode Behavior</p>
+
+ <ul>
+
+<p>Render the starting <code><title></code> element tag. Any
+attributes declared on the element must be passed through unmodified to
+the rendered output.</p>
+
+ <p>Render the ending <code></title></code> element tag.</p>
+
+</div>
+
+</div>]]></description>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>javax.faces.Title</renderer-type>
+ <renderer-class>
+ <xi:include href="standard-html-renderkit-impl.xml" xpointer="xpointer(/root/output-title-renderer-class/text())"/>
+ </renderer-class>
+
+ <xi:include href="i18n-attrs.xml" xpointer="xpointer(/root/*)"/>
+
+ <renderer-extension>
+ <jsp-ignore>true</jsp-ignore>
+ <tag-name>title</tag-name>
+ </renderer-extension>
+ </renderer>
+
+ <renderer>
<description><![CDATA[<div class="changed_added_2_0">
<p>Render the markup for a <code><body></code> element.</p>
Index: jsf-api/doc/web-facesview_2_1.xsd
===================================================================
--- jsf-api/doc/web-facesview_2_1.xsd (revision 0)
+++ jsf-api/doc/web-facesview_2_1.xsd (revision 0)
@@ -0,0 +1,129 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+
+
+<xsd:schema
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.1">
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the
+ GNU General Public License Version 2 only ("GPL") or the Common
+ Development and Distribution License("CDDL") (collectively, the
+ "License"). You may not use this file except in compliance with
+ the License. You can obtain a copy of the License at
+ https://glassfish.dev.java.net/public/CDDL+GPL.html or
+ glassfish/bootstrap/legal/LICENSE.txt. See the License for the
+ specific language governing permissions and limitations under the
+ License.
+
+ When distributing the software, include this License Header
+ Notice in each file and include the License file at
+ glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
+ particular file as subject to the "Classpath" exception as
+ provided by Sun in the GPL Version 2 section of the License file
+ that accompanied this code. If applicable, add the following
+ below the License Header, with the fields enclosed by brackets []
+ replaced by your own identifying information:
+ "Portions Copyrighted [year] [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the
+ CDDL or only the GPL Version 2, indicate your decision by adding
+ "[Contributor] elects to include this software in this
+ distribution under the [CDDL or GPL Version 2] license." If you
+ don't indicate a single choice of license, a recipient has the
+ option to distribute your version of this file under either the
+ CDDL, the GPL Version 2 or to extend the choice of license to its
+ licensees as provided above. However, if you add GPL Version 2
+ code and therefore, elected the GPL Version 2 license, then the
+ option applies only if the new code is made subject to such
+ option by the copyright holder.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+
+ The XML Schema for the JavaServer Faces XML Views (Version 2.1).
+
+ All JavaServer Faces XML Views must indicate
+ the JavaServer Faces XML View schema by indicating the JavaServer
+ Faces namespace:
+
+ http://java.sun.com/xml/ns/javaee
+
+ and by indicating the version of the schema by
+ using the version element as shown below:
+
+ <faces-view xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="..."
+ version="2.1">
+ ...
+ </faces-view>
+
+ The instance documents may indicate the published
+ version of the schema using xsi:schemaLocation attribute
+ for javaee namespace with the following location:
+
+ http://java.sun.com/xml/ns/javaee/web-facesview_2_1.xsd
+
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+ <!-- **************************************************** -->
+
+ <xsd:element name = "faces-view" type="javaee:faces-viewType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-view" element is the root of the UIComponent hierarchy,
+ and contains nested elements for all
+ of the other components.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-viewType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for faces-view. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+</xsd:schema>
Index: jsf-api/doc/standard-html-renderkit.xml
===================================================================
--- jsf-api/doc/standard-html-renderkit.xml (revision 8552)
+++ jsf-api/doc/standard-html-renderkit.xml (working copy)
@@ -20021,6 +20021,44 @@
-->
<component>
<description>NONE</description>
+ <display-name>html</display-name>
+ <component-type>javax.faces.OutputHtml</component-type>
+ <component-class>javax.faces.component.html.Html</component-class>
+
+ <property>
+ <description>
+ Direction indication for text that does not inherit directionality.
+ Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
+ </description>
+ <display-name>Direction</display-name>
+ <icon/>
+ <property-name>dir</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <pass-through>true</pass-through>
+ </property-extension>
+ </property>
+ <property>
+ <description>
+ Code describing the language used in the generated markup
+ for this component.
+ </description>
+ <display-name>Language Code</display-name>
+ <icon/>
+ <property-name>lang</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <pass-through>true</pass-through>
+ </property-extension>
+ </property>
+
+ <component-extension>
+ <base-component-type>javax.faces.Output</base-component-type>
+ <renderer-type>javax.faces.Html</renderer-type>
+ </component-extension>
+ </component>
+ <component>
+ <description>NONE</description>
<display-name>head</display-name>
<component-type>javax.faces.OutputHead</component-type>
<component-class>javax.faces.component.html.HtmlHead</component-class>
@@ -20059,6 +20097,44 @@
</component>
<component>
<description>NONE</description>
+ <display-name>title</display-name>
+ <component-type>javax.faces.OutputTitle</component-type>
+ <component-class>javax.faces.component.html.HtmlTitle</component-class>
+
+ <property>
+ <description>
+ Direction indication for text that does not inherit directionality.
+ Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
+ </description>
+ <display-name>Direction</display-name>
+ <icon/>
+ <property-name>dir</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <pass-through>true</pass-through>
+ </property-extension>
+ </property>
+ <property>
+ <description>
+ Code describing the language used in the generated markup
+ for this component.
+ </description>
+ <display-name>Language Code</display-name>
+ <icon/>
+ <property-name>lang</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <pass-through>true</pass-through>
+ </property-extension>
+ </property>
+
+ <component-extension>
+ <base-component-type>javax.faces.Output</base-component-type>
+ <renderer-type>javax.faces.Title</renderer-type>
+ </component-extension>
+ </component>
+ <component>
+ <description>NONE</description>
<display-name>body</display-name>
<component-type>javax.faces.OutputBody</component-type>
<component-class>javax.faces.component.html.HtmlBody</component-class>
@@ -30938,6 +31014,94 @@
</renderer-extension>
</renderer>
<renderer>
+ <description><![CDATA[<div class="changed_added_2_1">
+
+<p><span class="changed_modified_2_1">Render</span> the markup for
+a <code><html></code> element.</p>
+
+ <p>Decode Behavior</p>
+
+ <ul>
+
+<p>No action is required during decode for this renderer.</p>
+
+</ul>
+
+ <p>Encode Behavior</p>
+
+ <ul>
+
+<p>Render the starting <code><html></code> element tag. Any
+attributes declared on the element must be passed through unmodified to
+the rendered output. At some
+point before rendering the closing <code></html></code> element
+tag, render any resources that have been targeted for this "html"
+element:
+ <ul>
+ <li>Obtain a <code>UIViewRoot</code> instance.</li>
+ <li>Obtain a <code>List</code> of component resources targeted for
+ this "html" element with a call to <code>UIViewRoot.getComponentResources()</code>
+ with the <code>String "html"</code> as the argument.</li>
+ <li>Iterate over the returned <code>List</code> of <code>UIComponent</code> instances
+ and call <code>encodeAll</code> on each <code>UIComponent</code> instance.
+
+<p>Any attributes declared on the element must be passed through
+unmodified to the rendered output.</p>
+
+ </ul>
+
+ <p>Note that due to the cascading nature of CSS files, the order
+ in which these files have been added to the view must be preserved
+ when rendering the references to the files within the
+ <code><head></code> element. Also, the end result of the
+ rendered <code><head></code> section must be that any CSS
+ files referenced due to previous calls to
+ <code>addComponentResource()</code> do not adversely interfere
+ with any CSS files manually placed in this section by the page
+ author.</p>
+
+ <p>Render the ending <code></html></code> element tag.</p>
+
+</div>]]></description>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>javax.faces.Html</renderer-type>
+ <renderer-class>
+ com.sun.faces.renderkit.html_basic.HtmlRenderer
+ </renderer-class>
+
+ <attribute>
+ <description>
+ Direction indication for text that does not inherit directionality.
+ Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
+ </description>
+ <display-name>Direction</display-name>
+ <icon/>
+ <attribute-name>dir</attribute-name>
+ <attribute-class>java.lang.String</attribute-class>
+ <attribute-extension>
+ <pass-through>true</pass-through>
+ </attribute-extension>
+ </attribute>
+ <attribute>
+ <description>
+ Code describing the language used in the generated markup
+ for this component.
+ </description>
+ <display-name>Language Code</display-name>
+ <icon/>
+ <attribute-name>lang</attribute-name>
+ <attribute-class>java.lang.String</attribute-class>
+ <attribute-extension>
+ <pass-through>true</pass-through>
+ </attribute-extension>
+ </attribute>
+
+ <renderer-extension>
+ <jsp-ignore>true</jsp-ignore>
+ <tag-name>html</tag-name>
+ </renderer-extension>
+ </renderer>
+ <renderer>
<description><![CDATA[<div class="changed_added_2_0">
<p><span class="changed_modified_2_0_rev_a">Render</span> the markup for
@@ -31030,6 +31194,71 @@
</renderer-extension>
</renderer>
<renderer>
+ <description><![CDATA[<div class="changed_added_2_1">
+
+<p><span class="changed_modified_2_0_rev_a">Render</span> the markup for
+a <code><title></code> element.</p>
+
+ <p>Decode Behavior</p>
+
+ <ul>
+
+<p>No action is required during decode for this renderer.</p>
+
+</ul>
+
+ <p>Encode Behavior</p>
+
+ <ul>
+
+<p>Render the starting <code><title></code> element tag. Any
+attributes declared on the element must be passed through unmodified to
+the rendered output.</p>
+
+ <p>Render the ending <code></title></code> element tag.</p>
+
+</div>
+
+</div>]]></description>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>javax.faces.Title</renderer-type>
+ <renderer-class>
+ com.sun.faces.renderkit.html_basic.TitleRenderer
+ </renderer-class>
+
+ <attribute>
+ <description>
+ Direction indication for text that does not inherit directionality.
+ Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
+ </description>
+ <display-name>Direction</display-name>
+ <icon/>
+ <attribute-name>dir</attribute-name>
+ <attribute-class>java.lang.String</attribute-class>
+ <attribute-extension>
+ <pass-through>true</pass-through>
+ </attribute-extension>
+ </attribute>
+ <attribute>
+ <description>
+ Code describing the language used in the generated markup
+ for this component.
+ </description>
+ <display-name>Language Code</display-name>
+ <icon/>
+ <attribute-name>lang</attribute-name>
+ <attribute-class>java.lang.String</attribute-class>
+ <attribute-extension>
+ <pass-through>true</pass-through>
+ </attribute-extension>
+ </attribute>
+
+ <renderer-extension>
+ <jsp-ignore>true</jsp-ignore>
+ <tag-name>title</tag-name>
+ </renderer-extension>
+ </renderer>
+ <renderer>
<description><![CDATA[<div class="changed_added_2_0">
<p>Render the markup for a <code><body></code> element.</p>
Index: jsf-api/src/main/java/javax/faces/application/ViewHandler.java
===================================================================
--- jsf-api/src/main/java/javax/faces/application/ViewHandler.java (revision 8552)
+++ jsf-api/src/main/java/javax/faces/application/ViewHandler.java (working copy)
@@ -127,7 +127,7 @@
* <p>The value to use for the default extension if the webapp is using
* url extension mapping.</p>
*/
- public static final String DEFAULT_SUFFIX = ".xhtml .jsp";
+ public static final String DEFAULT_SUFFIX = ".xhtml .view.xml .jsp";
/**
* <p class="changed_added_2_0">Allow the web application to define an
Index: jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/html/HtmlLibrary.java
===================================================================
--- jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/html/HtmlLibrary.java (revision 8552)
+++ jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/html/HtmlLibrary.java (working copy)
@@ -92,6 +92,9 @@
this.addHtmlComponent("head", "javax.faces.Output",
"javax.faces.Head");
+ this.addHtmlComponent("html", "javax.faces.Output",
+ "javax.faces.Html");
+
this.addHtmlComponent("inputHidden", "javax.faces.HtmlInputHidden",
"javax.faces.Hidden");
@@ -162,6 +165,10 @@
this.addHtmlComponent("selectOneRadio",
"javax.faces.HtmlSelectOneRadio", "javax.faces.Radio");
+
+ this.addHtmlComponent("title", "javax.faces.Output",
+ "javax.faces.Title");
+
}
}
Index: jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/XmlLibrary.java
===================================================================
--- jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/XmlLibrary.java (revision 0)
+++ jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/XmlLibrary.java (revision 0)
@@ -0,0 +1,75 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common Development
+ * and Distribution License("CDDL") (collectively, the "License"). You
+ * may not use this file except in compliance with the License. You can obtain
+ * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ * When distributing the software, include this License Header Notice in each
+ * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ * Sun designates this particular file as subject to the "Classpath" exception
+ * as provided by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License
+ * Header, with the fields enclosed by brackets [] replaced by your own
+ * identifying information: "Portions Copyrighted [year]
+ * [name of copyright owner]"
+ *
+ * Contributor(s):
+ *
+ * If you wish your version of this file to be governed by only the CDDL or
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
+ * elects to include this software in this distribution under the [CDDL or GPL
+ * Version 2] license." If you don't indicate a single choice of license, a
+ * recipient has the option to distribute your version of this file under
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
+ * its licensees as provided above. However, if you add GPL Version 2 code
+ * and therefore, elected the GPL Version 2 license, then the option applies
+ * only if the new code is made subject to such option by the copyright
+ * holder.
+ *
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2005-2007 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.faces.facelets.tag.xml;
+
+import com.sun.faces.facelets.tag.composite.*;
+import com.sun.faces.facelets.tag.AbstractTagLibrary;
+
+/**
+ * @author Jacob Hookom
+ * @version $Id: CompositeLibrary.java 8384 2010-05-17 14:59:38Z jdlee $
+ */
+public final class XmlLibrary extends AbstractTagLibrary {
+
+ public final static String Namespace = "http://java.sun.com/xml/ns/javaee";
+
+ public final static XmlLibrary Instance = new XmlLibrary();
+
+ public XmlLibrary() {
+ super(Namespace);
+
+ this.addTagHandler("faces-view", NoOpHandler.class);
+ }
+}
Index: jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/NoOpHandler.java
===================================================================
--- jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/NoOpHandler.java (revision 0)
+++ jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/NoOpHandler.java (revision 0)
@@ -0,0 +1,78 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common Development
+ * and Distribution License("CDDL") (collectively, the "License"). You
+ * may not use this file except in compliance with the License. You can obtain
+ * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ * When distributing the software, include this License Header Notice in each
+ * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ * Sun designates this particular file as subject to the "Classpath" exception
+ * as provided by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License
+ * Header, with the fields enclosed by brackets [] replaced by your own
+ * identifying information: "Portions Copyrighted [year]
+ * [name of copyright owner]"
+ *
+ * Contributor(s):
+ *
+ * If you wish your version of this file to be governed by only the CDDL or
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
+ * elects to include this software in this distribution under the [CDDL or GPL
+ * Version 2] license." If you don't indicate a single choice of license, a
+ * recipient has the option to distribute your version of this file under
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
+ * its licensees as provided above. However, if you add GPL Version 2 code
+ * and therefore, elected the GPL Version 2 license, then the option applies
+ * only if the new code is made subject to such option by the copyright
+ * holder.
+ *
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2005-2007 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.sun.faces.facelets.tag.xml;
+
+import com.sun.faces.facelets.tag.TagHandlerImpl;
+
+import javax.faces.component.UIComponent;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.TagConfig;
+import java.io.IOException;
+
+public class NoOpHandler extends TagHandlerImpl {
+
+ public final static String Name = "faces-view";
+
+
+ public NoOpHandler(TagConfig config) {
+ super(config);
+ }
+
+ public void apply(FaceletContext ctx, UIComponent parent) throws IOException {
+ this.nextHandler.apply(ctx, parent);
+ }
+
+}
Index: jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/TitleRenderer.java
===================================================================
--- jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/TitleRenderer.java (revision 0)
+++ jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/TitleRenderer.java (revision 0)
@@ -0,0 +1,91 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common Development
+ * and Distribution License("CDDL") (collectively, the "License"). You
+ * may not use this file except in compliance with the License. You can obtain
+ * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ * When distributing the software, include this License Header Notice in each
+ * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ * Sun designates this particular file as subject to the "Classpath" exception
+ * as provided by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License
+ * Header, with the fields enclosed by brackets [] replaced by your own
+ * identifying information: "Portions Copyrighted [year]
+ * [name of copyright owner]"
+ *
+ * Contributor(s):
+ *
+ * If you wish your version of this file to be governed by only the CDDL or
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
+ * elects to include this software in this distribution under the [CDDL or GPL
+ * Version 2] license." If you don't indicate a single choice of license, a
+ * recipient has the option to distribute your version of this file under
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
+ * its licensees as provided above. However, if you add GPL Version 2 code
+ * and therefore, elected the GPL Version 2 license, then the option applies
+ * only if the new code is made subject to such option by the copyright
+ * holder.
+ */
+
+package com.sun.faces.renderkit.html_basic;
+
+import com.sun.faces.renderkit.RenderKitUtils;
+import com.sun.faces.renderkit.Attribute;
+import com.sun.faces.renderkit.AttributeManager;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+
+/**
+ * /**
+ * <p>This <code>Renderer</code> is responsible for rendering
+ * the standard HTML title element.</p>
+ */
+public class TitleRenderer extends Renderer {
+
+ private static final Attribute[] TITLE_ATTRIBUTES =
+ AttributeManager.getAttributes(AttributeManager.Key.OUTPUTTITLE);
+
+ @Override
+ public void decode(FacesContext context, UIComponent component) {
+ // no-op
+ }
+
+ @Override
+ public void encodeBegin(FacesContext context, UIComponent component)
+ throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement("title", component);
+ RenderKitUtils.renderPassThruAttributes(context,
+ writer,
+ component,
+ TITLE_ATTRIBUTES);
+ }
+
+ @Override
+ public void encodeChildren(FacesContext context, UIComponent component)
+ throws IOException {
+ // no-op
+ }
+
+ @Override
+ public void encodeEnd(FacesContext context, UIComponent component)
+ throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ writer.endElement("title");
+ }
+
+
+}
Index: jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlRenderer.java
===================================================================
--- jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlRenderer.java (revision 0)
+++ jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlRenderer.java (revision 0)
@@ -0,0 +1,106 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common Development
+ * and Distribution License("CDDL") (collectively, the "License"). You
+ * may not use this file except in compliance with the License. You can obtain
+ * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ * language governing permissions and limitations under the License.
+ *
+ * When distributing the software, include this License Header Notice in each
+ * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ * Sun designates this particular file as subject to the "Classpath" exception
+ * as provided by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License
+ * Header, with the fields enclosed by brackets [] replaced by your own
+ * identifying information: "Portions Copyrighted [year]
+ * [name of copyright owner]"
+ *
+ * Contributor(s):
+ *
+ * If you wish your version of this file to be governed by only the CDDL or
+ * only the GPL Version 2, indicate your decision by adding "[Contributor]
+ * elects to include this software in this distribution under the [CDDL or GPL
+ * Version 2] license." If you don't indicate a single choice of license, a
+ * recipient has the option to distribute your version of this file under
+ * either the CDDL, the GPL Version 2 or to extend the choice of license to
+ * its licensees as provided above. However, if you add GPL Version 2 code
+ * and therefore, elected the GPL Version 2 license, then the option applies
+ * only if the new code is made subject to such option by the copyright
+ * holder.
+ */
+
+package com.sun.faces.renderkit.html_basic;
+
+import com.sun.faces.renderkit.RenderKitUtils;
+import com.sun.faces.renderkit.Attribute;
+import com.sun.faces.renderkit.AttributeManager;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+
+/**
+ * /**
+ * <p>This <code>Renderer</code> is responsible for rendering
+ * the standard HTML html element as well as rendering any resources
+ * that should be output before the <code>html</code> tag is closed.</p>
+ */
+public class HtmlRenderer extends Renderer {
+
+ private static final Attribute[] HTML_ATTRIBUTES =
+ AttributeManager.getAttributes(AttributeManager.Key.OUTPUTHTML);
+
+ @Override
+ public void decode(FacesContext context, UIComponent component) {
+ // no-op
+ }
+
+ @Override
+ public void encodeBegin(FacesContext context, UIComponent component)
+ throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement("html", component);
+ RenderKitUtils.renderPassThruAttributes(context,
+ writer,
+ component,
+ HTML_ATTRIBUTES);
+ encodeHtmlResources(context);
+ }
+
+ @Override
+ public void encodeChildren(FacesContext context, UIComponent component)
+ throws IOException {
+ // no-op
+ }
+
+ @Override
+ public void encodeEnd(FacesContext context, UIComponent component)
+ throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ writer.endElement("html");
+ }
+
+
+ // --------------------------------------------------------- Private Methods
+
+
+ private void encodeHtmlResources(FacesContext context)
+ throws IOException {
+
+ UIViewRoot viewRoot = context.getViewRoot();
+ for (UIComponent resource : viewRoot.getComponentResources(context, "html")) {
+ resource.encodeAll(context);
+ }
+
+ }
+
+}
Index: jsf-ri/src/main/java/com/sun/faces/application/ApplicationAssociate.java
===================================================================
--- jsf-ri/src/main/java/com/sun/faces/application/ApplicationAssociate.java (revision 8552)
+++ jsf-ri/src/main/java/com/sun/faces/application/ApplicationAssociate.java (working copy)
@@ -37,7 +37,6 @@
package com.sun.faces.application;
import com.sun.faces.RIConstants;
-import com.sun.faces.application.ApplicationStateInfo;
import com.sun.faces.scripting.groovy.GroovyHelper;
import com.sun.faces.application.resource.ResourceCache;
import com.sun.faces.application.resource.ResourceManager;
@@ -74,6 +73,7 @@
import com.sun.faces.el.ELUtils;
import com.sun.faces.el.FacesCompositeELResolver;
import com.sun.faces.el.VariableResolverChainWrapper;
+import com.sun.faces.facelets.tag.xml.XmlLibrary;
import com.sun.faces.lifecycle.ELResolverInitPhaseListener;
import javax.el.CompositeELResolver;
@@ -728,6 +728,7 @@
c.addTagLibrary(new FunctionLibrary(DevTools.class, "http://java.sun.com/mojarra/private/functions"));
}
c.addTagLibrary(new CompositeLibrary());
+ c.addTagLibrary(new XmlLibrary());
return c;
Index: jsf-ri/src/main/resources/com/sun/faces/standard-html-renderkit-impl.xml
===================================================================
--- jsf-ri/src/main/resources/com/sun/faces/standard-html-renderkit-impl.xml (revision 8552)
+++ jsf-ri/src/main/resources/com/sun/faces/standard-html-renderkit-impl.xml (working copy)
@@ -89,9 +89,15 @@
<output-body-renderer-class>
com.sun.faces.renderkit.html_basic.BodyRenderer
</output-body-renderer-class>
+ <output-html-renderer-class>
+ com.sun.faces.renderkit.html_basic.HtmlRenderer
+ </output-html-renderer-class>
<output-head-renderer-class>
com.sun.faces.renderkit.html_basic.HeadRenderer
</output-head-renderer-class>
+ <output-title-renderer-class>
+ com.sun.faces.renderkit.html_basic.TitleRenderer
+ </output-title-renderer-class>
<output-script-renderer-class>
com.sun.faces.renderkit.html_basic.ScriptRenderer
</output-script-renderer-class>
Index: jsf-ri/systest/web/WEB-INF/web.xml.template
===================================================================
--- jsf-ri/systest/web/WEB-INF/web.xml.template (revision 8552)
+++ jsf-ri/systest/web/WEB-INF/web.xml.template (working copy)
@@ -51,7 +51,18 @@
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
+
<context-param>
+ <param-name>com.sun.faces.autoCompleteOffOnViewState</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.FACELETS_SUPPRESS_XML_DECLARATION</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <context-param>
<param-name>com.sun.faces.enableThreading</param-name>
<param-value>true</param-value>
</context-param>
@@ -91,7 +102,7 @@
<context-param>
<param-name>facelets.VIEW_MAPPINGS</param-name>
- <param-value>/resources/composite/*;*.xhtml</param-value>
+ <param-value>/resources/composite/*;*.xhtml;*.view.xml</param-value>
</context-param>
<context-param>
Index: jsf-ri/systest/web/view.xml/index.view.xml
===================================================================
--- jsf-ri/systest/web/view.xml/index.view.xml (revision 0)
+++ jsf-ri/systest/web/view.xml/index.view.xml (revision 0)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-view xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesview_2_1.xsd"
+ version="2.1"
+ xmlns:h="http://java.sun.com/jsf/html">
+
+ <h:html>
+
+ <h:head><h:title>Raw XML View</h:title></h:head>
+
+ <h:body>
+
+ <h:form>
+
+ <h:panelGrid column="2">
+
+ <h:outputText value="hello"></h:outputText>
+
+ <h:commandButton value="reload"></h:commandButton>
+
+ </h:panelGrid>
+
+ </h:form>
+
+ </h:body>
+
+ </h:html>
+
+</faces-view>
+
+
SECTION: New Files
----------------------------
I have attached to the issue a prototype implementation that, when
applied to the Mojarra HEAD, will generate the preceding HTML.
--
| edburns(a)oracle.com | office: +1 407 458 0017
| homepage: | http://ridingthecrest.com/
| 04 work days until JSF 2.1 Milestone 2
14 years, 4 months
[jsr-314-open-mirror] [jsr-314-open] Proposal [868-DropCURRENT_COMPONENT CURRENT_COMPOSITE_COMPONENT]
by Ed Burns
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=868
Background:
The JSF specification contains the following:
/**
* <p class="changed_added_2_0">The key to which the
* <code>UIComponent</code> currently being processed will be
* associated with within the {@link FacesContext} attributes map.</p>
*
* @see javax.faces.context.FacesContext#getAttributes()
*
* @since 2.0
*/
public static final String CURRENT_COMPONENT =
"javax.faces.component.CURRENT_COMPONENT";
/**
* <p class="changed_added_2_0">The key to which the
* <em>composite</em> <code>UIComponent</code> currently being
* processed will be associated with within the {@link FacesContext}
* attributes map.</p>
*
* @see javax.faces.context.FacesContext#getAttributes()
*
* @since 2.0
*/
public static final String CURRENT_COMPOSITE_COMPONENT =
"javax.faces.component.CURRENT_COMPOSITE_COMPONENT";
The guarantee that the current and current composite components are
available through FacesContext.getAttributes() doesn't seem right for
several reasons:
1) It isn't useful. The static methods
UIComponent.getCurrentComponent() and
UIComponent.getCurrentCompositeComponent() are more convenient and typesafe.
2) It is dangerous. If the values of these attributes is set, the
current stack will be messed up
3) When we aren't using the particular space-inefficient implementation
the JSF RI currently uses, maintaining these attributes just in case a
developer tries to request them is a waste
Proposal
Due to our iron-clad commitment to backwards compatibility, we keep the
public static final String constants, but alter the behavior, providing
a context-param to restore the old behavior.
The constants will only be honored if the context param is set.
Does this sound ok?
--
| edburns(a)oracle.com | office: +1 407 458 0017
| homepage: | http://ridingthecrest.com/
| 06 work days until JSF 2.1 Milestone 2
14 years, 4 months
[jsr-314-open-mirror] [jsr-314-open] jsf.ajax.request: Bug or expected behavior?
by Werner Punz
Hello while doing another round of testing and optimisations I noticed a
slight difference in the implementations of the request of mojarra and
myfaces which opened an area where the spec probably is unclear:
Following case:
<h:panelGroup id="bla">
<h:inputText id="inputbla"
value="#{myBean2.searchTerm}" />
<h:commandLink value="Press me for more action"
action="#{myBean2.doSearch}">
<f:ajax execute="bla" render="content"/>
</h:commandLink>
</h:panelGroup>
now results in following post data:
Mojarra:
form2 form2
form2:inputbla
javax.faces.ViewState 6697453697014869722:-1090088301633916042
javax.faces.behavior.even... action
javax.faces.partial.ajax true
javax.faces.partial.event click
javax.faces.partial.execu... form2:j_idt8 form2:bla
javax.faces.partial.rende... form2:content
javax.faces.source form2:j_idt8
in myfaces
form2:inputbla
form2_SUBMIT 1
javax.faces.ViewState EmWJgKYkJoTEWDCzpUwZQR3Ek94rGnxK1V6NEZgO6yDgPANeOc1wplJjDYezu2cx9aQ7ZSKNPyGY
L8P9y5DwH2codFvGPjklD04wuxG4XXTPutNww3pdzIsMkw0=
javax.faces.behavior.even... action
javax.faces.partial.ajax true
javax.faces.partial.event click
javax.faces.partial.execu... form2:bla
javax.faces.partial.rende... form2:content
javax.faces.source form2:j_id1980473354_760ba132
While most of the differeing data is mostly implementation specific and
therefor it is not that interesting following is:
javax.faces.partial.execu... form2:j_idt8 form2:bla
compared to
javax.faces.partial.execu... form2:bla
Now the difference is that Mojarra adds the executing element as it seems
while MyFaces does not.
The second interesting fact is following definition from the spec:
- Determine additional arguments (if any) from the options argument. If
options.execute exists:
- If the keyword @none is present, do not create and send the post
data argument javax.faces.partial.execute.
- If the keyword @all is present, create the post data argument with
the name javax.faces.partial.execute and the value @all.
- *Otherwise, there are specific identifiers that need to be sent.
Create the post data argument with the name
javax.faces.partial.execute and the value as a space delimited
stringof client identifiers.
*
- If options.execute does not exist, create the post data argument with
the name javax.faces.partial.execute and the value as the identifier of
the element that caused this request.
Which means exactly, that I am not sure which behavior is correct and which
not. My personal guess is that both implementations are
correct because the spec clearly leaves it open if the issuing element also
can be added to the exec list unless no exec list is given at all.
But that is merely an assumption on my side here.
Any ideas on this.
Werner
14 years, 4 months
[jsr-314-open-mirror] [jsr-314-open] Attribute and State Management in Custom ClientBehaviors
by Cagatay Civici
Hi,
When working on a custom client behavior implementation, I've noticed that there is no state helper that we have for UIComponent.
Also checked implementation of AjaxBehavior in mojarra&myfaces and there seems to be a lot of private implementation of state management, evals, handling of valueexpressions.
So my question is do I miss something because it doesn't seem to be trivial process to create a clientbehavior properly with attributes and handle state management.
Thanks,
Cagatay
14 years, 4 months
[jsr-314-open-mirror] [jsr-314-open] CDI constructor integration
by Stephen Kenna
We have internally been discussing @Inject into @ManagedBeans (should be
the same for JSF Managed beans defined in the faces-config.xml).
Originally we were trying to figure out if JSF managed beans should
support constructor injection if they were inside a BDA (in other words,
if JSF should defer to CDI for creation).
We did some testing on Glassfish, and not only did constructor injection
not occur, but field injection did not occur either. (Field injection is
working on JBoss)
My reading of JSR-299 & the EE6 spec differs from this.
>From JSR299 Section 1.2.1:
In the Java EE 6 environment, all component classes supporting injection,
as defined by the Java EE 6 platform specifica-
tion, may inject beans via the dependency injection service.
Or JSR299 Section 3.8:
An injected field is a non-static, non-final field of a bean class, or of
any Java EE component class supporting injection.
>From the EE6 spec, Section EE.5.20 states:
Per the CDI specification, dependency injection is supported on
managed
beans. There are currently three ways for a class to become a managed
bean:
1. Being an EJB session bean component.
2. Being annotated with the @ManagedBean annotation.
3. Satisfying the conditions in Section 3.1 of the CDI specification.
Classes that satisfy at least one of these conditions will be eligible
for full
dependency injection support, as described in CDI.
and
Clearly, in the absence of any additional annotations, most component
classes
listed in Table EE.5-1 will not be managed beans. So as to make injection
support
more uniform across all component types, Java EE containers are required
to
support field or method injection (but not constructor injection) using
@javax.inject.Inject on all component classes listed in Table EE.5-1 when
the
containing archive is a bean archive.
Our interpretation of the above is that we definitely need to support
field injection of @Inject into @ManagedBean beans, and we also need to
support constructor injection
What are other's interpretation?
Regards,
Stephen
14 years, 4 months