Giter Site home page Giter Site logo

Comments (24)

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
Reported by @edburns

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Mark Roth had this suggestion.

I implemented it straight up, but the content came out the same way. I'll
attach a patch with what I had to do to get it mostly working.

MR> Hans says this is because "tag handlers can't tell whether a piece of
MR> template text appears before or after a component action." I'm
MR> interested in why this is the case in JSF.

MR> I have to refresh my memory and reading of the spec (classic tags are so
MR> complex), but why is it that we cannot add an implicit <f:verbatim>
MR> around non-component-1, 3 and 5?

MR> Perhaps an algorithm such as the following:

MR> 1. outerTag returns EVAL_BODY_BUFFERED from doStartTag()
MR> 2. setBodyContent() is called - outerTag stores reference to
MR> BodyContent instance
MR> 3. Body of outerTag is evaluated.
MR> a. non-component-1 is added to body content
MR> b. component2 is evaluated, and finds parent tag outerTag.
MR> component2 calls a outerTag.addChild() to add itself as a child
MR> c. outerTag.addChild() gets the current body content first. If it
MR> is not empty, an implicit <f:verbatim> that wraps the body
MR> content is added as a child before component2. Body content is
MR> cleared before continuing evaluation.
MR> d. non-component-3 is added to body content ... go to (a) ...
MR> 4. doEndTag() is called. Any remaining characters in bodyContent are
MR> wrapped in an implicit <f:verbatim> and added as a child of outerTag.
MR> EVAL_PAGE is returned.

MR> I was personally interested in why this approach does not work. Eduardo
MR> may have other approaches in mind for us to investigate as well.

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Created an attachment (id=3)
unpack in jsf-api

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
First, I found a bug in our HtmlBasicTaglibGenerator. You need to make
it so PanelGridTag properly extends UIComponentBodyTag. This is tracked
in <https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=7>.
Please apply the patch in that bug before trying to run the fix for this
one. I'll move agressivle to get a production quality fix for issue 7
in the tree ASAP.

I had to make the following questionable changes in UIComponentTag:

  • make this ivar protected

  • private UIComponent component = null;

    • protected UIComponent component = null;
  • make this method protected

  • private void addChild(UIComponent child) {

    • protected void addChild(UIComponent child) { As for changes to UIComponentBodyTag, they are best expressed with a diff. Please look for comments containing JSP_PROBLEM to see why this solution is sub-optimal. However, I'm very thankful to Mark for suggesting it because it may allow us to solve the content interweaving problem for the upcoming jsf 1.1_01. Basically, I override addChild() and doEndTag() as Mark suggests. Index: UIComponentBodyTag.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/webapp/UIComponentBodyTag.java,v retrieving revision 1.4 diff -u -r1.4 UIComponentBodyTag.java --- UIComponentBodyTag.java 6 May 2004 16:12:24 -0000 1.4 +++ UIComponentBodyTag.java 14 Jul 2004 02:57:51 -0000 @@ -16,6 +16,12 @@ import javax.servlet.jsp.tagext.BodyTag; import javax.servlet.jsp.tagext.Tag; +import javax.faces.component.UIComponent; +import javax.faces.component.UIOutput; +import javax.faces.context.FacesContext; + +import java.util.List; + /** *

      UIComponentBodyTag is a base class for all JSP custom @@ -121,6 +127,16 @@ }

  • /**
    • Override this to create a UIOutput child out of

    • any trailing template text.

  • */
  • public int doEndTag() throws JspException

{ + turnBodyContentIntoAddedComponentIfNecessary(true); + return super.doEndTag(); + }

// ------------------------------------------------------ Protected Methods

@@ -143,5 +159,92 @@

}

  • /**
    • Add the component identifier of the specified

{@link UIComponent}

    • to the list of component identifiers created or located by nested

{@link UIComponentTag}

s processing this request.

    • @param child New child whose identifier should be added
  • */
  • protected void addChild(UIComponent child)

