Git Product home page Git Product logo

Comments (14)

glassfishrobot avatar glassfishrobot commented on July 16, 2024

Reported by @edburns

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@edburns said:
take ownership

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@edburns said:
start work. Posted to EG

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@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;
javax.faces.Message @@ -626,6 +627,7 @@ &uimessages-props; &core-props; &messages-messages-props; + &i18n-props; javax.faces.Messages @@ -637,11 +639,13 @@
  • 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.

    Output Format javax.faces.HtmlOutputFormat @@ -650,6 +654,7 @@ &uioutput-props; &core-props; &output-format-props; + &i18n-props;
javax.faces.Output @@ -710,9 +715,9 @@
  • 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.

    Output Text javax.faces.HtmlOutputText @@ -721,6 +726,7 @@ &uioutput-props; &core-props; &output-text-props; + &i18n-props;
javax.faces.Output @@ -1555,7 +1561,8 @@ attribute as the value of the "style" attribute. If we have no "style" attribute, but do have a severity style, use the severity style as the value of the "style" attribute. The same
  • precedence rules apply for the style class.

    • precedence rules apply for the style class. Obtain the value of
    • the dir and lang 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 the UIMessage has "showSummary" and
        "showDetail" properties with the value "true", if we haven't
        @@ -1589,6 +1597,7 @@

    &core-attrs;
    &message-message-attrs;

    • &i18n-attrs;

    @@ -1614,24 +1623,29 @@

    &core-attrs;
    &messages-messages-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 there
      • Render parameterized text. Obtain the

      • style, styleClass, dir, and
      • lang attributees from this component. If any 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.
      • Output the dir and lang 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 an Object array, call
    • MessageFormat.format(), passing the value
    • 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 the
      • value 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.

      javax.faces.Output javax.faces.Format @@ -1639,6 +1653,7 @@

    &core-attrs;
    &output-format-attrs;

    • &i18n-attrs;

    @@ -1695,16 +1710,16 @@

    • 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.
      javax.faces.Output javax.faces.Text @@ -1712,6 +1727,7 @@

    &core-attrs;
    &output-text-attrs;

    • &i18n-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 ||

    • 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);
        }

    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;

    • 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);
        }

    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"));
    +

    • // 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""))

    { + hasMessagesContent = true; + }

    • if (-1 != span.asXml().indexOf("dir="RTL" lang="de""))

    { + hasMessageContent = true; + }

    • }
    • assertTrue(hasMessagesContent && hasMessageContent);

    }
    }
    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:commandButton value="submit" /> <h:messages />
      • <h:commandButton value="submit" />

      • <h:messages dir="LTR" lang="en"/>

      • <h:message for="textB" dir="RTL" lang="de"/>

    </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 @@

    Logon Form -Username: +Username: @@ -843,7 +843,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:outputText id="text1" value="Username:"/>
      • <h:outputText id="text1" value="Username:" dir="LTR"
        lang="en"/>

    <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.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

jayashri said:
Looks good to me. r=jayashri

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@edburns said:
r=visvan

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@edburns said:
fixed checked in but leaving open until plan of record review date. Barring any
disagreement, this can be closed.

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@edburns said:
fixed in EDR

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@edburns said:
fixed in EDR

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@edburns said:
Prepare to delete "spec" subcomponent.

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@edburns said:
Move all to 1.2

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

@manfredriem said:
Closing resolved issue out

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-16

from javaserverfaces-spec.

glassfishrobot avatar glassfishrobot commented on July 16, 2024

Marked as fixed on Thursday, March 4th 2010, 6:09:23 am

from javaserverfaces-spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.