dev@javaserverfaces.java.net

Re: [REVIEW] Get the demos building/running again

From: Roger Kitain <Roger.Kitain_at_sun.com>
Date: Tue, 01 Nov 2005 12:18:04 -0500

Ryan Lubke wrote:

> Get the demos building/running using ui.jar.
>
>
> SECTION: Modified Files
> ----------------------------
> M build.xml
> - don't delete the contents of DEMO_HOME/lib
> - refer to ui.jar instead of demo-components.jar
>
> M carstore/build.xml
> - refer to ui.jar instead of demo-components.jar
>
> M carstore/src/java/carstore/CarStore.java
> - Update import
>
> M carstore/web/chooseLocale.jsp
> - Update taglib import
>
> M guessNumber/src/java/guessNumber/UserNumberBean.java
> - remove additional test cruft.
>
> M carstore/web/WEB-INF/faces-config.xml
> - update managed bean packages
> - update namespace URI
>
> M characterCombat/web/WEB-INF/faces-config.xml
> M helloDuke/web/WEB-INF/faces-config.xml
> M j2meDemo/web/WEB-INF/faces-config.xml
> M nonjsp/web/WEB-INF/faces-config.xml
> M portlet-guessNumber/web/WEB-INF/faces-config.xml
> M renderkits/web/WEB-INF/tlds/svg.tld
> M renderkits/web/WEB-INF/tlds/xul.tld
> M standard/web/WEB-INF/faces-config.xml
> M test/mappingDemo/web/WEB-INF/faces-config.xml
> - update namespace URI
>
>
> SECTION: Diffs
> ----------------------------
> Index: build.xml
> ===================================================================
> RCS file: /cvs/javaserverfaces-sources/jsf-demo/build.xml,v
> retrieving revision 1.94
> diff -u -r1.94 build.xml
> --- build.xml 13 Sep 2005 17:28:39 -0000 1.94
> +++ build.xml 1 Nov 2005 16:39:54 -0000
> @@ -96,7 +96,6 @@
> <target name="clean">
> - <delete dir="${basedir}/lib"/>
> <delete file="jsf-${version}.zip"/>
> <delete dir="${dist.home}"/>
> <delete dir="${basedir}/test/build"/>
> @@ -237,7 +236,7 @@
> file="${basedir}/webtier-sample/build/webtier-sample.war"/>
> <echo> copy the demo-components.jar </echo>
> <copy todir="${dist.home}/samples"
> -
> file="${basedir}/components/build/jsf-components/WEB-INF/lib/demo-components.jar"/>
>
> + file="${basedir}/lib/ui.jar"/>
> </target>
>
> <target name="copyDemoSource" depends="copyJars">
> @@ -383,7 +382,7 @@
> <ant dir="${basedir}/components" inheritAll="false">
> </ant>
> <copy todir="${basedir}/lib"
> -
> file="components/build/jsf-components/WEB-INF/lib/demo-components.jar"/>
> + file="components/build/jsf-components/WEB-INF/lib/ui.jar"/>
> <ant dir="${basedir}/carstore" inheritAll="false">
> </ant>
> <ant dir="${basedir}/helloDuke" inheritAll="false">
> Index: carstore/build.xml
> ===================================================================
> RCS file: /cvs/javaserverfaces-sources/jsf-demo/carstore/build.xml,v
> retrieving revision 1.8
> diff -u -r1.8 build.xml
> --- carstore/build.xml 22 Aug 2005 22:08:34 -0000 1.8
> +++ carstore/build.xml 1 Nov 2005 16:39:54 -0000
> @@ -46,7 +46,7 @@
> <property name="jsf-demo.lib" value="../lib"/>
>
> <property name="demo-components.jar"
> - value="${jsf-demo.lib}/demo-components.jar"/>
> + value="${jsf-demo.lib}/ui.jar"/>
>
> <!-- Configure properties to access the Manager application -->
> <property name="url" value="http://localhost:8080/manager"/>
> Index: carstore/src/java/carstore/CarStore.java
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/carstore/src/java/carstore/CarStore.java,v
>
> retrieving revision 1.2
> diff -u -r1.2 CarStore.java
> --- carstore/src/java/carstore/CarStore.java 22 Aug 2005 22:08:35
> -0000 1.2
> +++ carstore/src/java/carstore/CarStore.java 1 Nov 2005 16:39:54 -0000
> @@ -26,7 +26,7 @@
>
> package carstore;
>
> -import components.components.AreaSelectedEvent;
> +import
> com.sun.javaee.blueprints.components.ui.components.AreaSelectedEvent;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
>
> Index: carstore/web/chooseLocale.jsp
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/carstore/web/chooseLocale.jsp,v
> retrieving revision 1.6
> diff -u -r1.6 chooseLocale.jsp
> --- carstore/web/chooseLocale.jsp 22 Aug 2005 22:08:42 -0000 1.6
> +++ carstore/web/chooseLocale.jsp 1 Nov 2005 16:39:54 -0000
> @@ -32,7 +32,7 @@
>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> -<%@ taglib uri="http://java.sun.com/jsf/demo/components" prefix="d" %>
> +<%@ taglib uri="http://java.sun.com/blueprints/ee5/components/ui"
> prefix="d" %>
>
> <f:loadBundle basename="carstore.bundles.Resources" var="bundle"/>
>
> Index: carstore/web/WEB-INF/faces-config.xml
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/carstore/web/WEB-INF/faces-config.xml,v
>
> retrieving revision 1.11
> diff -u -r1.11 faces-config.xml
> --- carstore/web/WEB-INF/faces-config.xml 22 Aug 2005 22:08:43
> -0000 1.11
> +++ carstore/web/WEB-INF/faces-config.xml 1 Nov 2005 16:39:54 -0000
> @@ -27,9 +27,9 @@
>
> <!-- =========== FULL CONFIGURATION FILE
> ================================== -->
>
> -<faces-config xmlns="http://java.sun.com/xml/ns/j2ee"
> +<faces-config 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/j2ee
> http://java.sun.com/xml/ns/j2ee/web-facesconfig_1_2.xsd"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
>
> <application>
> @@ -78,13 +78,13 @@
> <managed-bean>
> <description>
> Causes the default VariableResolver implementation to
> instantiate the
> - managed bean, NA of the class, components.model.ImageArea in
> application
> + managed bean, NA of the class, ImageArea in application
> scope if the bean does not already exist in any scope and
> initialize the
> shape, alt, and coords properties with the values specified by the
> managed-property elements.
> </description>
> <managed-bean-name> NA </managed-bean-name>
> - <managed-bean-class> components.model.ImageArea
> </managed-bean-class>
> +
> <managed-bean-class>com.sun.javaee.blueprints.components.ui.model.ImageArea</managed-bean-class>
>
> <managed-bean-scope> application </managed-bean-scope>
> <managed-property>
> <description>
> @@ -117,13 +117,13 @@
> <managed-bean>
> <description>
> Causes the default VariableResolver implementation to
> instantiate the
> - managed bean, SA of the class, components.model.ImageArea in
> application
> + managed bean, SA of the class, ImageArea in application
> scope if the bean does not already exist in any scope and
> initialize the
> shape, alt, and coords properties with the values specified by the
> managed-property elements.
> </description>
> <managed-bean-name>SA</managed-bean-name>
> - <managed-bean-class>components.model.ImageArea</managed-bean-class>
> +
> <managed-bean-class>com.sun.javaee.blueprints.components.ui.model.ImageArea</managed-bean-class>
>
> <managed-bean-scope>application</managed-bean-scope>
> <managed-property>
> <description>
> @@ -156,13 +156,13 @@
> <managed-bean>
> <description>
> Causes the default VariableResolver implementation to
> instantiate the
> - managed bean, gerA of the class, components.model.ImageArea in
> application
> + managed bean, gerA of the class, ImageArea in application
> scope if the bean does not already exist in any scope and
> initialize the
> shape, alt, and coords properties with the values specified by the
> managed-property elements.
> </description>
> <managed-bean-name> gerA </managed-bean-name>
> - <managed-bean-class> components.model.ImageArea
> </managed-bean-class>
> +
> <managed-bean-class>com.sun.javaee.blueprints.components.ui.model.ImageArea</managed-bean-class>
>
> <managed-bean-scope> application </managed-bean-scope>
> <managed-property>
> <description>
> @@ -195,13 +195,13 @@
> <managed-bean>
> <description>
> Causes the default VariableResolver implementation to
> instantiate the
> - managed bean, fraA of the class, components.model.ImageArea in
> application
> + managed bean, fraA of the class, ImageArea in application
> scope if the bean does not already exist in any scope and
> initialize the
> shape, alt, and coords properties with the values specified by the
> managed-property elements.
> </description>
> <managed-bean-name> fraA </managed-bean-name>
> - <managed-bean-class> components.model.ImageArea
> </managed-bean-class>
> +
> <managed-bean-class>com.sun.javaee.blueprints.components.ui.model.ImageArea</managed-bean-class>
>
> <managed-bean-scope> application </managed-bean-scope>
> <managed-property>
> <description>
> Index: characterCombat/web/WEB-INF/faces-config.xml
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/characterCombat/web/WEB-INF/faces-config.xml,v
>
> retrieving revision 1.12
> diff -u -r1.12 faces-config.xml
> --- characterCombat/web/WEB-INF/faces-config.xml 22 Aug 2005
> 22:08:47 -0000 1.12
> +++ characterCombat/web/WEB-INF/faces-config.xml 1 Nov 2005
> 16:39:54 -0000
> @@ -26,9 +26,9 @@
> -->
>
>
> -<faces-config xmlns="http://java.sun.com/xml/ns/j2ee"
> +<faces-config 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/j2ee
> http://java.sun.com/xml/ns/j2ee/web-facesconfig_1_2.xsd"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
>
> <managed-bean>
>
> Index: guessNumber/src/java/guessNumber/UserNumberBean.java
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/guessNumber/src/java/guessNumber/UserNumberBean.java,v
>
> retrieving revision 1.9
> diff -u -r1.9 UserNumberBean.java
> --- guessNumber/src/java/guessNumber/UserNumberBean.java 15 Oct
> 2005 01:32:05 -0000 1.9
> +++ guessNumber/src/java/guessNumber/UserNumberBean.java 1 Nov 2005
> 16:39:54 -0000
> @@ -35,6 +35,7 @@
> import java.util.Random;
> import javax.faces.event.AbortProcessingException;
> import javax.faces.event.ValueChangeEvent;
> +import javax.faces.model.SelectItem;
>
>
> public class UserNumberBean {
> @@ -71,15 +72,15 @@
> return "Yay! You got it!";
> } else if (userNumber == null) {
> return "Sorry, " + userNumber +
> - " is incorrect. Try a larger number.";
> + " is incorrect. Try a larger number.";
> } else {
> int num = userNumber.intValue();
> if (num > randomInt.intValue()) {
> return "Sorry, " + userNumber +
> - " is incorrect. Try a smaller number.";
> + " is incorrect. Try a smaller number.";
> } else {
> return "Sorry, " + userNumber +
> - " is incorrect. Try a larger number.";
> + " is incorrect. Try a larger number.";
> }
> }
> }
> @@ -189,7 +190,7 @@
> throw new ValidatorException(
> MessageFactory.getMessage
> (context, LongRangeValidator.TYPE_MESSAGE_ID,
> - new Object[]{MessageFactory.getLabel(context,
> component)}));
> + new Object[]{MessageFactory.getLabel(context,
> component)}));
> }
> }
>
> @@ -206,38 +207,5 @@
> }
>
> }
> -
> - /**
> - * Holds value of property items.
> - */
> - private List items;
> -
> - /**
> - * Getter for property items.
> - * @return Value of property items.
> - */
> - public List getItems() {
> - if (null == items) {
> - items = new ArrayList();
> - items.add(new Integer(1));
> - items.add(new Integer(2));
> - }
> -
> - return this.items;
> - }
> -
> - /**
> - * Setter for property items.
> - * @param items New value of property items.
> - */
> - public void setItems(List items) {
> -
> - this.items = items;
> - }
> - - public void processValueChange(ValueChangeEvent e) throws
> AbortProcessingException {
> - System.out.println("value changed");
> - }
> -
>
> }
> Index: helloDuke/web/WEB-INF/faces-config.xml
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/helloDuke/web/WEB-INF/faces-config.xml,v
>
> retrieving revision 1.9
> diff -u -r1.9 faces-config.xml
> --- helloDuke/web/WEB-INF/faces-config.xml 22 Aug 2005 22:09:13
> -0000 1.9
> +++ helloDuke/web/WEB-INF/faces-config.xml 1 Nov 2005 16:39:54 -0000
> @@ -25,9 +25,9 @@
> Copyright 2005 Sun Microsystems Inc. All Rights Reserved
> -->
>
> -<faces-config xmlns="http://java.sun.com/xml/ns/j2ee"
> +<faces-config 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/j2ee
> http://java.sun.com/xml/ns/j2ee/web-facesconfig_1_2.xsd"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
>
>
> Index: j2meDemo/web/WEB-INF/faces-config.xml
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/j2meDemo/web/WEB-INF/faces-config.xml,v
>
> retrieving revision 1.3
> diff -u -r1.3 faces-config.xml
> --- j2meDemo/web/WEB-INF/faces-config.xml 22 Aug 2005 22:09:19
> -0000 1.3
> +++ j2meDemo/web/WEB-INF/faces-config.xml 1 Nov 2005 16:39:54 -0000
> @@ -26,9 +26,9 @@
> -->
>
>
> -<faces-config xmlns="http://java.sun.com/xml/ns/j2ee"
> +<faces-config 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/j2ee
> http://java.sun.com/xml/ns/j2ee/web-facesconfig_1_2.xsd"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
>
> <navigation-rule>
> Index: nonjsp/web/WEB-INF/faces-config.xml
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/nonjsp/web/WEB-INF/faces-config.xml,v
>
> retrieving revision 1.9
> diff -u -r1.9 faces-config.xml
> --- nonjsp/web/WEB-INF/faces-config.xml 22 Aug 2005 22:09:25
> -0000 1.9
> +++ nonjsp/web/WEB-INF/faces-config.xml 1 Nov 2005 16:39:54 -0000
> @@ -25,9 +25,9 @@
> Copyright 2005 Sun Microsystems Inc. All Rights Reserved
> -->
>
> -<faces-config xmlns="http://java.sun.com/xml/ns/j2ee"
> +<faces-config 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/j2ee
> http://java.sun.com/xml/ns/j2ee/web-facesconfig_1_2.xsd"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
> <navigation-rule>
> Index: portlet-guessNumber/web/WEB-INF/faces-config.xml
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/portlet-guessNumber/web/WEB-INF/faces-config.xml,v
>
> retrieving revision 1.6
> diff -u -r1.6 faces-config.xml
> --- portlet-guessNumber/web/WEB-INF/faces-config.xml 22 Aug 2005
> 22:09:28 -0000 1.6
> +++ portlet-guessNumber/web/WEB-INF/faces-config.xml 1 Nov 2005
> 16:39:54 -0000
> @@ -25,9 +25,9 @@
> Copyright 2005 Sun Microsystems Inc. All Rights Reserved
> -->
>
> -<faces-config xmlns="http://java.sun.com/xml/ns/j2ee"
> +<faces-config 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/j2ee
> http://java.sun.com/xml/ns/j2ee/web-facesconfig_1_2.xsd"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
>
> <application>
> Index: renderkits/web/WEB-INF/tlds/svg.tld
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/renderkits/web/WEB-INF/tlds/svg.tld,v
>
> retrieving revision 1.6
> diff -u -r1.6 svg.tld
> --- renderkits/web/WEB-INF/tlds/svg.tld 22 Aug 2005 22:09:40
> -0000 1.6
> +++ renderkits/web/WEB-INF/tlds/svg.tld 1 Nov 2005 16:39:54 -0000
> @@ -26,8 +26,8 @@
> -->
>
>
>
> -<taglib xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> web-jsptaglibrary_2_1.xsd"
> -xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1">
> +<taglib xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> web-jsptaglibrary_2_1.xsd"
> +xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1">
>
>
> <!-- ============== Tag Library Description Elements ============= -->
>
>
> Index: renderkits/web/WEB-INF/tlds/xul.tld
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/renderkits/web/WEB-INF/tlds/xul.tld,v
>
> retrieving revision 1.3
> diff -u -r1.3 xul.tld
> --- renderkits/web/WEB-INF/tlds/xul.tld 22 Aug 2005 22:09:40
> -0000 1.3
> +++ renderkits/web/WEB-INF/tlds/xul.tld 1 Nov 2005 16:39:54 -0000
> @@ -26,8 +26,8 @@
> -->
>
>
>
> -<taglib xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> web-jsptaglibrary_2_1.xsd"
> -xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1">
> +<taglib xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> web-jsptaglibrary_2_1.xsd"
> +xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1">
>
>
> <!-- ============== Tag Library Description Elements ============= -->
>
>
> Index: standard/web/WEB-INF/faces-config.xml
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/standard/web/WEB-INF/faces-config.xml,v
>
> retrieving revision 1.21
> diff -u -r1.21 faces-config.xml
> --- standard/web/WEB-INF/faces-config.xml 13 Sep 2005 17:40:29
> -0000 1.21
> +++ standard/web/WEB-INF/faces-config.xml 1 Nov 2005 16:39:54 -0000
> @@ -26,9 +26,9 @@
> -->
>
>
> -<faces-config xmlns="http://java.sun.com/xml/ns/j2ee"
> +<faces-config 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/j2ee
> http://java.sun.com/xml/ns/j2ee/web-facesconfig_1_2.xsd"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
>
> <!--
> Index: test/mappingDemo/web/WEB-INF/faces-config.xml
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-demo/test/mappingDemo/web/WEB-INF/faces-config.xml,v
>
> retrieving revision 1.9
> diff -u -r1.9 faces-config.xml
> --- test/mappingDemo/web/WEB-INF/faces-config.xml 22 Aug 2005
> 22:09:53 -0000 1.9
> +++ test/mappingDemo/web/WEB-INF/faces-config.xml 1 Nov 2005
> 16:39:54 -0000
> @@ -25,9 +25,9 @@
> Copyright 2005 Sun Microsystems Inc. All Rights Reserved
> -->
>
> -<faces-config xmlns="http://java.sun.com/xml/ns/j2ee"
> +<faces-config 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/j2ee
> http://java.sun.com/xml/ns/j2ee/web-facesconfig_1_2.xsd"
> + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
>
> <application>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
r=rogerk