{ + turnBodyContentIntoAddedComponentIfNecessary(false); + super.addChild(child); + }

  • private void turnBodyContentIntoAddedComponentIfNecessary(boolean
    isCalledFromEndTag) {
  • String bodyContentStr = null;
  • // if we have some template text inside of ourselves
  • if (null != bodyContent &&
  • null != (bodyContentStr = bodyContent.getString())) {
  • FacesContext context = getFacesContext();
  • String newId = context.getViewRoot().createUniqueId();
  • // if there is no verbatim component for this particular
  • // piece of template text
  • // JSP_PROBLEM: this is necessary to correctly handle the
  • // case where we're re-displaying the same page several
  • // times. I had to make the component ivar protected
  • // instead of private.
  • if (null == component || null == component.findComponent(newId)) {
  • // if this component's rendersChildren property is
  • // false, don't mess with it, template text will display
  • // properly anyway.
  • // JSP_PROBLEM: This is necessary to prevent
  • // un-necessary nonsense in the case of tags that do
  • // legitimately extend from UIComponentBodyTag, but yet
  • // still don't have rendersChildren == true. Examples
  • // are <f:view> and <h:form>
  • if (!component.getRendersChildren())

{ + return; + }

  • UIOutput verbatim = new UIOutput();
  • verbatim.setRendererType("javax.faces.Text");
  • verbatim.setValue(bodyContentStr);
  • verbatim.setId(newId);
  • System.out.println("debug: edburns: tree before adding verbatim component:");
  • com.sun.faces.util.DebugUtil.printTree(component, System.out);
  • List children = component.getChildren();
  • // JSP_PROBLEM: we need to add it at the end of the list
  • // if we're called from the doEndTag() method. This is
  • // a hack.
  • if (isCalledFromEndTag)

{ + children.add(verbatim); + }

  • else

{ + // JSP_PROBLEM: by the time this gets called, the + // component before which our verbatim component must + // reside has already been added to the tree. + // Therefore, we have to insert ourselves at index (end + // - 1). This feels like a hack. + int size = children.size(); + children.add(0 == size ? 0 : size - 1, verbatim); + }

  • // JSP_PROBLEM: to get our superclass getIndex() method
  • // to come out right, we need to add this verbatim child
  • // to our list of createdComponents as well. This also
  • // feels like a hack.
  • super.addChild(verbatim);
  • System.out.println("debug: edburns: tree after adding verbatim component:");
  • com.sun.faces.util.DebugUtil.printTree(component, System.out);
  • }
  • // in any case, clear the body since we at this point we
  • // will have a properly placed UIOutput that represents the
  • // template text.
  • bodyContent.clearBody();
  • }
  • }

}

This leaves me with one problem. For some reason, the "fifth text"
appears both before the table, and in it. I don't want it to appear
before the table. Any ideas on why this is so?

Here's what gets rendered after applying the fix (I hope the angle
brackets show up right here in issuezilla).

fifth text

first text
second text
third text
fourth text
fifth text

I just need to remove the leading "fifth text" and I'll have a
functional prototype.

Ed

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Created an attachment (id=4)
War showing the fix in action.

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Created an attachment (id=5)
unpack in ../jsf-api. Snapshot. Supercedes previous 6.tar.gz

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Added Mark Roth to CC.

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Created an attachment (id=6)
current snapshot.

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Created an attachment (id=8)
sample showing that components programmatically added to the form do not get rendered.

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Created an attachment (id=9)
Current snapshot, I think this is production ready.

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
Here's the latest change-bundle for your review:

This change-bundle implements Mark Roth's idea for solving the
content-interweaving problem using only JSP 1.2 APIs, and without
requiring any change to the JSF spec. It uses Adam Winer's idea for how
to inject the logic into the existing system.

Here's Mark's idea:

