dev@javaserverfaces.java.net

Re: Review: Taglib validator changes

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 25 May 2005 09:06:58 -0400

r=rlubke

Jayashri Visvanathan wrote:

> M src/com/sun/faces/taglib/jsf_core/IdTagParserImpl.java
> With TCCI changes, "id" no longer required for JSF tags nested inside
> c:if.
>
> M systest/build-tests.xml
> add interweaving tests.
>
> A systest/web/interweaving01.jsp
> A systest/web/interweaving02.jsp
> A systest/web/interweaving03.jsp
> A systest/web/interweaving04.jsp
> A systest/web/interweaving05.jsp
> A systest/web/test01.jsp
> A systest/web/golden/interweaving01.txt
> A systest/web/golden/interweaving02.txt
> A systest/web/golden/interweaving04.txt
> A systest/web/golden/interweaving05.txt
> new tests and golden files.
>
> M systest/web/jsp/jstl-choose-01.jsp
> M systest/web/jsp/jstl-if-01.jsp
> With TCCI changes, "id" no longer required for JSF tags nested inside
> c:f and c:choose
> ~
>
>------------------------------------------------------------------------
>
>Index: src/com/sun/faces/taglib/jsf_core/IdTagParserImpl.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/taglib/jsf_core/IdTagParserImpl.java,v
>retrieving revision 1.9
>diff -u -r1.9 IdTagParserImpl.java
>--- src/com/sun/faces/taglib/jsf_core/IdTagParserImpl.java 2 Dec 2004 18:42:24 -0000 1.9
>+++ src/com/sun/faces/taglib/jsf_core/IdTagParserImpl.java 24 May 2005 23:08:43 -0000
>@@ -180,9 +180,7 @@
> */
> private boolean isJstlTag(FacesValidator validator, String ns, String ln) {
> if (ns.equals(RIConstants.JSTL_NAMESPACE)) {
>- if (ln.equals(validator.getJSTL_IF_LN()) ||
>- ln.equals(validator.getJSTL_CHOOSE_LN()) ||
>- ln.equals(validator.getJSTL_FOREACH_LN()) ||
>+ if( ln.equals(validator.getJSTL_FOREACH_LN()) ||
> ln.equals(validator.getJSTL_FORTOKENS_LN())) {
> return true;
> }
>Index: systest/build-tests.xml
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/build-tests.xml,v
>retrieving revision 1.79
>diff -u -r1.79 build-tests.xml
>--- systest/build-tests.xml 23 May 2005 14:38:36 -0000 1.79
>+++ systest/build-tests.xml 24 May 2005 23:08:43 -0000
>@@ -74,6 +74,7 @@
> description="Execute all tests against installed application"
> depends="test.init,
> test.config,
>+ test.interweaving,
> test.listener,
> test.duplicateIds,
> test.renderkit,
>@@ -452,7 +453,7 @@
>
> <tester host="${host}" port="${port}" protocol="${protocol}"
> request="${context.path}/faces/TestCoreValidatorIfFail.jsp"
>- status="500" failonerror="${failonerror}"/>
>+ status="200" failonerror="${failonerror}"/>
>
> <tester host="${host}" port="${port}" protocol="${protocol}"
> request="${context.path}/faces/TestCoreValidatorIfSucceed.jsp"
>@@ -734,7 +735,8 @@
> request="${context.path}/faces/subview04.jsp"
> recordGolden="${local.golden.path}/subview04.txt"
> golden="${golden.path}/subview04.txt" failonerror="${failonerror}"/>
>- <!-- c:forEach tests
>+
>+ <!-- PENDING(visvan) c:forEach tests.
> <tester host="${host}" port="${port}" protocol="${protocol}"
> request="${context.path}/faces/subview05.jsp"
> recordGolden="${local.golden.path}/subview05.txt"
>@@ -745,6 +747,35 @@
> recordGolden="${local.golden.path}/subview06.txt"
> golden="${golden.path}/subview06.txt" failonerror="${failonerror}"/> -->
>
>+ </target>
>+
>+ <target name="test.interweaving"
>+ description="Test interweaving">
>+
>+ <tester host="${host}" port="${port}" protocol="${protocol}"
>+ request="${context.path}/faces/interweaving01.jsp"
>+ recordGolden="${local.golden.path}/interweaving01.txt"
>+ golden="${golden.path}/interweaving01.txt" failonerror="${failonerror}"/>
>+
>+ <tester host="${host}" port="${port}" protocol="${protocol}"
>+ request="${context.path}/faces/interweaving02.jsp"
>+ recordGolden="${local.golden.path}/interweaving02.txt"
>+ golden="${golden.path}/interweaving02.txt" failonerror="${failonerror}"/>
>+
>+ <tester host="${host}" port="${port}" protocol="${protocol}"
>+ request="${context.path}/faces/interweaving03.jsp"
>+ recordGolden="${local.golden.path}/interweaving03.txt"
>+ golden="${golden.path}/interweaving03.txt" failonerror="${failonerror}"/>
>+
>+ <tester host="${host}" port="${port}" protocol="${protocol}"
>+ request="${context.path}/faces/interweaving04.jsp"
>+ recordGolden="${local.golden.path}/interweaving04.txt"
>+ golden="${golden.path}/interweaving04.txt" failonerror="${failonerror}"/>
>+
>+ <tester host="${host}" port="${port}" protocol="${protocol}"
>+ request="${context.path}/faces/interweaving05.jsp"
>+ recordGolden="${local.golden.path}/interweaving05.txt"
>+ golden="${golden.path}/interweaving05.txt" failonerror="${failonerror}"/>
> </target>
>
> </project>
>Index: systest/web/jsp/jstl-choose-01.jsp
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/web/jsp/jstl-choose-01.jsp,v
>retrieving revision 1.4
>diff -u -r1.4 jstl-choose-01.jsp
>--- systest/web/jsp/jstl-choose-01.jsp 4 Feb 2004 23:43:29 -0000 1.4
>+++ systest/web/jsp/jstl-choose-01.jsp 24 May 2005 23:08:43 -0000
>@@ -17,16 +17,16 @@
> <h:outputText value="[1]"/>
> <c:choose>
> <c:when test="${param.choose == 'a'}">
>- <h:outputText id="comp2a" value="[2a]"/>
>- <h:outputText id="comp2z" value="[2z]"/>
>+ <h:outputText value="[2a]"/>
>+ <h:outputText value="[2z]"/>
> </c:when>
> <c:when test="${param.choose == 'b'}">
>- <h:outputText id="comp2b" value="[2b]"/>
>- <h:outputText id="comp2y" value="[2y]"/>
>+ <h:outputText value="[2b]"/>
>+ <h:outputText value="[2y]"/>
> </c:when>
> <c:otherwise>
>- <h:outputText id="comp2c" value="[2c]"/>
>- <h:outputText id="comp2x" value="[2x]"/>
>+ <h:outputText value="[2c]"/>
>+ <h:outputText value="[2x]"/>
> </c:otherwise>
> </c:choose>
> <h:outputText value="[3]"/>
>Index: systest/web/jsp/jstl-if-01.jsp
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/web/jsp/jstl-if-01.jsp,v
>retrieving revision 1.5
>diff -u -r1.5 jstl-if-01.jsp
>--- systest/web/jsp/jstl-if-01.jsp 4 Feb 2004 23:43:30 -0000 1.5
>+++ systest/web/jsp/jstl-if-01.jsp 24 May 2005 23:08:43 -0000
>@@ -11,12 +11,12 @@
> <f:view>
> <html>
> <head>
>-<title>jstl-if-01</title>
>+<title>jstl-if test without "id"</title>
> </head>
> <body>
> <h:outputText value="[First]"/>
> <c:if test="${param.cond}">
>- <h:outputText id="cond" value="[Second]"/>
>+ <h:outputText value="[Second]"/>
> </c:if>
> <h:outputText value="[Third]"/>
> </body>
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>