Comments (14)
Reported by @edburns
from javaserverfaces-spec.
@edburns said:
take ownership
from javaserverfaces-spec.
@edburns said:
start work. Posted to EG
from javaserverfaces-spec.
@edburns said:
Issue: jsf-spec16
Add "dir" and "lang" attributes to the right places for h:outputText,
h:outputFormat, h:message, h:messages.
SECTION: API CHANGES
M jsf-api/doc/standard-html-renderkit.xml
-
changes
-
outputText
add content to description of concrete html component-type
javax.faces.HtmlOutputText
add i18n-props to includes section of concrete html component-type
javax.faces.HtmlOutputText
add content to description of renderer-type javax.faces.Text for
component-family javax.faces.Output
add i18n-attrs to includes section of renderer-type javax.faces.Text for
component-family javax.faces.Output
- outputFormat
add content to description of concrete html component-type
javax.faces.HtmlOutputFormat
add i18n-props to includes section of concrete html component-type
javax.faces.HtmlOutputFormat
add content to description of renderer-type javax.faces.Format for
component-family javax.faces.Output
add i18n-attrs to includes section of renderer-type javax.faces.Format for
component-family javax.faces.Output
- message
add i18n-props to includes section of concrete html component-type
javax.faces.HtmlMessage
add content to description of renderer-type javax.faces.Message for
component-family javax.faces.Message
add i18n-attrs to includes section of renderer-type javax.faces.Message for
component-family javax.faces.Message
- messages
add i18n-props to includes section of concrete html component-type
javax.faces.HtmlMessage
add i18n-attrs to includes section of renderer-type
javax.faces.Messages for component-family javax.faces.Messages
SECTION: RI Changes
M jsf-ri/src/com/sun/faces/renderkit/html_basic/MessageRenderer.java
M jsf-ri/src/com/sun/faces/renderkit/html_basic/MessagesRenderer.java
-
Add the presence of passthru attributes to the set of things that
cause a span to be rendered. -
remove manual style rendering
-
add passThru rendering, which includes style
M jsf-ri/systest/src/com/sun/faces/jsptest/ValueChangeListenerTestCase.java
M jsf-ri/systest/web/valueChangeListener.jsp
M jsf-ri/web/test/RenderResponse_correct
M jsf-ri/web/test/TestRenderResponsePhase.jsp
- exercise h:outputText dir="LTR" lang="en"
SECTION: API Diffs
Index: jsf-api/doc/standard-html-renderkit.xml
RCS file: /cvs/javaserverfaces-sources/jsf-api/doc/standard-html-renderkit.xml,v
retrieving revision 1.65
diff -u -r1.65 standard-html-renderkit.xml
— jsf-api/doc/standard-html-renderkit.xml 25 Oct 2004 17:29:50 -0000 1.65
+++ jsf-api/doc/standard-html-renderkit.xml 25 Oct 2004 20:10:58 -0000
@@ -609,6 +609,7 @@
&uimessage-props;
&core-props;
&message-message-props;
- &i18n-props;
-
Represents a component that looks up a localized message
- in a resource bundle, optionally uses it as a
MessageFormat
- pattern string and substitutes in parameter
- values from nested UIParameter components, and renders
- the result.
-
Represents a component that looks up a localized message in a
- resource bundle, optionally uses it as a
MessageFormat
pattern string and substitutes in- parameter values from nested UIParameter components, and
- renders the result. If the "dir" or "lang" attributes are
- present, render a
span
element and pass them through - as attributes on the span.
-
-
Renders the component value as text, optionally
- wrapping in a
span
element if CSS styles - or style classes are specified.
-
Renders the component value as text, optionally wrapping in a
span
element if I18N attributes, CSS styles or style- classes are specified.
-
- precedence rules apply for the style class.
- precedence rules apply for the style class. Obtain the value of
- the
dir
andlang
attributes.
@@ -1563,14 +1570,15 @@
-
For the message renderer, we only render
- one row, for the first message. For the messages renderer, we
- render as many rows as we have messages. If either of the "style"
- or "styleClass" attributes has a non-null value (as determined
-
For the message renderer, we only render one row, for the first
- message. For the messages renderer, we render as many rows as we
- have messages. If any of the "dir", "lang", "style" or
- "styleClass" attributes has a non-null value (as determined
above), render a "span" element, outputting the value of the
"style" attribute as the the value of the "style" attribute, and
outputting the value of the "styleClass" attribute as the value of
-
- the "class" attribute on the "span" element. If the
- the "class" attribute on the "span" element. Output the "dir" and
- "lang" attributes as well, if they are present. If the
UIMessage
has a "tooltip" attribute with the value of
"true", and theUIMessage
has "showSummary" and
"showDetail" properties with the value "true", if we haven't
@@ -1589,6 +1597,7 @@
- &i18n-attrs;
- &i18n-attrs;
Render parameterized text. Obtain the
style
- and
styleClass
attributees from this component. If either - are present, render a "span" element. Output the
styleClass
- attribute (if present) as the value of the
class
attribute. - Output the
style
attribute as the value of the style
attribute. Accrue a list of the values of all- child
UIParameter
components of this component. If thereRender parameterized text. Obtain the
style
,styleClass
,dir
, andlang
attributees from this component. If any are- present, render a "span" element. Output the
styleClass
attribute (if present) as the value of theclass
attribute. Output thestyle
- attribute as the value of the
style
attribute. - Output the
dir
andlang
attributes as - pass through attributes. Accrue a list of the values of all child
UIParameter
components of this component. If there
are one or more accumulated parameter values, convert the list of
parameter values to anObject
array, call
MessageFormat.format()
, passing thevalue
- of this component as the first argument, and the array of parameter
- values as the second argument, and render the result. Otherwise,
- render the
value
of this component unmodified.MessageFormat.format()
, passing thevalue
of this component as the first argument, and- the array of parameter values as the second argument, and render
- the result. Otherwise, render the
value
of this - component unmodified.
- &i18n-attrs;
- If the "styleClass" or "style" attributes are
- present, render a "span" element. If the "styleClass" attribute
- is present, render its value as the value of the "class"
- attribute. If the "style" attribute is present, pass it thru. If
- the "escape" attribute is not present, or it is present and its
- value is "true" all angle brackets should be converted to the
- ampersand xx semicolon syntax when rendering the value of the
- "value" attribute as the value of the component. If the "escape"
- attribute is present and is "false" the value of the component
- should be rendered as text without escaping.
- If the "styleClass", "style", "dir" or "lang"
- attributes are present, render a "span" element. If the
- "styleClass" attribute is present, render its value as the value
- of the "class" attribute. If the "style" attribute is present,
- pass it thru. If the "escape" attribute is not present, or it is
- present and its value is "true" all angle brackets should be
- converted to the ampersand xx semicolon syntax when rendering the
- value of the "value" attribute as the value of the component. If
- the "escape" attribute is present and is "false" the value of the
- component should be rendered as text without escaping.
- &i18n-attrs;
-
shouldWriteIdAttribute(component)) {
- shouldWriteIdAttribute(component) ||
- Util.hasPassThruAttributes(component)) {
writer.startElement("span", component);
// don't output the id twice
if (!wroteTable) {
@@ -226,9 +227,8 @@
if (styleClass != null) { writer.writeAttribute("class", styleClass, "styleClass"); }
-
if (style != null) { - writer.writeAttribute("style", style, "style"); - }
- // style is rendered as a passthru attribute
- Util.renderPassThruAttributes(writer, component);
}
-
if (styleClass != null || style != null) {
- if (styleClass != null || style != null ||
- Util.hasPassThruAttributes(component)) {
writer.startElement("span", component);
if (!wroteTable) {
writeIdAttributeIfNecessary(context, writer, component);
@@ -196,9 +197,8 @@
if (null != styleClass) { writer.writeAttribute("class", styleClass, "styleClass"); }
-
if (style != null) { - writer.writeAttribute("style", style, "style"); - }
- // style is rendered as a passthru attribute
- Util.renderPassThruAttributes(writer, component);
}
- // make sure dir and lang are passed through as expected for
- // message and messages
- list = getAllElementsOfGivenClass(page, null,
- HtmlSpan.class);
- boolean
- hasMessageContent = false, // do we have the h:message
- // content we're looking for
- hasMessagesContent = false; // do we have the h:messages
- // content we're looking for.
- HtmlSpan span = null;
- for (int i = 0; i < list.size(); i++) {
- span = (HtmlSpan) list.get
;
- if (-1 != span.asXml().indexOf("dir="LTR" lang="en""))
- if (-1 != span.asXml().indexOf("dir="RTL" lang="de""))
- }
- assertTrue(hasMessagesContent && hasMessageContent);
- <h:commandButton value="submit" /> <h:messages />
- <h:commandButton value="submit" />
- <h:messages dir="LTR" lang="en"/>
-
- <h:message for="textB" dir="RTL" lang="de"/>
- <h:outputText id="text1" value="Username:"/>
- <h:outputText id="text1" value="Username:" dir="LTR"
lang="en"/>
- <h:outputText id="text1" value="Username:" dir="LTR"
&core-attrs;
&message-message-attrs;
@@ -1614,24 +1623,29 @@
&core-attrs;
&messages-messages-attrs;
&core-attrs;
&output-format-attrs;
@@ -1695,16 +1710,16 @@
&core-attrs;
&output-text-attrs;
SECTION: RI Diffs
Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/MessageRenderer.java
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/MessageRenderer.java,v
retrieving revision 1.48
diff -u -r1.48 MessageRenderer.java
— jsf-ri/src/com/sun/faces/renderkit/html_basic/MessageRenderer.java 12 Oct
2004 14:39:52 -0000 1.48
+++ jsf-ri/src/com/sun/faces/renderkit/html_basic/MessageRenderer.java 25 Oct
2004 20:11:00 -0000
@@ -215,7 +215,8 @@
}
if (styleClass != null || style != null ||
Object tooltip = component.getAttributes().get("tooltip");
Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/MessagesRenderer.java
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/MessagesRenderer.java,v
retrieving revision 1.17
diff -u -r1.17 MessagesRenderer.java
— jsf-ri/src/com/sun/faces/renderkit/html_basic/MessagesRenderer.java 12 Oct
2004 14:39:52 -0000 1.17
+++ jsf-ri/src/com/sun/faces/renderkit/html_basic/MessagesRenderer.java 25 Oct
2004 20:11:00 -0000
@@ -187,7 +187,8 @@
boolean wroteSpan = false;
Object tooltip = component.getAttributes().get("tooltip");
Index: jsf-ri/systest/src/com/sun/faces/jsptest/ValueChangeListenerTestCase.java
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/systest/src/com/sun/faces/jsptest/ValueChangeListenerTestCase.java,v
retrieving revision 1.1
diff -u -r1.1 ValueChangeListenerTestCase.java
— jsf-ri/systest/src/com/sun/faces/jsptest/ValueChangeListenerTestCase.java 2
Jun 2004 13:57:45 -0000 1.1
+++ jsf-ri/systest/src/com/sun/faces/jsptest/ValueChangeListenerTestCase.java 25
Oct 2004 20:11:01 -0000
@@ -15,6 +15,7 @@
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlSpan;
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
import com.sun.faces.htmlunit.AbstractTestCase;
@@ -113,6 +114,29 @@
assertTrue(-1 !=
page.asText().indexOf("Validation Error"));
+
{ + hasMessagesContent = true; + }
{ + hasMessageContent = true; + }
}
}
Index: jsf-ri/systest/web/valueChangeListener.jsp
RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/web/valueChangeListener.jsp,v
retrieving revision 1.1
diff -u -r1.1 valueChangeListener.jsp
— jsf-ri/systest/web/valueChangeListener.jsp 2 Jun 2004 13:57:47 -0000 1.1
+++ jsf-ri/systest/web/valueChangeListener.jsp 25 Oct 2004 20:11:01 -0000
@@ -37,7 +37,14 @@
<h:outputText value="#
{valueChangeListenerBean.textBResult}
" />
</h:panelGrid>
Index: jsf-ri/web/test/RenderResponse_correct
RCS file: /cvs/javaserverfaces-sources/jsf-ri/web/test/RenderResponse_correct,v
retrieving revision 1.110
diff -u -r1.110 RenderResponse_correct
— jsf-ri/web/test/RenderResponse_correct 1 Sep 2004 21:15:21 -0000 1.110
+++ jsf-ri/web/test/RenderResponse_correct 25 Oct 2004 20:11:02 -0000
@@ -50,7 +50,7 @@
-Param 0: my param
+Param 0: my param
Index: jsf-ri/web/test/TestRenderResponsePhase.jsp
RCS file: /cvs/javaserverfaces-sources/jsf-ri/web/test/TestRenderResponsePhase.jsp,v
retrieving revision 1.82
diff -u -r1.82 TestRenderResponsePhase.jsp
— jsf-ri/web/test/TestRenderResponsePhase.jsp 28 Jul 2004 14:52:14 -0000 1.82
+++ jsf-ri/web/test/TestRenderResponsePhase.jsp 25 Oct 2004 20:11:03 -0000
@@ -33,7 +33,7 @@
</h:panelGroup>
<h:inputText id="username1" styleClass="inputClass"
value="JavaServerFaces" />
@@ -772,7 +772,7 @@
<h:outputText title="output text with title" value="should be spanned" />
-<h:outputFormat id="userMsg" value="Param 0:
{0}" >
+<h:outputFormat id="userMsg" value="Param 0: {0}
" dir="LTR" lang="en">
<f:param value="my param"/>
</h:outputFormat>
from javaserverfaces-spec.
jayashri said:
Looks good to me. r=jayashri
from javaserverfaces-spec.
@edburns said:
r=visvan
from javaserverfaces-spec.
@edburns said:
fixed checked in but leaving open until plan of record review date. Barring any
disagreement, this can be closed.
from javaserverfaces-spec.
@edburns said:
fixed in EDR
from javaserverfaces-spec.
@edburns said:
fixed in EDR
from javaserverfaces-spec.
@edburns said:
Prepare to delete "spec" subcomponent.
from javaserverfaces-spec.
@edburns said:
Move all to 1.2
from javaserverfaces-spec.
@manfredriem said:
Closing resolved issue out
from javaserverfaces-spec.
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-16
from javaserverfaces-spec.
Marked as fixed on Thursday, March 4th 2010, 6:09:23 am
from javaserverfaces-spec.
Related Issues (20)
- CDI shortcut for search expressions HOT 2
- ActionListener and PhaseListener declared in Facelet: Injectable or not? HOT 1
- ProtectedViewException for a protectedview access while checking the OriginHeader HOT 1
- JSF 2.3 Table 5-3 JSF artifacts eligible for injection - Constructor Injection - Not supported HOT 1
- 11.4.6 should specify "search-expression-context-factory" rather than "search-expression-context-kit-factory" HOT 1
- wrong link to Mojarra on spec front page HOT 1
- JSF 2.3 spec section 2.5.2.1 typo HOT 1
- ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY clarification HOT 1
- Add PartialResponseWriterWrapper HOT 3
- StringIndexOutOfBoundsException when using jsf 2.3.3 on tomcat 9.0.2 HOT 2
- Determine url of h:outputLink at click time HOT 4
- Implement cc:insertPassthroughAttributes HOT 1
- importConstants should be allowed everywhere, not only in f:metadata HOT 3
- JSF 2.3 with Java 10&11 not recognizing generic types with f:viewParam HOT 2
- Make javascript functions created by h:commandScript return a Promise HOT 1
- javax.faces.annotation.ManagedProperty websocket event incompatibility HOT 2
- Protected View Exception
- Change locale is not working HOT 1
- Replace "fat" XML responses with modern JSON/RESTful responses HOT 2
- typo in webpage HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javaserverfaces-spec.