MR> 1. outerTag returns EVAL_BODY_BUFFERED from doStartTag()
MR> 2. setBodyContent() is called - outerTag stores reference to
MR> BodyContent instance
MR> 3. Body of outerTag is evaluated.
MR> a. non-component-1 is added to body content
MR> b. component2 is evaluated, and finds parent tag outerTag.
MR> component2 calls a outerTag.addChild() to add itself as a child
MR> c. outerTag.addChild() gets the current body content first. If it
MR> is not empty, an implicit <f:verbatim> that wraps the body
MR> content is added as a child before component2. Body content is
MR> cleared before continuing evaluation.
MR> d. non-component-3 is added to body content ... go to (a) ...
MR> 4. doEndTag() is called. Any remaining characters in bodyContent are
MR> wrapped in an implicit <f:verbatim> and added as a child of outerTag.
MR> EVAL_PAGE is returned.

The way it works out in practice is slightly different.

We modify UIComponentTag to:

  • when doStartTag() is called, we call this method:
  • // We need to do this here because this is as close as we can
  • // get to the place where we're adding the component to the tree
  • // that still executes on the postback.
  • addPrecedingTemplateTextToMyParentComponent(parentComponent,
  • parentTag);

If there really is template text to be added, and we're inside of a
tag that cares about template text (that is, a UIComponentBodyTag),
we call getUIOutputForBodyContentAndClearBodyContent() on that
UIComponentBodyTag and add the UIOutput to the tree before adding
our real component to the tree.

  • when doEndTag() is called, we do the same, to catch the case where
    we have template text that is between the end tag and the previous
    UIComponentTag, such as in cases like this (call this case a):

<h:panelGrid id="interweave_grid1" columns="2" border="2">
<h:form id="interweave_form1">
1
<h:outputText value="2" />
3
</h:form>
<h:form id="interweave_form2">
4
<h:outputText value="5" />
6
</h:form>
</h:panelGrid>

We modify UIComponentBodyTag to:

  • add the getUIOutputForBodyContentAndClearBodyContent() method

  • in doAfterBody(), do the same thing we do in doEndTag() in
    UIComponentTag. This is necessary to catch cases like this (case b):

<h:panelGrid columns="2" border="2">
7
<h:outputText value="8" />
9
<h:outputText value="10" />
11
</h:panelGrid>

There is a fair amount of complexity to support case a. I don't see a
way around it.

SECTION: API Changes

M jsf-api/src/javax/faces/webapp/UIComponentBodyTag.java
M jsf-api/src/javax/faces/webapp/UIComponentTag.java

SECTION: RI Changes

M jsf-ri/systest/build-tests.xml

  • add comment about how to update a golden file

M jsf-ri/systest/web/golden/taglib/commandLink_multiform_test.txt
M jsf-ri/systest/web/golden/taglib/commandLink_test.txt
M jsf-ri/web/test/RenderResponse_correct
M jsf-ri/web/test/TestRenderResponsePhase.jsp

  • test case changes.

SECTION: Tools changes

M jsf-tools/src/com/sun/faces/generate/HtmlTaglibGenerator.java

SECTION: API Diffs

Index: jsf-api/src/javax/faces/webapp/UIComponentBodyTag.java

RCS file:
/cvs/javaserverfaces-sources/jsf-api/src/javax/faces/webapp/UIComponentBodyTag.java,v
retrieving revision 1.4
diff -u -r1.4 UIComponentBodyTag.java
— jsf-api/src/javax/faces/webapp/UIComponentBodyTag.java 6 May 2004 16:12:24
-0000 1.4
+++ jsf-api/src/javax/faces/webapp/UIComponentBodyTag.java 22 Jul 2004 21:44:00
-0000
@@ -16,6 +16,9 @@
import javax.servlet.jsp.tagext.BodyTag;
import javax.servlet.jsp.tagext.Tag;

+import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
+import javax.faces.context.FacesContext;

/**

  • UIComponentBodyTag is a base class for all JSP custom @@ -40,9 +43,19 @@

/**

    • Handle the ending of the nested body content for this tag. The

    • default implementation simply calls getDoAfterBodyValue()
    • to retrieve the flag value to be returned.

      • Handle the ending of the nested body content for this tag.

      • The default implementation will take any template text that
      • exists between the previous {@link UIComponentTag} in the page
      • and the end of this tag, and turn it into a {@link + * javax.faces.component.UIOutput} instance, which is added to the
      • end of the child list for the component for this tag. Then, we
      • call getDoAfterBodyValue() to retrieve the flag
      • value to be returned.

      • Note that our superclass {@link doEndTag} method does the same

      • thing, but we must do it here to handle the case where there is
      • template text between the previous {@link UIComponentTag}

    and our

      • end tag.

  • It should be noted that if this method returns

  • IterationTag.EVAL_BODY_AGAIN, any nested
    @@ -51,6 +64,14 @@

  • @exception JspException if an error is encountered
    */
    public int doAfterBody() throws JspException {

    • UIComponentTag parentTag = getParentUIComponentTag(pageContext);
    • UIComponent parentComponent = null;
    • if (parentTag != null) { + parentComponent = parentTag.getComponentInstance(); + addPrecedingTemplateTextToMyParentComponent(parentComponent, + parentTag); + parentTag.verbatimCount = 0; + }

    return (getDoAfterBodyValue());

    @@ -121,6 +142,58 @@

    }

    • // --------------------------------------------- Package Private Methods
    • /**
      • Take our current body content and set it as the value of a

      • transient {@link javax.faces.component.UIOutput}
      • component, with "escape" set to true. If the body
      • content consists of nothing but whitespace, no component is
      • created. In all cases, the body content is cleared.

    • */
    • UIOutput getUIOutputForBodyContentAndClearBodyContent(UIComponent
      parentComponent) {
    • FacesContext context = getFacesContext();
    • String bodyContentStr = null;
    • UIOutput verbatim = null;
    • // if we have some template text inside of ourselves
    • if (null != bodyContent &&
    • null != (bodyContentStr = bodyContent.getString())) {
    • // don't wrap whitespace only strings.
    • int len = bodyContentStr.length();
    • boolean isWhitespaceOnly = true;
    • for (int i = 0; i < len; i++) {
    • if (!Character.isWhitespace(bodyContentStr.charAt)) { + isWhitespaceOnly = false; + break; + }
    • }
    • if (!isWhitespaceOnly) {
    • String newId = context.getViewRoot().createUniqueId();
    • // if there is currently no verbatim component for this
    • // particular piece of template text
    • // JSP_ISSUE: this check is necessary to correctly handle
    • // the case where we're re-displaying the same page several
    • // times.
    • if (null == parentComponent.findComponent(newId)) { + verbatim = new UIOutput(); + verbatim.setRendererType("javax.faces.Text"); + verbatim.getAttributes().put("escape", Boolean.FALSE); + verbatim.setTransient(true); + verbatim.setValue(bodyContentStr); + verbatim.setId(newId); + }
    • }
    • bodyContent.clearBody();
    • }
    • return verbatim;
    • }

    // ------------------------------------------------------ Protected Methods

    Index: jsf-api/src/javax/faces/webapp/UIComponentTag.java

    RCS file:
    /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/webapp/UIComponentTag.java,v
    retrieving revision 1.48
    diff -u -r1.48 UIComponentTag.java
    — jsf-api/src/javax/faces/webapp/UIComponentTag.java 6 May 2004 16:12:24
    -0000 1.48
    +++ jsf-api/src/javax/faces/webapp/UIComponentTag.java 22 Jul 2004 21:44:07 -0000
    @@ -31,6 +31,7 @@
    import java.util.HashMap;
    import java.util.Map;

    +import javax.faces.component.UIOutput;

    /**

    • {@link UIComponentTag} is the base class for all JSP custom

    @@ -125,6 +126,15 @@
    */
    private List createdComponents = null;

    • /**
      • The number of fabricated verbatim components that are children

      • of this tag. This is necessary to allow our {@link #getIndex}
      • method to come out correctly.

    • */
    • int verbatimCount = 0;

    /**

    • The List of facet names created or located by nested

    @@ -489,6 +499,19 @@

    • with this tag (via the id attribute), by following these
    • steps.

        • PENDING(edburns): not sure if we need to document this. Do
        • we? Find the parent UIComponentTag, and its accompanying
        • component. In the case of the children of the ViewTag, the
        • parent will be this tag itself. Find the tag's corresponding
        • {@link UIComponent}. Follow any internal processing necessary to
        • take any template text that exists between the previous
        • UIComponentTag and the end of this tag and turn it into a
        • verbatim transient {@link javax.faces.component.UIOutput}
        • component with escape set to true, and add it to tree as the last
        • child of the parent of this component. Importantly, set the
        • parent tag's verbatimCount to 0.
      • Retrieve from the {@link UIComponent} the set of component ids
      • of child components created by {@link UIComponentTag} instances
      • the last time this page was processed (if any). Compare it to
        @@ -523,6 +546,15 @@
        */
        public int doEndTag() throws JspException {
      • UIComponentTag parentTag = getParentUIComponentTag(pageContext);

      • UIComponent parentComponent = null;

      • if (parentTag != null) { + parentComponent = parentTag.getComponentInstance(); + addPrecedingTemplateTextToMyParentComponent(parentComponent, + parentTag); + parentTag.verbatimCount = 0; + }

      // Remove old children and facets as needed
      popUIComponentTag();
      removeOldChildren();
      @@ -738,6 +770,12 @@

    // Step 5 – Create or return a child with the specified id
    component = getChild(parentComponent, newId);
    +

    • // We need to do this here because this is as close as we can
    • // get to the place where we're adding the component to the tree
    • // that still executes on the postback.
    • addPrecedingTemplateTextToMyParentComponent(parentComponent,
    • parentTag);
      if (component == null)

    { component = createChild(context, parentComponent, newId); }

    @@ -1111,15 +1149,17 @@

    /**

      • Return the child list index to use for a new component to be created

      • by a nested {@link UIComponentTag} instance.

        • Return the child list index to use for a new component to be

        • created by a nested {@link UIComponentTag}

      instance. Take into

        • account any verbatim UIOutput components created as children of
        • this component.


          */
          private int getIndex() {

    if (createdComponents != null)

    { - return (createdComponents.size()); + return (verbatimCount + createdComponents.size()); }

    else

    { - return (0); + return (verbatimCount + 0); }

    }
    @@ -1271,6 +1311,56 @@
    }
    createdFacets = null;

    • }
    • /**
      • Find the second from top most

    {@link UIComponentBodyTag}

    that

      • is our ancestor. If there is no such tag, this method is a
      • no-op. If there is such a tag, call its

    {@link + * UIComponentBodyTag#getUIOutputForBodyContentAndClearBodyContent}

      • method. If that method returns non-null, add it to the tree at
      • the end of our child list and increment our parent tag's
      • verbatimTagCount ivar.

    • */
    • void addPrecedingTemplateTextToMyParentComponent(UIComponent
      parentComponent, UIComponentTag parentTag) {
    • // if we are the viewRoot, there will never be any
    • // interweaving problems, so just return.
    • if (parentComponent == context.getViewRoot())

    { + return; + }

    • // find the second from topmost UIComponentBodyTag in the page.
    • // This is necessary because the ViewTag is the topmost
    • // UIComponentBodyTag in the page, and we don't care about its
    • // template text.
    • Tag tag = this;
    • UIComponentBodyTag
    • secondFromTopMostBodyTag = null,
    • topMostBodyTag = null;
    • if (tag instanceof UIComponentBodyTag)

    { + topMostBodyTag = (UIComponentBodyTag) tag; + }

    • while (null != (tag = tag.getParent())) {
    • if (tag instanceof UIComponentBodyTag)

    { + secondFromTopMostBodyTag = topMostBodyTag; + topMostBodyTag = (UIComponentBodyTag) tag; + }

    • }
    • if (null != secondFromTopMostBodyTag) {
    • UIOutput output =
      secondFromTopMostBodyTag.getUIOutputForBodyContentAndClearBodyContent(parentComponent);
    • if (null != output)

    { + parentComponent.getChildren().add(output); + parentTag.verbatimCount++; + }

    • }
      }

    SECTION: RI Diffs

    Index: jsf-ri/systest/build-tests.xml

    RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/build-tests.xml,v
    retrieving revision 1.60
    diff -u -r1.60 build-tests.xml
    — jsf-ri/systest/build-tests.xml 16 Jun 2004 19:48:05 -0000 1.60
    +++ jsf-ri/systest/build-tests.xml 22 Jul 2004 21:44:16 -0000
    @@ -190,6 +190,13 @@
    request="$

    {context.path}/hello.jsp"
    golden="${golden.path}/hello.txt" failonerror="${failonerror}"/>

    • <tester host="${host}" port="${port}" protocol="${protocol}"
      request="${context.path}

      /hello.jsp" failonerror="$

      {failonerror}

      "
      Index: jsf-ri/systest/build.xml

      RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/build.xml,v
      retrieving revision 1.19
      diff -u -r1.19 build.xml
      — jsf-ri/systest/build.xml 8 Apr 2004 22:54:45 -0000 1.19
      +++ jsf-ri/systest/build.xml 22 Jul 2004 21:44:18 -0000
      @@ -253,7 +253,7 @@

      • +

      Index: jsf-ri/systest/web/golden/taglib/commandLink_multiform_test.txt

      RCS file:
      /cvs/javaserverfaces-sources/jsf-ri/systest/web/golden/taglib/commandLink_multiform_test.txt,v
      retrieving revision 1.1
      diff -u -r1.1 commandLink_multiform_test.txt
      — jsf-ri/systest/web/golden/taglib/commandLink_multiform_test.txt 8 Jun 2004
      13:49:20 -0000 1.1
      +++ jsf-ri/systest/web/golden/taglib/commandLink_multiform_test.txt 22 Jul 2004
      21:44:19 -0000
      @@ -7,22 +7,14 @@

      Index: jsf-ri/systest/web/golden/taglib/commandLink_test.txt

      RCS file:
      /cvs/javaserverfaces-sources/jsf-ri/systest/web/golden/taglib/commandLink_test.txt,v
      retrieving revision 1.5
      diff -u -r1.5 commandLink_test.txt
      — jsf-ri/systest/web/golden/taglib/commandLink_test.txt 12 May 2004 04:35:07
      -0000 1.5
      +++ jsf-ri/systest/web/golden/taglib/commandLink_test.txt 22 Jul 2004 21:44:19 -0000
      @@ -11,15 +11,13 @@

      • +

      My Link
      This is a String property
      RES-BUNDLE LINK

      Index: jsf-ri/web/test/RenderResponse_correct

      RCS file: /cvs/javaserverfaces-sources/jsf-ri/web/test/RenderResponse_correct,v
      retrieving revision 1.106
      diff -u -r1.106 RenderResponse_correct
      — jsf-ri/web/test/RenderResponse_correct 11 Jun 2004 20:14:56 -0000 1.106
      +++ jsf-ri/web/test/RenderResponse_correct 22 Jul 2004 21:44:25 -0000
      @@ -15,38 +15,14 @@

      -


      +

      +


      +
      +
      +

        @@ -821,28 +766,68 @@

        -


        +

      • +should be spanned
        +
        +
        +
        +
        +

        + + + +
        + + 1 + 2 + 3 + + + 4 + 5 + 6 +

        +


          +


          +
          +
          +

          +


          +
          +
          +

          +


          +
          +
          +
          +
          +
          +

          • 7
          8

          • 9
          10

          • 11
            +
      • + + +

        -should be spanned

        -

        +</f:view>

        Index: jsf-ri/web/test/TestRenderResponsePhase.jsp =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/web/test/TestRenderResponsePhase.jsp,v retrieving revision 1.80 diff -u -r1.80 TestRenderResponsePhase.jsp — jsf-ri/web/test/TestRenderResponsePhase.jsp 12 May 2004 01:33:00 -0000 1.80 +++ jsf-ri/web/test/TestRenderResponsePhase.jsp 22 Jul 2004 21:44:27 -0000 @@ -773,6 +773,38 @@

        </h:form>
        +
        +
        +<h:panelGrid id="interweave_grid1" columns="2" border="2">

        • <h:form id="interweave_form1">
        • 1
        • <h:outputText value="2" />
        • 3
        • </h:form>
        • <h:form id="interweave_form2">
        • 4
        • <h:outputText value="5" />
        • 6
        • </h:form>
          +</h:panelGrid>

        +



        +
        +<h:panelGrid columns="2" border="2">

        • 7
        • <h:outputText value="8" />
        • 9
        • <h:outputText value="10" />
        • 11
          +</h:panelGrid>
        • </f:view>

        +
        +
        +
        +
        </f:view>

        SECTION: Tools diffs

        Index: jsf-tools/src/com/sun/faces/generate/HtmlTaglibGenerator.java

        RCS file:
        /cvs/javaserverfaces-sources/jsf-tools/src/com/sun/faces/generate/HtmlTaglibGenerator.java,v
        retrieving revision 1.26
        diff -u -r1.26 HtmlTaglibGenerator.java
        — jsf-tools/src/com/sun/faces/generate/HtmlTaglibGenerator.java 12 May 2004
        03:08:50 -0000 1.26
        +++ jsf-tools/src/com/sun/faces/generate/HtmlTaglibGenerator.java 22 Jul 2004
        21:44:33 -0000
        @@ -85,6 +85,9 @@
        static

        { bodyTags.add("CommandLinkTag"); bodyTags.add("OutputLinkTag"); + bodyTags.add("PanelGridTag"); + bodyTags.add("PanelGroupTag"); + bodyTags.add("DataTableTag"); }

        // SPECIAL - Components in this List are either a ValueHolder or

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@rlubke said:
There is a compatibility issue with the latest rev of the change bundle in that
the javadocs of the public API are being changed. This would require, at a
minimum, an errata I believe.

A possible alternative to avoid having to go through the JCP would have an RI
BodyTag class that extends the UIComponentBodyTag class and overrides the public
API as necessary – as long as the binary behavior is retained.

This change could then be moved into the specification and API at a later date
(if needed) and the RI class removed.

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@edburns said:
After much work from several parties, my experiment in trying to solve
the content-interweaving problem without changing JSP APIs has failed.

Conclusion

Solving the content-interweaving problem without changing JSP APIs
would require a spec change because we would be changing the
implementation behavior. Also, even if we could make a spec change,
there are too many corner cases to consider to make it feasible.
Handling all the corner cases would be too complex and difficult to
maintain. It is better to wait for a tree pre-creation solution
developed for JSP 2.1.

Here are some of the corner cases pointed out by Craig. He also added
that we considered doing this for 1.0 but did not for these and other
reasons.

1. <h:panelGrid columns="1">
<f:facet name="head">
Foo <h:outputText value="Baz"/> Bar
</f:facet>

<h:outputText value="Buckaroo" />

</h:panelGrid>

The header should have "Foo Baz Bar" all in one cell, but what you'd
end up with is something like

Baz
Foo
Bar
Buckaroo

2. Expressions in template text

<h:commandButton ...>
Account $

{account.id}

</h:commandButton>

Faces doesn't know about ${} expressions, but we'd suck it all up
into a single UIOutput component that wouldn't get evaluated.

3. Includes

<h:commandButton ...>
<%@ include file="..." %>
</h:commandButton>

<h:commandButton ...>
<jsp:include page="..."/>
</h:commandButton>

We'd need to exclude these from being sucked up as well.

Ed

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
@manfredriem said:
Closing issue out

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
File: 6.tar.gz
Attached By: @edburns

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
File: 6.tar.gz
Attached By: @edburns

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
File: 6.tar.gz
Attached By: @edburns

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
File: 6.tar.gz
Attached By: @edburns

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
File: jsf-guessNumber.war
Attached By: @edburns

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
File: jsf-guessNumber.war
Attached By: @edburns

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
Issue-Links:
depends on
JAVASERVERFACES-7

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
This issue was imported from java.net JIRA JAVASERVERFACES-6

from mojarra.

ren-zhijun-oracle avatar ren-zhijun-oracle commented on July 16, 2024

@javaserverfaces Commented
Marked as won't fix on Wednesday, April 19th 2006, 5:44:08 am

from mojarra.

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.