Extracted visualweb.* to its own repo.
authorJesse Glick <jglick@netbeans.org>
Wed, 23 Feb 2011 20:05:58 -0500
changeset 17305ffcc9306fe63
parent 17304 dca93c00fe5d
child 17306 942efeb39a60
Extracted visualweb.* to its own repo.
visualweb.designer.decoration/build.xml
visualweb.designer.decoration/manifest.mf
visualweb.designer.decoration/nbproject/project.properties
visualweb.designer.decoration/nbproject/project.xml
visualweb.designer.decoration/src/org/netbeans/modules/visualweb/designer/decoration/DecorationDemoSupport.java
visualweb.designer.decoration/src/org/netbeans/modules/visualweb/designer/decoration/DecorationProviderImpl.java
visualweb.designer.decoration/src/org/netbeans/modules/visualweb/designer/decoration/resources/Bundle.properties
visualweb.designer.decoration/src/org/netbeans/modules/visualweb/designer/decoration/resources/dbDecoration.png
visualweb.project.importpage/build.xml
visualweb.project.importpage/manifest.mf
visualweb.project.importpage/nbproject/project.properties
visualweb.project.importpage/nbproject/project.xml
visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/Bundle.properties
visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/Import.java
visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/ImportContext.java
visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/ImportPagePanel.form
visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/ImportPagePanel.java
visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/PageImport.java
visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/resources/Bundle.properties
visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/resources/layer.xml
visualweb.removebindings/build.xml
visualweb.removebindings/manifest.mf
visualweb.removebindings/nbproject/project.properties
visualweb.removebindings/nbproject/project.xml
visualweb.removebindings/src/org/netbeans/modules/visualweb/removebindings/Bundle.properties
visualweb.removebindings/src/org/netbeans/modules/visualweb/removebindings/RemoveUnusedBindingsAction.java
visualweb.removebindings/src/org/netbeans/modules/visualweb/removebindings/layer.xml
visualweb.samples.postrel/build.xml
visualweb.samples.postrel/complibs/dynamicfaces/dynamicfaces.complib
visualweb.samples.postrel/complibs/ui/ui.complib
visualweb.samples.postrel/manifest.mf
visualweb.samples.postrel/nbproject/project.properties
visualweb.samples.postrel/nbproject/project.xml
visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/Bundle.properties
visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/PostReleaseModuleInstaller.java
visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/descriptions/webSamplesCategory.html
visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/layer.xml
visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/ui/resources/webProjectIcon.gif
visualweb.samples.postrel/webapps/CurrencyTrader/build.xml
visualweb.samples.postrel/webapps/CurrencyTrader/lib/complibs/index.xml
visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/ant-deploy.xml
visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/build-impl.xml
visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/genfiles.properties
visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/project.properties
visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/project.xml
visualweb.samples.postrel/webapps/CurrencyTrader/src/conf/MANIFEST.MF
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencyservice/AuthoratativeCurrencyPair.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencyservice/CurrencyService.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/ApplicationBean1.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/Bundle.properties
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/CurrencyPair.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/CurrencyPairCache.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/CurrencyPairListDataProvider.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/Page1.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/Position.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/PositionListDataProvider.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/RequestBean1.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/SessionBean1.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/VisibleChangeMap.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/threadmanagement/ThreadPriority.java
visualweb.samples.postrel/webapps/CurrencyTrader/src/java/threadmanagement/ThreadSynchronizer.java
visualweb.samples.postrel/webapps/CurrencyTrader/web/Page1.jsp
visualweb.samples.postrel/webapps/CurrencyTrader/web/Readme.html
visualweb.samples.postrel/webapps/CurrencyTrader/web/WEB-INF/faces-config.xml
visualweb.samples.postrel/webapps/CurrencyTrader/web/WEB-INF/sun-web.xml
visualweb.samples.postrel/webapps/CurrencyTrader/web/WEB-INF/web.xml
visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/blank.gif
visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/currencytrader.js
visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/downArrow.jpg
visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/help.gif
visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/home.gif
visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/masthead_background.gif
visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/stylesheet.css
visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/upArrow.jpg
visualweb.samples.postrel/webapps/descriptions/CurrencyTrader.html
visualweb.woodstock.pagetemplates/build.xml
visualweb.woodstock.pagetemplates/manifest.mf
visualweb.woodstock.pagetemplates/nbproject/build-impl.xml
visualweb.woodstock.pagetemplates/nbproject/genfiles.properties
visualweb.woodstock.pagetemplates/nbproject/platform.properties
visualweb.woodstock.pagetemplates/nbproject/project.properties
visualweb.woodstock.pagetemplates/nbproject/project.xml
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/Bundle.properties
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate1.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate1.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate10.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate10.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate11.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate11.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate2.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate2.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate3.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate3.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate4.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate4.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate5.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate5.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate6.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate6.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate7.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate7.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate8.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate8.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate9.java.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate9.jsp.template
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/layer.xml
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-resources.zip
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-icon.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-preview.jpg
visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-resources.zip
     1.1 --- a/visualweb.designer.decoration/build.xml	Wed Feb 23 20:05:40 2011 -0500
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,47 +0,0 @@
     1.4 -<?xml version="1.0" encoding="UTF-8"?>
     1.5 -<!--
     1.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     1.7 -
     1.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     1.9 -
    1.10 -
    1.11 -The contents of this file are subject to the terms of either the GNU
    1.12 -General Public License Version 2 only ("GPL") or the Common
    1.13 -Development and Distribution License("CDDL") (collectively, the
    1.14 -"License"). You may not use this file except in compliance with the
    1.15 -License. You can obtain a copy of the License at
    1.16 -http://www.netbeans.org/cddl-gplv2.html
    1.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    1.18 -specific language governing permissions and limitations under the
    1.19 -License.  When distributing the software, include this License Header
    1.20 -Notice in each file and include the License file at
    1.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    1.22 -particular file as subject to the "Classpath" exception as provided
    1.23 -by Sun in the GPL Version 2 section of the License file that
    1.24 -accompanied this code. If applicable, add the following below the
    1.25 -License Header, with the fields enclosed by brackets [] replaced by
    1.26 -your own identifying information:
    1.27 -"Portions Copyrighted [year] [name of copyright owner]"
    1.28 -
    1.29 -Contributor(s):
    1.30 -
    1.31 -The Original Software is NetBeans. The Initial Developer of the Original
    1.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    1.33 -Microsystems, Inc. All Rights Reserved.
    1.34 -
    1.35 -If you wish your version of this file to be governed by only the CDDL
    1.36 -or only the GPL Version 2, indicate your decision by adding
    1.37 -"[Contributor] elects to include this software in this distribution
    1.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
    1.39 -single choice of license, a recipient has the option to distribute
    1.40 -your version of this file under either the CDDL, the GPL Version 2 or
    1.41 -to extend the choice of license to its licensees as provided above.
    1.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
    1.43 -Version 2 license, then the option applies only if the new code is
    1.44 -made subject to such option by the copyright holder.
    1.45 --->
    1.46 -
    1.47 -<project name="contrib/visualweb.designer.decoration" default="netbeans" basedir=".">
    1.48 -    <description>Builds, tests, and runs the project org.netbeans.modules.visualweb.designer.decoration.</description>
    1.49 -    <import file="../../nbbuild/templates/projectized.xml"/>
    1.50 -</project>
     2.1 --- a/visualweb.designer.decoration/manifest.mf	Wed Feb 23 20:05:40 2011 -0500
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,5 +0,0 @@
     2.4 -Manifest-Version: 1.0
     2.5 -OpenIDE-Module: org.netbeans.modules.visualweb.designer.decoration
     2.6 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visualweb/designer/decoration/resources/Bundle.properties
     2.7 -OpenIDE-Module-Specification-Version: 2.0
     2.8 -
     3.1 --- a/visualweb.designer.decoration/nbproject/project.properties	Wed Feb 23 20:05:40 2011 -0500
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,41 +0,0 @@
     3.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     3.5 -#
     3.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     3.7 -#
     3.8 -# The contents of this file are subject to the terms of either the GNU
     3.9 -# General Public License Version 2 only ("GPL") or the Common
    3.10 -# Development and Distribution License("CDDL") (collectively, the
    3.11 -# "License"). You may not use this file except in compliance with the
    3.12 -# License. You can obtain a copy of the License at
    3.13 -# http://www.netbeans.org/cddl-gplv2.html
    3.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    3.15 -# specific language governing permissions and limitations under the
    3.16 -# License.  When distributing the software, include this License Header
    3.17 -# Notice in each file and include the License file at
    3.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    3.19 -# particular file as subject to the "Classpath" exception as provided
    3.20 -# by Sun in the GPL Version 2 section of the License file that
    3.21 -# accompanied this code. If applicable, add the following below the
    3.22 -# License Header, with the fields enclosed by brackets [] replaced by
    3.23 -# your own identifying information:
    3.24 -# "Portions Copyrighted [year] [name of copyright owner]"
    3.25 -#
    3.26 -# Contributor(s):
    3.27 -#
    3.28 -# The Original Software is NetBeans. The Initial Developer of the Original
    3.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    3.30 -# Microsystems, Inc. All Rights Reserved.
    3.31 -#
    3.32 -# If you wish your version of this file to be governed by only the CDDL
    3.33 -# or only the GPL Version 2, indicate your decision by adding
    3.34 -# "[Contributor] elects to include this software in this distribution
    3.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
    3.36 -# single choice of license, a recipient has the option to distribute
    3.37 -# your version of this file under either the CDDL, the GPL Version 2 or
    3.38 -# to extend the choice of license to its licensees as provided above.
    3.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
    3.40 -# Version 2 license, then the option applies only if the new code is
    3.41 -# made subject to such option by the copyright holder.
    3.42 -
    3.43 -javac.compilerargs=-Xlint:unchecked
    3.44 -javac.source=1.5
     4.1 --- a/visualweb.designer.decoration/nbproject/project.xml	Wed Feb 23 20:05:40 2011 -0500
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,114 +0,0 @@
     4.4 -<?xml version="1.0" encoding="UTF-8"?>
     4.5 -<!--
     4.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4.7 -
     4.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     4.9 -
    4.10 -
    4.11 -The contents of this file are subject to the terms of either the GNU
    4.12 -General Public License Version 2 only ("GPL") or the Common
    4.13 -Development and Distribution License("CDDL") (collectively, the
    4.14 -"License"). You may not use this file except in compliance with the
    4.15 -License. You can obtain a copy of the License at
    4.16 -http://www.netbeans.org/cddl-gplv2.html
    4.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    4.18 -specific language governing permissions and limitations under the
    4.19 -License.  When distributing the software, include this License Header
    4.20 -Notice in each file and include the License file at
    4.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    4.22 -particular file as subject to the "Classpath" exception as provided
    4.23 -by Sun in the GPL Version 2 section of the License file that
    4.24 -accompanied this code. If applicable, add the following below the
    4.25 -License Header, with the fields enclosed by brackets [] replaced by
    4.26 -your own identifying information:
    4.27 -"Portions Copyrighted [year] [name of copyright owner]"
    4.28 -
    4.29 -Contributor(s):
    4.30 -
    4.31 -The Original Software is NetBeans. The Initial Developer of the Original
    4.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    4.33 -Microsystems, Inc. All Rights Reserved.
    4.34 -
    4.35 -If you wish your version of this file to be governed by only the CDDL
    4.36 -or only the GPL Version 2, indicate your decision by adding
    4.37 -"[Contributor] elects to include this software in this distribution
    4.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
    4.39 -single choice of license, a recipient has the option to distribute
    4.40 -your version of this file under either the CDDL, the GPL Version 2 or
    4.41 -to extend the choice of license to its licensees as provided above.
    4.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
    4.43 -Version 2 license, then the option applies only if the new code is
    4.44 -made subject to such option by the copyright holder.
    4.45 --->
    4.46 -<project xmlns="http://www.netbeans.org/ns/project/1">
    4.47 -    <type>org.netbeans.modules.apisupport.project</type>
    4.48 -    <configuration>
    4.49 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
    4.50 -            <code-name-base>org.netbeans.modules.visualweb.designer.decoration</code-name-base>
    4.51 -            <standalone/>
    4.52 -            <module-dependencies>
    4.53 -                <dependency>
    4.54 -                    <code-name-base>org.netbeans.modules.visualweb.api.insync</code-name-base>
    4.55 -                    <build-prerequisite/>
    4.56 -                    <compile-dependency/>
    4.57 -                    <run-dependency>
    4.58 -                        <release-version>1</release-version>
    4.59 -                        <specification-version>1.0</specification-version>
    4.60 -                    </run-dependency>
    4.61 -                </dependency>
    4.62 -                <dependency>
    4.63 -                    <code-name-base>org.netbeans.modules.visualweb.designer</code-name-base>
    4.64 -                    <build-prerequisite/>
    4.65 -                    <compile-dependency/>
    4.66 -                    <run-dependency>
    4.67 -                        <release-version>1</release-version>
    4.68 -                        <specification-version>1.0.5</specification-version>
    4.69 -                    </run-dependency>
    4.70 -                </dependency>
    4.71 -                <dependency>
    4.72 -                    <code-name-base>org.netbeans.modules.visualweb.designtime</code-name-base>
    4.73 -                    <build-prerequisite/>
    4.74 -                    <compile-dependency/>
    4.75 -                    <run-dependency>
    4.76 -                        <release-version>1</release-version>
    4.77 -                        <specification-version>1.0</specification-version>
    4.78 -                    </run-dependency>
    4.79 -                </dependency>
    4.80 -                <dependency>
    4.81 -                    <code-name-base>org.netbeans.modules.visualweb.designtime.idebridge</code-name-base>
    4.82 -                    <build-prerequisite/>
    4.83 -                    <compile-dependency/>
    4.84 -                    <run-dependency>
    4.85 -                        <specification-version>1.0</specification-version>
    4.86 -                    </run-dependency>
    4.87 -                </dependency>
    4.88 -                <dependency>
    4.89 -                    <code-name-base>org.netbeans.modules.visualweb.insync</code-name-base>
    4.90 -                    <build-prerequisite/>
    4.91 -                    <compile-dependency/>
    4.92 -                    <run-dependency>
    4.93 -                        <release-version>1</release-version>
    4.94 -                        <specification-version>1.0.5</specification-version>
    4.95 -                    </run-dependency>
    4.96 -                </dependency>
    4.97 -                <dependency>
    4.98 -                    <code-name-base>org.openide.nodes</code-name-base>
    4.99 -                    <build-prerequisite/>
   4.100 -                    <compile-dependency/>
   4.101 -                    <run-dependency>
   4.102 -                        <specification-version>6.7.1</specification-version>
   4.103 -                    </run-dependency>
   4.104 -                </dependency>
   4.105 -                <dependency>
   4.106 -                    <code-name-base>org.openide.util</code-name-base>
   4.107 -                    <build-prerequisite/>
   4.108 -                    <compile-dependency/>
   4.109 -                    <run-dependency>
   4.110 -                        <specification-version>6.8.1</specification-version>
   4.111 -                    </run-dependency>
   4.112 -                </dependency>
   4.113 -            </module-dependencies>
   4.114 -            <public-packages/>
   4.115 -        </data>
   4.116 -    </configuration>
   4.117 -</project>
     5.1 --- a/visualweb.designer.decoration/src/org/netbeans/modules/visualweb/designer/decoration/DecorationDemoSupport.java	Wed Feb 23 20:05:40 2011 -0500
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,348 +0,0 @@
     5.4 -/*
     5.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     5.6 - *
     5.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     5.8 - *
     5.9 - * The contents of this file are subject to the terms of either the GNU
    5.10 - * General Public License Version 2 only ("GPL") or the Common
    5.11 - * Development and Distribution License("CDDL") (collectively, the
    5.12 - * "License"). You may not use this file except in compliance with the
    5.13 - * License. You can obtain a copy of the License at
    5.14 - * http://www.netbeans.org/cddl-gplv2.html
    5.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    5.16 - * specific language governing permissions and limitations under the
    5.17 - * License.  When distributing the software, include this License Header
    5.18 - * Notice in each file and include the License file at
    5.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    5.20 - * particular file as subject to the "Classpath" exception as provided
    5.21 - * by Sun in the GPL Version 2 section of the License file that
    5.22 - * accompanied this code. If applicable, add the following below the
    5.23 - * License Header, with the fields enclosed by brackets [] replaced by
    5.24 - * your own identifying information:
    5.25 - * "Portions Copyrighted [year] [name of copyright owner]"
    5.26 - *
    5.27 - * Contributor(s):
    5.28 - *
    5.29 - * The Original Software is NetBeans. The Initial Developer of the Original
    5.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    5.31 - * Microsystems, Inc. All Rights Reserved.
    5.32 - *
    5.33 - * If you wish your version of this file to be governed by only the CDDL
    5.34 - * or only the GPL Version 2, indicate your decision by adding
    5.35 - * "[Contributor] elects to include this software in this distribution
    5.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
    5.37 - * single choice of license, a recipient has the option to distribute
    5.38 - * your version of this file under either the CDDL, the GPL Version 2 or
    5.39 - * to extend the choice of license to its licensees as provided above.
    5.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
    5.41 - * Version 2 license, then the option applies only if the new code is
    5.42 - * made subject to such option by the copyright holder.
    5.43 - */
    5.44 -
    5.45 -package org.netbeans.modules.visualweb.designer.decoration;
    5.46 -
    5.47 -import com.sun.rave.designtime.DesignBean;
    5.48 -import com.sun.rave.designtime.DesignContext;
    5.49 -import com.sun.rave.designtime.DesignProject;
    5.50 -import com.sun.rave.designtime.DesignProperty;
    5.51 -import com.sun.rave.designtime.faces.FacesDesignContext;
    5.52 -import java.util.logging.ConsoleHandler;
    5.53 -import java.util.logging.Handler;
    5.54 -import java.util.logging.Level;
    5.55 -import java.util.logging.Logger;
    5.56 -
    5.57 -/**
    5.58 - * XXX Decoration demo support only.
    5.59 - * It contains non-standard, hardcoded solutions to determine the back end
    5.60 - * design bean for corresponding front end bean.
    5.61 - * <p>
    5.62 - * This solution shouldn't be used in production code. For that purpose
    5.63 - * there should be designed appropriate api, which woudl provide the needed
    5.64 - * link (i.e. to be able to retrieve back end bean(s) for specific front end bean).
    5.65 - * </p>
    5.66 - *
    5.67 - * @author Peter Zavadsky
    5.68 - */
    5.69 -final class DecorationDemoSupport {
    5.70 -
    5.71 -    /** Logger used for this class. */
    5.72 -    private static final Logger logger = Logger.getLogger(DecorationDemoSupport.class.getName());
    5.73 -    
    5.74 -    static {
    5.75 -        initLogging();
    5.76 -    }
    5.77 -    
    5.78 -    /** XXX Some global support method would be needed. */
    5.79 -    private static void initLogging() {
    5.80 -        String prop = System.getProperty(DecorationDemoSupport.class.getName());
    5.81 -        if (prop == null) {
    5.82 -            return;
    5.83 -        }
    5.84 -        
    5.85 -        Level level = Level.parse(prop);
    5.86 -        logger.setLevel(level);
    5.87 -        
    5.88 -        // XXX Also the root handlers are needed to set (the console handlers).
    5.89 -        // TODO Probably better is to create and use local hanlder.
    5.90 -        Handler[] handlers = Logger.getLogger("").getHandlers(); // NOI18N
    5.91 -        for (int i = 0; i < handlers.length; i++) {
    5.92 -            Handler handler = handlers[i];
    5.93 -            if (handler instanceof ConsoleHandler) {
    5.94 -                // Be careful not to clash with others, this is a root handler.
    5.95 -                Level oldLevel = handler.getLevel();
    5.96 -                if (level.intValue() < oldLevel.intValue()) {
    5.97 -                    handler.setLevel(level);
    5.98 -                }
    5.99 -            }
   5.100 -        }
   5.101 -    }
   5.102 -    
   5.103 -    
   5.104 -    /** Creates a new instance of DecorationDemoSupport */
   5.105 -    private DecorationDemoSupport() {
   5.106 -    }
   5.107 -
   5.108 -    
   5.109 -    static DesignBean getDecorationBean(DesignBean designBean) {
   5.110 -        logger.fine("designBean=" + designBean); // NOI18N
   5.111 -        return findBackEndDesignBean(designBean);
   5.112 -    }
   5.113 -    
   5.114 -    private static DesignBean findBackEndDesignBean(DesignBean designBean) {
   5.115 -        while (designBean != null) {
   5.116 -            if (isBackEndDesignBean(designBean)) {
   5.117 -                break;
   5.118 -            } else {
   5.119 -                designBean = getBackingDesignBean(designBean);
   5.120 -            }
   5.121 -        }
   5.122 -        return designBean;
   5.123 -    }
   5.124 -    
   5.125 -    /** There has to be an API method for this. */
   5.126 -    private static boolean isBackEndDesignBean(DesignBean designBean) {
   5.127 -        logger.finer("is back end designBean=" + designBean); // NOI18N
   5.128 -        if (isRowSetDesignBean(designBean)) {
   5.129 -            logger.finer("true"); // NOI18N
   5.130 -            return true;
   5.131 -        }
   5.132 -        logger.finer("false"); // NOI18N
   5.133 -        return false;
   5.134 -    }
   5.135 -    
   5.136 -    private static DesignBean getBackingDesignBean(DesignBean designBean) {
   5.137 -        if (designBean == null) {
   5.138 -            return null;
   5.139 -        }
   5.140 -        
   5.141 -        DesignProperty backingDesignProperty = getBackingDesignProperty(designBean);
   5.142 -        if (backingDesignProperty != null) {
   5.143 -            return getBackingDesignBean(backingDesignProperty);
   5.144 -        }
   5.145 -
   5.146 -        DesignBean backingChildDesignBean = getBackingOwnerChildDesignBean(designBean);
   5.147 -        if (backingChildDesignBean == null) {
   5.148 -            return null;
   5.149 -        }
   5.150 -        return getBackingDesignBean(backingChildDesignBean);
   5.151 -    }
   5.152 -    
   5.153 -    /** There should be an API method for this, probably returning an array of backing properties. */
   5.154 -    private static DesignProperty getBackingDesignProperty(DesignBean designBean) {
   5.155 -        if (isTableRowGroupDesignBean(designBean)) {
   5.156 -            return designBean.getProperty("sourceData"); // NOI18N
   5.157 -        } else if (isListDesignBean(designBean)) {
   5.158 -            return designBean.getProperty("items"); // NOI18N
   5.159 -        } else if (isDropDownListDesignBean(designBean)) {
   5.160 -            return designBean.getProperty("items"); // NOI18N
   5.161 -        } else if (isDataProviderDesignBean(designBean)) {
   5.162 -            return designBean.getProperty("cachedRowSet"); // NOI18N
   5.163 -        }
   5.164 -        return null;
   5.165 -    }
   5.166 -    
   5.167 -    /** There should be an API method for this, returning an array or backing beans. */
   5.168 -    private static DesignBean getBackingDesignBean(DesignProperty designProperty) {
   5.169 -        String valueSource = designProperty.getValueSource();
   5.170 -        if (valueSource == null) {
   5.171 -            return null;
   5.172 -        }
   5.173 -        return getDesignBeanForValueSource(valueSource, designProperty.getDesignBean().getDesignContext().getProject());
   5.174 -    }
   5.175 -    
   5.176 -    /** There should be an API method for this. */
   5.177 -    private static DesignBean getBackingOwnerChildDesignBean(DesignBean designBean) {
   5.178 -        if (isTableDesignBean(designBean)) {
   5.179 -            DesignBean[] children = designBean.getChildBeans();
   5.180 -            for (int i = 0; i < children.length; i++) {
   5.181 -                DesignBean child = children[i];
   5.182 -                logger.fine("child[" + i + "]=" + child); // NOI18N
   5.183 -                if (isTableRowGroupDesignBean(child)) {
   5.184 -                    return child;
   5.185 -                }
   5.186 -            }
   5.187 -        }
   5.188 -        return null;
   5.189 -    }
   5.190 -    
   5.191 -    
   5.192 -    private static boolean isTableDesignBean(DesignBean designBean) {
   5.193 -        return isDesignBeanOfClassName(designBean, "com.sun.rave.web.ui.component.Table"); // NOI18N
   5.194 -    }
   5.195 -    
   5.196 -    private static boolean isTableRowGroupDesignBean(DesignBean designBean) {
   5.197 -        return isDesignBeanOfClassName(designBean, "com.sun.rave.web.ui.component.TableRowGroup"); // NOI18N
   5.198 -    }
   5.199 -
   5.200 -    private static boolean isListDesignBean(DesignBean designBean) {
   5.201 -        return isDesignBeanOfClassName(designBean, "com.sun.rave.web.ui.component.Listbox"); // NOI18N
   5.202 -    }
   5.203 -    
   5.204 -    private static boolean isDropDownListDesignBean(DesignBean designBean) {
   5.205 -        return isDesignBeanOfClassName(designBean, "com.sun.rave.web.ui.component.DropDown"); // NOI18N
   5.206 -    }
   5.207 -    
   5.208 -    private static boolean isDataProviderDesignBean(DesignBean designBean) {
   5.209 -        return isDesignBeanOfClassName(designBean, "com.sun.data.provider.impl.CachedRowSetDataProvider"); // NOI18N
   5.210 -    }
   5.211 -    
   5.212 -    private static boolean isRowSetDesignBean(DesignBean designBean) {
   5.213 -        return isDesignBeanOfClassName(designBean, "com.sun.sql.rowset.CachedRowSetXImpl"); // NOI18N
   5.214 -    }
   5.215 -    
   5.216 -    /** XXX Ugly method (string comparisons instead of class). */
   5.217 -    private static boolean isDesignBeanOfClassName(DesignBean designBean, String className) {
   5.218 -        if (designBean == null || className == null) {
   5.219 -            return false;
   5.220 -        }
   5.221 -        
   5.222 -        Object instance = designBean.getInstance();
   5.223 -        if (instance == null) {
   5.224 -            return false;
   5.225 -        }
   5.226 -        
   5.227 -        if (className.equals(instance.getClass().getName())) {
   5.228 -            return true;
   5.229 -        }
   5.230 -        return false;
   5.231 -    }
   5.232 -    
   5.233 -    private static DesignBean getDesignBeanForValueSource(String valueSource, DesignProject designProject) {
   5.234 -        if (valueSource == null || designProject == null) {
   5.235 -            return null;
   5.236 -        }
   5.237 -        
   5.238 -        String designContextName = getDesignContextNameFromValueSource(valueSource);
   5.239 -        logger.fine("\ndesignContextName=" + designContextName); // NOI18N
   5.240 -        if (designContextName == null) {
   5.241 -            return null;
   5.242 -        }
   5.243 -        
   5.244 -        DesignContext designContext = findDesignContext(designContextName, designProject);
   5.245 -        logger.fine("designContext=" + designContext); // NOI18N
   5.246 -        if (designContext == null) {
   5.247 -            return null;
   5.248 -        }
   5.249 -        
   5.250 -        String designBeanName = getDesignBeanNameFromValueSource(valueSource);
   5.251 -        logger.fine("designBeanName=" + designBeanName); // NOI18N
   5.252 -        if (designBeanName == null) {
   5.253 -            return null;
   5.254 -        }
   5.255 -        
   5.256 -        return findDesignBean(designBeanName, designContext);
   5.257 -    }
   5.258 -
   5.259 -    private static String getDesignContextNameFromValueSource(String valueSource) {
   5.260 -        if (valueSource == null) {
   5.261 -            return null;
   5.262 -        }
   5.263 -
   5.264 -        int hashBracket = valueSource.indexOf("#{"); // NOI18N
   5.265 -        if (hashBracket == -1) {
   5.266 -            return null;
   5.267 -        }
   5.268 -        
   5.269 -        // To get after the #{.
   5.270 -        hashBracket += 2;
   5.271 -        if (valueSource.length() < hashBracket) {
   5.272 -            return null;
   5.273 -        }
   5.274 -
   5.275 -        int dot = valueSource.indexOf('.', hashBracket);
   5.276 -        if (dot == -1) {
   5.277 -            return null;
   5.278 -        }
   5.279 -         
   5.280 -        return valueSource.substring(hashBracket, dot);
   5.281 -    }
   5.282 -
   5.283 -    private static String getDesignBeanNameFromValueSource(String valueSource) {
   5.284 -        if (valueSource == null) {
   5.285 -            return null;
   5.286 -        }
   5.287 -        
   5.288 -        int hashBracket = valueSource.indexOf("#{"); // NOI18N
   5.289 -        if (hashBracket == -1) {
   5.290 -            return null;
   5.291 -        }
   5.292 -        
   5.293 -        // To get after the #{.
   5.294 -        hashBracket += 2;
   5.295 -        if (valueSource.length() < hashBracket) {
   5.296 -            return null;
   5.297 -        }
   5.298 -
   5.299 -        int dot = valueSource.indexOf('.', hashBracket);
   5.300 -        if (dot == -1) {
   5.301 -            return null;
   5.302 -        }
   5.303 -        
   5.304 -        // To get after the dot.
   5.305 -        dot += 1;
   5.306 -        if (valueSource.length() < dot) {
   5.307 -            return null;
   5.308 -        }
   5.309 -        
   5.310 -        int bracket = valueSource.indexOf('}', dot);
   5.311 -        int nextDot = valueSource.indexOf('.', dot);
   5.312 -        if (bracket == -1 && nextDot == -1) {
   5.313 -            return null;
   5.314 -        }
   5.315 -        
   5.316 -        int nextChar;
   5.317 -        if (bracket == -1) {
   5.318 -            nextChar = nextDot;
   5.319 -        } else if (nextDot == -1) {
   5.320 -            nextChar = bracket;
   5.321 -        } else {
   5.322 -            nextChar = (bracket < nextDot ? bracket : nextDot);
   5.323 -        }
   5.324 -        
   5.325 -        return valueSource.substring(dot, nextChar);
   5.326 -    }
   5.327 -
   5.328 -    private static DesignContext findDesignContext(String designContextName, DesignProject designProject) {
   5.329 -        if (designContextName == null || designProject == null) {
   5.330 -            return null;
   5.331 -        }
   5.332 -        
   5.333 -        DesignContext[] designContexts = designProject.getDesignContexts();
   5.334 -        for (int i = 0; i < designContexts.length; i++) {
   5.335 -            DesignContext designContext = designContexts[i];
   5.336 -            // XXX getDisplayName? That usually implies localized name, but we need programatic name.
   5.337 -            if (designContextName.equals(designContext.getDisplayName())) {
   5.338 -                return designContext;
   5.339 -            }
   5.340 -        }
   5.341 -        return null;
   5.342 -    }
   5.343 -
   5.344 -    private static DesignBean findDesignBean(String designBeanName, DesignContext designContext) {
   5.345 -        if (designBeanName == null || designContext == null) {
   5.346 -            return null;
   5.347 -        }
   5.348 -        
   5.349 -        return designContext.getBeanByName(designBeanName);
   5.350 -    }
   5.351 -}
     6.1 --- a/visualweb.designer.decoration/src/org/netbeans/modules/visualweb/designer/decoration/DecorationProviderImpl.java	Wed Feb 23 20:05:40 2011 -0500
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,223 +0,0 @@
     6.4 -/*
     6.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     6.6 - *
     6.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     6.8 - *
     6.9 - * The contents of this file are subject to the terms of either the GNU
    6.10 - * General Public License Version 2 only ("GPL") or the Common
    6.11 - * Development and Distribution License("CDDL") (collectively, the
    6.12 - * "License"). You may not use this file except in compliance with the
    6.13 - * License. You can obtain a copy of the License at
    6.14 - * http://www.netbeans.org/cddl-gplv2.html
    6.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    6.16 - * specific language governing permissions and limitations under the
    6.17 - * License.  When distributing the software, include this License Header
    6.18 - * Notice in each file and include the License file at
    6.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    6.20 - * particular file as subject to the "Classpath" exception as provided
    6.21 - * by Sun in the GPL Version 2 section of the License file that
    6.22 - * accompanied this code. If applicable, add the following below the
    6.23 - * License Header, with the fields enclosed by brackets [] replaced by
    6.24 - * your own identifying information:
    6.25 - * "Portions Copyrighted [year] [name of copyright owner]"
    6.26 - *
    6.27 - * Contributor(s):
    6.28 - *
    6.29 - * The Original Software is NetBeans. The Initial Developer of the Original
    6.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    6.31 - * Microsystems, Inc. All Rights Reserved.
    6.32 - *
    6.33 - * If you wish your version of this file to be governed by only the CDDL
    6.34 - * or only the GPL Version 2, indicate your decision by adding
    6.35 - * "[Contributor] elects to include this software in this distribution
    6.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
    6.37 - * single choice of license, a recipient has the option to distribute
    6.38 - * your version of this file under either the CDDL, the GPL Version 2 or
    6.39 - * to extend the choice of license to its licensees as provided above.
    6.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
    6.41 - * Version 2 license, then the option applies only if the new code is
    6.42 - * made subject to such option by the copyright holder.
    6.43 - */
    6.44 -
    6.45 -
    6.46 -package org.netbeans.modules.visualweb.designer.decoration;
    6.47 -
    6.48 -
    6.49 -import org.netbeans.modules.visualweb.api.designtime.idebridge.DesigntimeIdeBridgeProvider;
    6.50 -import org.netbeans.modules.visualweb.api.insync.InSyncService;
    6.51 -import com.sun.rave.designtime.DesignBean;
    6.52 -import com.sun.rave.designtime.DesignContext;
    6.53 -import com.sun.rave.designtime.DesignProject;
    6.54 -import com.sun.rave.designtime.DesignProperty;
    6.55 -import com.sun.rave.designtime.DisplayAction;
    6.56 -import org.netbeans.modules.visualweb.insync.live.CustomizeAction;
    6.57 -import org.netbeans.modules.visualweb.spi.designer.Decoration;
    6.58 -import org.netbeans.modules.visualweb.spi.designer.DecorationProvider;
    6.59 -import java.awt.Image;
    6.60 -import java.awt.event.ActionEvent;
    6.61 -import java.beans.BeanInfo;
    6.62 -import java.util.logging.ConsoleHandler;
    6.63 -import java.util.logging.Handler;
    6.64 -import java.util.logging.Level;
    6.65 -import java.util.logging.Logger;
    6.66 -import javax.swing.AbstractAction;
    6.67 -import javax.swing.Action;
    6.68 -import javax.swing.ImageIcon;
    6.69 -import org.openide.nodes.Node;
    6.70 -import org.openide.util.Lookup;
    6.71 -import org.openide.util.Utilities;
    6.72 -import org.openide.util.actions.SystemAction;
    6.73 -import org.openide.util.lookup.Lookups;
    6.74 -import org.w3c.dom.Element;
    6.75 -
    6.76 -
    6.77 -/**
    6.78 - * Provider of <code>Decoration</code>s for specified <code>DesignBeans</code>.
    6.79 - * TODO Extract this impl from designer to individual module, impl some provider
    6.80 - * api defined in designer, and registered in the global lookup.
    6.81 - *
    6.82 - * @author Peter Zavadsky
    6.83 - */
    6.84 -@org.openide.util.lookup.ServiceProvider(service=org.netbeans.modules.visualweb.spi.designer.DecorationProvider.class)
    6.85 -public class DecorationProviderImpl implements DecorationProvider {
    6.86 -
    6.87 -    /** Logger used for this class. */
    6.88 -    private static final Logger logger = Logger.getLogger(DecorationProviderImpl.class.getName());
    6.89 -    
    6.90 -    static {
    6.91 -        initLogging();
    6.92 -    }
    6.93 -    
    6.94 -    /** XXX Some global support method would be needed. */
    6.95 -    private static void initLogging() {
    6.96 -        String prop = System.getProperty(DecorationProviderImpl.class.getName());
    6.97 -        if (prop == null) {
    6.98 -            return;
    6.99 -        }
   6.100 -        
   6.101 -        Level level = Level.parse(prop);
   6.102 -        logger.setLevel(level);
   6.103 -        
   6.104 -        // XXX Also the root handlers are needed to set (the console handlers).
   6.105 -        // TODO Probably better is to create and use local hanlder.
   6.106 -        Handler[] handlers = Logger.getLogger("").getHandlers(); // NOI18N
   6.107 -        for (int i = 0; i < handlers.length; i++) {
   6.108 -            Handler handler = handlers[i];
   6.109 -            if (handler instanceof ConsoleHandler) {
   6.110 -                // Be careful not to clash with others, this is a root handler.
   6.111 -                Level oldLevel = handler.getLevel();
   6.112 -                if (level.intValue() < oldLevel.intValue()) {
   6.113 -                    handler.setLevel(level);
   6.114 -                }
   6.115 -            }
   6.116 -        }
   6.117 -    }
   6.118 -
   6.119 -    
   6.120 -    public DecorationProviderImpl() {
   6.121 -    }
   6.122 -    
   6.123 -    public Decoration getDecoration(Element element) {
   6.124 -        if (element == null) {
   6.125 -            return null;
   6.126 -        }
   6.127 -        
   6.128 -        DesignBean designBean = InSyncService.getProvider().getMarkupDesignBeanForElement(element);
   6.129 -        if (designBean == null) {
   6.130 -            return null;
   6.131 -        }
   6.132 -        
   6.133 -        logger.fine("designBean=" + designBean);
   6.134 -        DesignBean decorationBean = getDecorationBean(designBean);
   6.135 -        logger.fine("decorationBean=" + decorationBean);
   6.136 -        if (decorationBean == null) {
   6.137 -//            if (logger.isLoggable(Level.FINE)) {
   6.138 -//                return getDecoration(designBean);
   6.139 -//            }
   6.140 -            return null;
   6.141 -        }
   6.142 -        
   6.143 -        return getDecoration(decorationBean);
   6.144 -    }
   6.145 -
   6.146 -    private static DesignBean getDecorationBean(DesignBean designBean) {
   6.147 -        // XXX Temporary, demo only impl.
   6.148 -        return DecorationDemoSupport.getDecorationBean(designBean);
   6.149 -    }
   6.150 -
   6.151 -    private static Decoration getDecoration(DesignBean decorationBean) {
   6.152 -        return new DefaultDecoration(decorationBean);
   6.153 -    }
   6.154 -    
   6.155 -    
   6.156 -    private static class DefaultDecoration implements Decoration {
   6.157 -
   6.158 -        private static final Action[] DEFAULT_ACTIONS = new Action[] {
   6.159 -            // XXX There shouldn't be a dep on insync.
   6.160 -            // TODO Other solution, e.g. to retrieve the actions via layers?
   6.161 -            SystemAction.get(CustomizeAction.class)
   6.162 -        };
   6.163 -        
   6.164 -        private final DesignBean designBean;
   6.165 -        
   6.166 -        public DefaultDecoration(DesignBean designBean) {
   6.167 -            this.designBean = designBean;
   6.168 -        }
   6.169 -
   6.170 -        public int getWidth() {
   6.171 -            Image image = getImage();
   6.172 -            if (image == null) {
   6.173 -                return 0;
   6.174 -            } else {
   6.175 -                // XXX
   6.176 -                return new ImageIcon(image).getIconWidth();
   6.177 -            }
   6.178 -        }
   6.179 -
   6.180 -        public int getHeight() {
   6.181 -            Image image = getImage();
   6.182 -            if (image == null) {
   6.183 -                return 0;
   6.184 -            } else {
   6.185 -                // XXX
   6.186 -                return new ImageIcon(image).getIconHeight();
   6.187 -            }
   6.188 -        }
   6.189 -
   6.190 -        public Image getImage() {
   6.191 -            Image image = Utilities.loadImage("org/netbeans/modules/visualweb/designer/decoration/resources/dbDecoration.png"); // NOI18N
   6.192 -            
   6.193 -            // XXX Fall back to the test impl.
   6.194 -            if (image == null) {
   6.195 -                image = designBean.getBeanInfo().getIcon(BeanInfo.ICON_COLOR_16x16);
   6.196 -                if (image != null) {
   6.197 -                    Image arrowImage = Utilities.loadImage(
   6.198 -                            "org/netbeans/modules/visualweb/designer/resources/blueLeftArrow.gif"); // NOI18N
   6.199 -                    image = Utilities.mergeImages(arrowImage, image, 16, 0);
   6.200 -                }
   6.201 -            }
   6.202 -            
   6.203 -            return image;
   6.204 -        }
   6.205 -
   6.206 -        public Action[] getActions() {
   6.207 -            return DEFAULT_ACTIONS;
   6.208 -        }
   6.209 -
   6.210 -        public Action getDefaultAction() {
   6.211 -            return DEFAULT_ACTIONS[0];
   6.212 -        }
   6.213 -
   6.214 -        public Lookup getContext() {
   6.215 -            Node node = DesigntimeIdeBridgeProvider.getDefault().getNodeRepresentation(designBean);
   6.216 -            if (node == null) {
   6.217 -                return Lookup.EMPTY;
   6.218 -            } else {
   6.219 -                return Lookups.singleton(node);
   6.220 -            }
   6.221 -        }
   6.222 -    } // End of DefaultDecoration.
   6.223 -
   6.224 -
   6.225 -}
   6.226 -
     7.1 --- a/visualweb.designer.decoration/src/org/netbeans/modules/visualweb/designer/decoration/resources/Bundle.properties	Wed Feb 23 20:05:40 2011 -0500
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,41 +0,0 @@
     7.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     7.5 -#
     7.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     7.7 -#
     7.8 -# The contents of this file are subject to the terms of either the GNU
     7.9 -# General Public License Version 2 only ("GPL") or the Common
    7.10 -# Development and Distribution License("CDDL") (collectively, the
    7.11 -# "License"). You may not use this file except in compliance with the
    7.12 -# License. You can obtain a copy of the License at
    7.13 -# http://www.netbeans.org/cddl-gplv2.html
    7.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    7.15 -# specific language governing permissions and limitations under the
    7.16 -# License.  When distributing the software, include this License Header
    7.17 -# Notice in each file and include the License file at
    7.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    7.19 -# particular file as subject to the "Classpath" exception as provided
    7.20 -# by Sun in the GPL Version 2 section of the License file that
    7.21 -# accompanied this code. If applicable, add the following below the
    7.22 -# License Header, with the fields enclosed by brackets [] replaced by
    7.23 -# your own identifying information:
    7.24 -# "Portions Copyrighted [year] [name of copyright owner]"
    7.25 -#
    7.26 -# Contributor(s):
    7.27 -#
    7.28 -# The Original Software is NetBeans. The Initial Developer of the Original
    7.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    7.30 -# Microsystems, Inc. All Rights Reserved.
    7.31 -#
    7.32 -# If you wish your version of this file to be governed by only the CDDL
    7.33 -# or only the GPL Version 2, indicate your decision by adding
    7.34 -# "[Contributor] elects to include this software in this distribution
    7.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
    7.36 -# single choice of license, a recipient has the option to distribute
    7.37 -# your version of this file under either the CDDL, the GPL Version 2 or
    7.38 -# to extend the choice of license to its licensees as provided above.
    7.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
    7.40 -# Version 2 license, then the option applies only if the new code is
    7.41 -# made subject to such option by the copyright holder.
    7.42 -
    7.43 -OpenIDE-Module-Name=Designer Decoration Provider Impl
    7.44 -OpenIDE-Module-Display-Category=Visual Web
     8.1 Binary file visualweb.designer.decoration/src/org/netbeans/modules/visualweb/designer/decoration/resources/dbDecoration.png has changed
     9.1 --- a/visualweb.project.importpage/build.xml	Wed Feb 23 20:05:40 2011 -0500
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,50 +0,0 @@
     9.4 -<?xml version="1.0" encoding="UTF-8"?>
     9.5 -<!--
     9.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     9.7 -
     9.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     9.9 -
    9.10 -
    9.11 -The contents of this file are subject to the terms of either the GNU
    9.12 -General Public License Version 2 only ("GPL") or the Common
    9.13 -Development and Distribution License("CDDL") (collectively, the
    9.14 -"License"). You may not use this file except in compliance with the
    9.15 -License. You can obtain a copy of the License at
    9.16 -http://www.netbeans.org/cddl-gplv2.html
    9.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    9.18 -specific language governing permissions and limitations under the
    9.19 -License.  When distributing the software, include this License Header
    9.20 -Notice in each file and include the License file at
    9.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    9.22 -particular file as subject to the "Classpath" exception as provided
    9.23 -by Sun in the GPL Version 2 section of the License file that
    9.24 -accompanied this code. If applicable, add the following below the
    9.25 -License Header, with the fields enclosed by brackets [] replaced by
    9.26 -your own identifying information:
    9.27 -"Portions Copyrighted [year] [name of copyright owner]"
    9.28 -
    9.29 -Contributor(s):
    9.30 -
    9.31 -The Original Software is NetBeans. The Initial Developer of the Original
    9.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    9.33 -Microsystems, Inc. All Rights Reserved.
    9.34 -
    9.35 -If you wish your version of this file to be governed by only the CDDL
    9.36 -or only the GPL Version 2, indicate your decision by adding
    9.37 -"[Contributor] elects to include this software in this distribution
    9.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
    9.39 -single choice of license, a recipient has the option to distribute
    9.40 -your version of this file under either the CDDL, the GPL Version 2 or
    9.41 -to extend the choice of license to its licensees as provided above.
    9.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
    9.43 -Version 2 license, then the option applies only if the new code is
    9.44 -made subject to such option by the copyright holder.
    9.45 --->
    9.46 -
    9.47 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
    9.48 -<!-- for some information on what you could do (e.g. targets to override). -->
    9.49 -<!-- If you delete this file and reopen the project it will be recreated. -->
    9.50 -<project name="contrib/visualweb.project.importpage" default="netbeans" basedir=".">
    9.51 -    <description>Builds, tests, and runs the project org.netbeans.modules.visualweb.project.importpage.</description>
    9.52 -    <import file="../../nbbuild/templates/projectized.xml"/>
    9.53 -</project>
    10.1 --- a/visualweb.project.importpage/manifest.mf	Wed Feb 23 20:05:40 2011 -0500
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,6 +0,0 @@
    10.4 -Manifest-Version: 1.0
    10.5 -OpenIDE-Module: org.netbeans.modules.visualweb.project.importpage
    10.6 -OpenIDE-Module-Layer: org/netbeans/modules/visualweb/project/importpage/resources/layer.xml
    10.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visualweb/project/importpage/resources/Bundle.properties
    10.8 -OpenIDE-Module-Specification-Version: 2.1
    10.9 -AutoUpdate-Show-In-Client: false
    11.1 --- a/visualweb.project.importpage/nbproject/project.properties	Wed Feb 23 20:05:40 2011 -0500
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,40 +0,0 @@
    11.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    11.5 -#
    11.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    11.7 -#
    11.8 -# The contents of this file are subject to the terms of either the GNU
    11.9 -# General Public License Version 2 only ("GPL") or the Common
   11.10 -# Development and Distribution License("CDDL") (collectively, the
   11.11 -# "License"). You may not use this file except in compliance with the
   11.12 -# License. You can obtain a copy of the License at
   11.13 -# http://www.netbeans.org/cddl-gplv2.html
   11.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   11.15 -# specific language governing permissions and limitations under the
   11.16 -# License.  When distributing the software, include this License Header
   11.17 -# Notice in each file and include the License file at
   11.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   11.19 -# particular file as subject to the "Classpath" exception as provided
   11.20 -# by Sun in the GPL Version 2 section of the License file that
   11.21 -# accompanied this code. If applicable, add the following below the
   11.22 -# License Header, with the fields enclosed by brackets [] replaced by
   11.23 -# your own identifying information:
   11.24 -# "Portions Copyrighted [year] [name of copyright owner]"
   11.25 -#
   11.26 -# Contributor(s):
   11.27 -#
   11.28 -# The Original Software is NetBeans. The Initial Developer of the Original
   11.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   11.30 -# Microsystems, Inc. All Rights Reserved.
   11.31 -#
   11.32 -# If you wish your version of this file to be governed by only the CDDL
   11.33 -# or only the GPL Version 2, indicate your decision by adding
   11.34 -# "[Contributor] elects to include this software in this distribution
   11.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   11.36 -# single choice of license, a recipient has the option to distribute
   11.37 -# your version of this file under either the CDDL, the GPL Version 2 or
   11.38 -# to extend the choice of license to its licensees as provided above.
   11.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   11.40 -# Version 2 license, then the option applies only if the new code is
   11.41 -# made subject to such option by the copyright holder.
   11.42 -javac.compilerargs=-Xlint:unchecked
   11.43 -javac.source=1.5
    12.1 --- a/visualweb.project.importpage/nbproject/project.xml	Wed Feb 23 20:05:40 2011 -0500
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,259 +0,0 @@
    12.4 -<?xml version="1.0" encoding="UTF-8"?>
    12.5 -<!--
    12.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    12.7 -
    12.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    12.9 -
   12.10 -
   12.11 -The contents of this file are subject to the terms of either the GNU
   12.12 -General Public License Version 2 only ("GPL") or the Common
   12.13 -Development and Distribution License("CDDL") (collectively, the
   12.14 -"License"). You may not use this file except in compliance with the
   12.15 -License. You can obtain a copy of the License at
   12.16 -http://www.netbeans.org/cddl-gplv2.html
   12.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   12.18 -specific language governing permissions and limitations under the
   12.19 -License.  When distributing the software, include this License Header
   12.20 -Notice in each file and include the License file at
   12.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   12.22 -particular file as subject to the "Classpath" exception as provided
   12.23 -by Sun in the GPL Version 2 section of the License file that
   12.24 -accompanied this code. If applicable, add the following below the
   12.25 -License Header, with the fields enclosed by brackets [] replaced by
   12.26 -your own identifying information:
   12.27 -"Portions Copyrighted [year] [name of copyright owner]"
   12.28 -
   12.29 -Contributor(s):
   12.30 -
   12.31 -The Original Software is NetBeans. The Initial Developer of the Original
   12.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   12.33 -Microsystems, Inc. All Rights Reserved.
   12.34 -
   12.35 -If you wish your version of this file to be governed by only the CDDL
   12.36 -or only the GPL Version 2, indicate your decision by adding
   12.37 -"[Contributor] elects to include this software in this distribution
   12.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
   12.39 -single choice of license, a recipient has the option to distribute
   12.40 -your version of this file under either the CDDL, the GPL Version 2 or
   12.41 -to extend the choice of license to its licensees as provided above.
   12.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
   12.43 -Version 2 license, then the option applies only if the new code is
   12.44 -made subject to such option by the copyright holder.
   12.45 --->
   12.46 -
   12.47 -<project xmlns="http://www.netbeans.org/ns/project/1">
   12.48 -    <type>org.netbeans.modules.apisupport.project</type>
   12.49 -    <configuration>
   12.50 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   12.51 -            <code-name-base>org.netbeans.modules.visualweb.project.importpage</code-name-base>
   12.52 -            <module-dependencies>
   12.53 -                <dependency>
   12.54 -                    <code-name-base>org.netbeans.modules.visualweb.api.designer</code-name-base>
   12.55 -                    <build-prerequisite/>
   12.56 -                    <compile-dependency/>
   12.57 -                    <run-dependency>
   12.58 -                        <release-version>1</release-version>
   12.59 -                        <specification-version>1.0</specification-version>
   12.60 -                    </run-dependency>
   12.61 -                </dependency>
   12.62 -                <dependency>
   12.63 -                    <code-name-base>org.netbeans.modules.visualweb.api.insync</code-name-base>
   12.64 -                    <build-prerequisite/>
   12.65 -                    <compile-dependency/>
   12.66 -                    <run-dependency>
   12.67 -                        <release-version>1</release-version>
   12.68 -                        <specification-version>1.0</specification-version>
   12.69 -                    </run-dependency>
   12.70 -                </dependency>
   12.71 -                <dependency>
   12.72 -                    <code-name-base>org.netbeans.modules.visualweb.designer.cssengine</code-name-base>
   12.73 -                    <build-prerequisite/>
   12.74 -                    <compile-dependency/>
   12.75 -                    <run-dependency>
   12.76 -                        <specification-version>1.0</specification-version>
   12.77 -                    </run-dependency>
   12.78 -                </dependency>
   12.79 -                <dependency>
   12.80 -                    <code-name-base>org.netbeans.modules.visualweb.designer.html</code-name-base>
   12.81 -                    <build-prerequisite/>
   12.82 -                    <compile-dependency/>
   12.83 -                    <run-dependency>
   12.84 -                        <specification-version>1.0</specification-version>
   12.85 -                    </run-dependency>
   12.86 -                </dependency>
   12.87 -                <dependency>
   12.88 -                    <code-name-base>org.netbeans.modules.visualweb.designer.markup</code-name-base>
   12.89 -                    <build-prerequisite/>
   12.90 -                    <compile-dependency/>
   12.91 -                    <run-dependency>
   12.92 -                        <release-version>1</release-version>
   12.93 -                        <specification-version>1.0</specification-version>
   12.94 -                    </run-dependency>
   12.95 -                </dependency>
   12.96 -                <dependency>
   12.97 -                    <code-name-base>org.netbeans.modules.visualweb.designtime</code-name-base>
   12.98 -                    <build-prerequisite/>
   12.99 -                    <compile-dependency/>
  12.100 -                    <run-dependency>
  12.101 -                        <release-version>1</release-version>
  12.102 -                        <specification-version>1.0.0</specification-version>
  12.103 -                    </run-dependency>
  12.104 -                </dependency>
  12.105 -                <dependency>
  12.106 -                    <code-name-base>org.netbeans.modules.visualweb.insync</code-name-base>
  12.107 -                    <build-prerequisite/>
  12.108 -                    <compile-dependency/>
  12.109 -                    <run-dependency>
  12.110 -                        <release-version>1</release-version>
  12.111 -                        <specification-version>1.0.5</specification-version>
  12.112 -                    </run-dependency>
  12.113 -                </dependency>
  12.114 -                <dependency>
  12.115 -                    <code-name-base>org.netbeans.modules.visualweb.jsfsupport.components</code-name-base>
  12.116 -                    <build-prerequisite/>
  12.117 -                    <compile-dependency/>
  12.118 -                    <run-dependency>
  12.119 -                        <specification-version>1.0</specification-version>
  12.120 -                    </run-dependency>
  12.121 -                </dependency>
  12.122 -                <dependency>
  12.123 -                    <code-name-base>org.netbeans.modules.servletjspapi</code-name-base>
  12.124 -                    <build-prerequisite/>
  12.125 -                    <compile-dependency/>
  12.126 -                    <run-dependency>
  12.127 -                        <release-version>1</release-version>
  12.128 -                        <specification-version>1.1</specification-version>
  12.129 -                    </run-dependency>
  12.130 -                </dependency>
  12.131 -                <dependency>
  12.132 -                    <code-name-base>org.netbeans.modules.web.jsf12</code-name-base>
  12.133 -                    <build-prerequisite/>
  12.134 -                    <compile-dependency/>
  12.135 -                    <run-dependency>
  12.136 -                        <release-version>1</release-version>
  12.137 -                        <specification-version>1.0</specification-version>
  12.138 -                    </run-dependency>
  12.139 -                </dependency>
  12.140 -                <dependency>
  12.141 -                    <code-name-base>org.netbeans.modules.visualweb.libs.jtidy</code-name-base>
  12.142 -                    <build-prerequisite/>
  12.143 -                    <compile-dependency/>
  12.144 -                    <run-dependency>
  12.145 -                        <release-version>1</release-version>
  12.146 -                        <specification-version>1.5</specification-version>
  12.147 -                    </run-dependency>
  12.148 -                </dependency>
  12.149 -                <dependency>
  12.150 -                    <code-name-base>org.netbeans.modules.visualweb.project.jsf</code-name-base>
  12.151 -                    <build-prerequisite/>
  12.152 -                    <compile-dependency/>
  12.153 -                    <run-dependency>
  12.154 -                        <release-version>1</release-version>
  12.155 -                        <specification-version>1.0</specification-version>
  12.156 -                    </run-dependency>
  12.157 -                </dependency>
  12.158 -                <dependency>
  12.159 -                    <code-name-base>org.netbeans.modules.visualweb.webui</code-name-base>
  12.160 -                    <build-prerequisite/>
  12.161 -                    <compile-dependency/>
  12.162 -                    <run-dependency>
  12.163 -                        <release-version>1</release-version>
  12.164 -                        <specification-version>1.0</specification-version>
  12.165 -                    </run-dependency>
  12.166 -                </dependency>
  12.167 -                <dependency>
  12.168 -                    <code-name-base>org.netbeans.modules.visualweb.xhtml</code-name-base>
  12.169 -                    <build-prerequisite/>
  12.170 -                    <compile-dependency/>
  12.171 -                    <run-dependency>
  12.172 -                        <specification-version>1.0</specification-version>
  12.173 -                    </run-dependency>
  12.174 -                </dependency>
  12.175 -                <dependency>
  12.176 -                    <code-name-base>org.netbeans.modules.visualweb.woodstock.webui.jsf</code-name-base>
  12.177 -                    <build-prerequisite/>
  12.178 -                    <compile-dependency/>
  12.179 -                    <run-dependency>
  12.180 -                        <specification-version>1.0</specification-version>
  12.181 -                    </run-dependency>
  12.182 -                </dependency>
  12.183 -                <dependency>
  12.184 -                    <code-name-base>org.netbeans.libs.xerces</code-name-base>
  12.185 -                    <build-prerequisite/>
  12.186 -                    <compile-dependency/>
  12.187 -                    <run-dependency>
  12.188 -                        <release-version>1</release-version>
  12.189 -                        <specification-version>1.8</specification-version>
  12.190 -                    </run-dependency>
  12.191 -                </dependency>
  12.192 -                <dependency>
  12.193 -                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
  12.194 -                    <build-prerequisite/>
  12.195 -                    <compile-dependency/>
  12.196 -                    <run-dependency>
  12.197 -                        <release-version>1</release-version>
  12.198 -                        <specification-version>1.9</specification-version>
  12.199 -                    </run-dependency>
  12.200 -                </dependency>
  12.201 -                <dependency>
  12.202 -                    <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
  12.203 -                    <build-prerequisite/>
  12.204 -                    <compile-dependency/>
  12.205 -                    <run-dependency>
  12.206 -                        <release-version>1</release-version>
  12.207 -                        <specification-version>1.13.0.5</specification-version>
  12.208 -                    </run-dependency>
  12.209 -                </dependency>
  12.210 -                <dependency>
  12.211 -                    <code-name-base>org.openide.dialogs</code-name-base>
  12.212 -                    <build-prerequisite/>
  12.213 -                    <compile-dependency/>
  12.214 -                    <run-dependency>
  12.215 -                        <specification-version>6.4</specification-version>
  12.216 -                    </run-dependency>
  12.217 -                </dependency>
  12.218 -                <dependency>
  12.219 -                    <code-name-base>org.openide.filesystems</code-name-base>
  12.220 -                    <build-prerequisite/>
  12.221 -                    <compile-dependency/>
  12.222 -                    <run-dependency>
  12.223 -                        <specification-version>7.19</specification-version>
  12.224 -                    </run-dependency>
  12.225 -                </dependency>
  12.226 -                <dependency>
  12.227 -                    <code-name-base>org.openide.io</code-name-base>
  12.228 -                    <build-prerequisite/>
  12.229 -                    <compile-dependency/>
  12.230 -                    <run-dependency>
  12.231 -                        <specification-version>1.9</specification-version>
  12.232 -                    </run-dependency>
  12.233 -                </dependency>
  12.234 -                <dependency>
  12.235 -                    <code-name-base>org.openide.loaders</code-name-base>
  12.236 -                    <build-prerequisite/>
  12.237 -                    <compile-dependency/>
  12.238 -                    <run-dependency>
  12.239 -                        <specification-version>5.9</specification-version>
  12.240 -                    </run-dependency>
  12.241 -                </dependency>
  12.242 -                <dependency>
  12.243 -                    <code-name-base>org.openide.nodes</code-name-base>
  12.244 -                    <build-prerequisite/>
  12.245 -                    <compile-dependency/>
  12.246 -                    <run-dependency>
  12.247 -                        <specification-version>6.7</specification-version>
  12.248 -                    </run-dependency>
  12.249 -                </dependency>
  12.250 -                <dependency>
  12.251 -                    <code-name-base>org.openide.util</code-name-base>
  12.252 -                    <build-prerequisite/>
  12.253 -                    <compile-dependency/>
  12.254 -                    <run-dependency>
  12.255 -                        <specification-version>6.8</specification-version>
  12.256 -                    </run-dependency>
  12.257 -                </dependency>
  12.258 -            </module-dependencies>
  12.259 -            <public-packages/>
  12.260 -        </data>
  12.261 -    </configuration>
  12.262 -</project>
    13.1 --- a/visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/Bundle.properties	Wed Feb 23 20:05:40 2011 -0500
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,106 +0,0 @@
    13.4 -#
    13.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    13.6 -#
    13.7 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    13.8 -#
    13.9 -# The contents of this file are subject to the terms of either the GNU
   13.10 -# General Public License Version 2 only ("GPL") or the Common
   13.11 -# Development and Distribution License("CDDL") (collectively, the
   13.12 -# "License"). You may not use this file except in compliance with the
   13.13 -# License. You can obtain a copy of the License at
   13.14 -# http://www.netbeans.org/cddl-gplv2.html
   13.15 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   13.16 -# specific language governing permissions and limitations under the
   13.17 -# License.  When distributing the software, include this License Header
   13.18 -# Notice in each file and include the License file at
   13.19 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   13.20 -# particular file as subject to the "Classpath" exception as provided
   13.21 -# by Sun in the GPL Version 2 section of the License file that
   13.22 -# accompanied this code. If applicable, add the following below the
   13.23 -# License Header, with the fields enclosed by brackets [] replaced by
   13.24 -# your own identifying information:
   13.25 -# "Portions Copyrighted [year] [name of copyright owner]"
   13.26 -#
   13.27 -# Contributor(s):
   13.28 -#
   13.29 -# The Original Software is NetBeans. The Initial Developer of the Original
   13.30 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   13.31 -# Microsystems, Inc. All Rights Reserved.
   13.32 -#
   13.33 -# If you wish your version of this file to be governed by only the CDDL
   13.34 -# or only the GPL Version 2, indicate your decision by adding
   13.35 -# "[Contributor] elects to include this software in this distribution
   13.36 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   13.37 -# single choice of license, a recipient has the option to distribute
   13.38 -# your version of this file under either the CDDL, the GPL Version 2 or
   13.39 -# to extend the choice of license to its licensees as provided above.
   13.40 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   13.41 -# Version 2 license, then the option applies only if the new code is
   13.42 -# made subject to such option by the copyright holder.
   13.43 -
   13.44 -#
   13.45 -
   13.46 -
   13.47 -
   13.48 -# ImportPagePanel
   13.49 -ImportWebPage=Web Page...
   13.50 -BrowseTitle=Select a Page to Import
   13.51 -AddExistingPage=Add Existing Web Page
   13.52 -ACSD_AddExistingPagePanel=Adds existing web page into the project.
   13.53 -FileOrURL=File or URL:
   13.54 -LBL_FileOrURL_Mnem=U
   13.55 -ACSD_FileOrURL=Specifies file or URL to import.
   13.56 -PageName=Page Name:
   13.57 -LBL_PageName_Mnem=P
   13.58 -ACSD_PageName=Specifies name of imported page.
   13.59 -Encoding=Input Encoding:
   13.60 -LBL_Encoding_Mnem=E
   13.61 -ACSD_Encoding=Choose encoding of the imported page.
   13.62 -UTF8=UTF-8
   13.63 -ASCII=ASCII
   13.64 -MacRoman=MacRoman
   13.65 -ISO2022=ISO 2022
   13.66 -Latin1=Latin 1
   13.67 -IncludeFiles=Include Supporting Files such as Images and Stylesheets
   13.68 -LBL_IncludeFiles_Mnem=N
   13.69 -ACSD_IncludeFiles=Specifies whether to import also supporting files (like images, stylesheets).
   13.70 -ConvertHtml=Convert HTML tags to JSF Components
   13.71 -LBL_ConvertHtml_Mnem=H
   13.72 -ACSD_ConvertHtml=Specifies whether to convert HTML tags into JSF components.
   13.73 -ConvertImages=Convert images (<img>)
   13.74 -LBL_ConvertImages_Mnem=I
   13.75 -ACSD_ConvertImages=Specifies whether to convert images (img tag).
   13.76 -ConvertForms=Convert form components (<form>, <input>, <select>, ...)
   13.77 -LBL_ConvertForms_Mnem=F
   13.78 -ACSD_ConvertForms=Specifies whether to convert form components (form, input, select etc. tags).
   13.79 -ImportFragment=Import As Page Fragment
   13.80 -LBL_ImportFragment_Mnem=M
   13.81 -ACSD_ImportFragment=Specifies whether to import the file as page fragment.
   13.82 -Browse=Browse...
   13.83 -LBL_BrowseButton_Mnem=B
   13.84 -ACSD_BrowseButton=Invokes a filechooser to pick a file.
   13.85 -
   13.86 -PageImportProgress=Importing Page... Please wait.
   13.87 -NoEmptyName=The Page Name field cannot be empty.
   13.88 -WrongFirstLetter=The Page Name must begin with a letter.
   13.89 -WrongPageName=The Page Name must be a valid Java class name.
   13.90 -NoSuchFile=The file name entered does not exist.
   13.91 -IsDirectory=The page must be in a single file, you cannot import a directory.
   13.92 -WrongExtension=Invalid extension: only HTML and JSP pages can be imported
   13.93 -ImportFailed=Import of the page failed. Check the var/log/messages.log file for more details.
   13.94 -URLAccessFailed=Accessing URL\n    {0}\nfailed.\n\nIf this is an external page, check your proxy settings\nin the Options dialog.
   13.95 -ParsingFailed=Parsing the file failed. The web form could not be imported.\nThe following messages from the parser may identify the problem:\n{0}\n
   13.96 -UsedName=A web page named {0} already exists in the project.\nDo you want to overwrite it?
   13.97 -NameUsed=Page name {0} is already used in the project
   13.98 -NoHtmlElement=No HTML element was found in the imported document - is it a valid HTML document?
   13.99 -JspConversionWarning=Warning: Old style JSP tags (<% %>) were converted to XML format.\nYou might also have to rewrite the code to work with JavaServer Faces technology.
  13.100 -
  13.101 -ResolutionNone=Any Size
  13.102 -Resolution640x480=640x480 (600x300 page)
  13.103 -Resolution800x600=800x600 (760x420 page)
  13.104 -Resolution1024x768=1024x768 (955x600 page)
  13.105 -Resolution1280x1024=1280x1024 (1210x856 page)
  13.106 -ResolutionCustom=Custom...
  13.107 -
  13.108 -NoSuchResource=No Such Resource Found
  13.109 -
    14.1 --- a/visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/Import.java	Wed Feb 23 20:05:40 2011 -0500
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,2938 +0,0 @@
    14.4 -/*
    14.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    14.6 - *
    14.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    14.8 - *
    14.9 - * The contents of this file are subject to the terms of either the GNU
   14.10 - * General Public License Version 2 only ("GPL") or the Common
   14.11 - * Development and Distribution License("CDDL") (collectively, the
   14.12 - * "License"). You may not use this file except in compliance with the
   14.13 - * License. You can obtain a copy of the License at
   14.14 - * http://www.netbeans.org/cddl-gplv2.html
   14.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   14.16 - * specific language governing permissions and limitations under the
   14.17 - * License.  When distributing the software, include this License Header
   14.18 - * Notice in each file and include the License file at
   14.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   14.20 - * particular file as subject to the "Classpath" exception as provided
   14.21 - * by Sun in the GPL Version 2 section of the License file that
   14.22 - * accompanied this code. If applicable, add the following below the
   14.23 - * License Header, with the fields enclosed by brackets [] replaced by
   14.24 - * your own identifying information:
   14.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   14.26 - *
   14.27 - * Contributor(s):
   14.28 - *
   14.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   14.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   14.31 - * Microsystems, Inc. All Rights Reserved.
   14.32 - *
   14.33 - * If you wish your version of this file to be governed by only the CDDL
   14.34 - * or only the GPL Version 2, indicate your decision by adding
   14.35 - * "[Contributor] elects to include this software in this distribution
   14.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   14.37 - * single choice of license, a recipient has the option to distribute
   14.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   14.39 - * to extend the choice of license to its licensees as provided above.
   14.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   14.41 - * Version 2 license, then the option applies only if the new code is
   14.42 - * made subject to such option by the copyright holder.
   14.43 - */
   14.44 -/*
   14.45 - * Import.java
   14.46 - *
   14.47 - * Created on February 13, 2007, 10:23 AM
   14.48 - *
   14.49 - * To change this template, choose Tools | Template Manager
   14.50 - * and open the template in the editor.
   14.51 - */
   14.52 -
   14.53 -package org.netbeans.modules.visualweb.project.importpage;
   14.54 -
   14.55 -import com.sun.rave.faces.data.DefaultSelectItemsArray;
   14.56 -import org.netbeans.modules.visualweb.designer.html.HtmlAttribute;
   14.57 -import org.netbeans.modules.visualweb.designer.html.HtmlTag;
   14.58 -import com.sun.rave.designtime.DesignBean;
   14.59 -import com.sun.rave.designtime.DesignContext;
   14.60 -import com.sun.rave.designtime.DesignProperty;
   14.61 -import com.sun.rave.designtime.markup.MarkupDesignBean;
   14.62 -import com.sun.rave.designtime.markup.MarkupPosition;
   14.63 -import java.beans.PropertyDescriptor;
   14.64 -import java.io.BufferedInputStream;
   14.65 -import java.io.BufferedOutputStream;
   14.66 -import java.io.File;
   14.67 -import java.util.List;
   14.68 -import java.io.IOException;
   14.69 -import java.io.InputStream;
   14.70 -import java.io.OutputStream;
   14.71 -import java.io.PrintWriter;
   14.72 -import java.io.StringBufferInputStream;
   14.73 -import java.io.StringReader;
   14.74 -import java.io.StringWriter;
   14.75 -import java.net.MalformedURLException;
   14.76 -import java.net.URL;
   14.77 -import java.util.ArrayList;
   14.78 -import java.util.Collections;
   14.79 -import java.util.HashMap;
   14.80 -import java.util.HashSet;
   14.81 -import java.util.Iterator;
   14.82 -import java.util.Map;
   14.83 -import java.util.Set;
   14.84 -import java.util.Vector;
   14.85 -import javax.faces.component.UIForm;
   14.86 -import javax.faces.component.UIGraphic;
   14.87 -import javax.faces.component.UISelectItems;
   14.88 -import javax.faces.component.html.HtmlCommandButton;
   14.89 -import javax.swing.SwingUtilities;
   14.90 -import javax.xml.parsers.DocumentBuilder;
   14.91 -import org.netbeans.modules.visualweb.api.designer.cssengine.CssProvider;
   14.92 -import org.netbeans.modules.visualweb.api.designer.cssengine.ResourceData;
   14.93 -import org.netbeans.modules.visualweb.api.designer.cssengine.ResourceData.UrlResourceData;
   14.94 -import org.netbeans.modules.visualweb.api.designer.cssengine.ResourceData.UrlStringsResourceData;
   14.95 -import org.netbeans.modules.visualweb.api.designer.cssengine.XhtmlCss;
   14.96 -import org.netbeans.modules.visualweb.api.designer.markup.MarkupService;
   14.97 -import org.netbeans.modules.visualweb.api.designerapi.DesignerServiceHack;
   14.98 -import org.netbeans.modules.visualweb.api.insync.InSyncService;
   14.99 -import org.netbeans.modules.visualweb.insync.UndoEvent;
  14.100 -import org.netbeans.modules.visualweb.insync.beans.Bean;
  14.101 -import org.netbeans.modules.visualweb.insync.faces.FacesBean;
  14.102 -import org.netbeans.modules.visualweb.insync.faces.MarkupBean;
  14.103 -import org.netbeans.modules.visualweb.insync.live.BeansDesignBean;
  14.104 -import org.netbeans.modules.visualweb.insync.live.LiveUnit;
  14.105 -import org.netbeans.modules.visualweb.insync.markup.MarkupUnit;
  14.106 -import org.netbeans.modules.visualweb.insync.models.FacesModel;
  14.107 -import org.netbeans.modules.visualweb.project.importpage.ImportPagePanel.StringBufferOutputStream;
  14.108 -import org.netbeans.modules.visualweb.project.jsf.api.AddResourceOverwriteDialog;
  14.109 -import org.netbeans.modules.visualweb.project.jsf.api.JsfProjectUtils;
  14.110 -import org.w3c.dom.NodeList;
  14.111 -import org.openide.DialogDisplayer;
  14.112 -import org.openide.ErrorManager;
  14.113 -import org.openide.LifecycleManager;
  14.114 -import org.openide.NotifyDescriptor;
  14.115 -import org.openide.cookies.OpenCookie;
  14.116 -import org.openide.filesystems.FileLock;
  14.117 -import org.openide.filesystems.FileObject;
  14.118 -import org.openide.filesystems.FileUtil;
  14.119 -import org.openide.loaders.DataFolder;
  14.120 -import org.openide.loaders.DataObject;
  14.121 -import org.openide.loaders.DataObjectNotFoundException;
  14.122 -import org.openide.util.NbBundle;
  14.123 -import org.w3c.dom.Attr;
  14.124 -import org.w3c.dom.Document;
  14.125 -import org.w3c.dom.Element;
  14.126 -import org.w3c.dom.NamedNodeMap;
  14.127 -import org.w3c.dom.Node;
  14.128 -import org.w3c.dom.Text;
  14.129 -import org.w3c.tidy.DOMDocumentImpl;
  14.130 -import org.w3c.tidy.Tidy;
  14.131 -
  14.132 -/**
  14.133 - * This was originally all implemented int ImportPagePanel.  In an effort to do a little refactoring I am pulling it apart.
  14.134 - *
  14.135 - * @author Tor Norbye
  14.136 - * refactoring by Joelle Lam
  14.137 - */
  14.138 -public class Import {
  14.139 -    
  14.140 -    ImportContext context;
  14.141 -    
  14.142 -    /** Creates a new instance of Import */
  14.143 -    public Import() {
  14.144 -    }
  14.145 -    
  14.146 -    private boolean convert = false;
  14.147 -    private int encoding;
  14.148 -    private boolean importImages;
  14.149 -    private boolean convertForms;
  14.150 -    
  14.151 -    /** The actual import method. Will create the web forms etc. */
  14.152 -    protected void doImport(String name, URL url, boolean includeResources, boolean convert, int encoding, boolean importImages, boolean convertForms, ImportContext context) {
  14.153 -        this.context = context;
  14.154 -        this.convert = convert;
  14.155 -        this.encoding = encoding;
  14.156 -        this.importImages = importImages;
  14.157 -        this.convertForms = convertForms;
  14.158 -        
  14.159 -        if (context.project == null) {
  14.160 -            return;
  14.161 -        }
  14.162 -        
  14.163 -        // Create files
  14.164 -        try {
  14.165 -            DataObject webroot = null;
  14.166 -            context.webformFile = DesignerServiceHack.getDefault().getCurrentFile();
  14.167 -            
  14.168 -            //            if (context.webformFile == null) {
  14.169 -            //                // XXX TODO I should ensure that I can pass in a null parent here
  14.170 -            //                // (to JsfProjectUtils.addResource) to place resources at the document
  14.171 -            //                // root!
  14.172 -            //            }
  14.173 -            
  14.174 -            try {
  14.175 -                webroot = DataObject.find(JsfProjectUtils.getDocumentRoot(context.project));
  14.176 -            } catch (DataObjectNotFoundException dnfe) {
  14.177 -                ErrorManager.getDefault().notify(dnfe);
  14.178 -            }
  14.179 -            
  14.180 -            context.copyResources = includeResources;
  14.181 -            
  14.182 -            DataFolder folderObj = (DataFolder)webroot;
  14.183 -            
  14.184 -            String tmpl;
  14.185 -            // XXX ToDo: These templates are for JSF 1.1 project, should consider JSF 1.2 as well.
  14.186 -            if (context.fragment) {
  14.187 -                tmpl = "Templates/JSP_Servlet/PageFragment.jspf"; // NOI18N
  14.188 -            } else {
  14.189 -                tmpl = "Templates/JSP_Servlet/Page.jsp"; // NOI18N
  14.190 -            }
  14.191 -            FileObject fo = FileUtil.getConfigFile(tmpl);
  14.192 -            
  14.193 -            if (fo == null) {
  14.194 -                throw new IOException("Can't find template FileObject for " + tmpl); // NOI18N
  14.195 -            }
  14.196 -            
  14.197 -            DataObject webformTemplate = DataObject.find(fo);
  14.198 -            DataObject webformDobj = webformTemplate.createFromTemplate(folderObj, name);
  14.199 -            context.webformDobj = webformDobj;
  14.200 -            context.webformFile = webformDobj.getPrimaryFile();
  14.201 -            
  14.202 -            // Now go and edit the heck out of it
  14.203 -            org.netbeans.modules.visualweb.insync.Util.retrieveDocument(webformDobj.getPrimaryFile(), true);
  14.204 -            
  14.205 -            // XXX TODO grab atomic lock
  14.206 -            Document cleanDoc = cleanup(url);
  14.207 -            context.parsedDocument = cleanDoc;
  14.208 -            
  14.209 -            if (cleanDoc == null) {
  14.210 -                return;
  14.211 -            }
  14.212 -            
  14.213 -            MarkupService.markJspxSource(cleanDoc);
  14.214 -            
  14.215 -            FacesModel model = FacesModel.getInstance(context.webformFile);
  14.216 -            if(model == null) {
  14.217 -                return;
  14.218 -            }
  14.219 -            //            WebForm webform = DesignerUtils.getWebForm(webformDobj, true);
  14.220 -            //
  14.221 -            //            if (webform == null) {
  14.222 -            //                return;
  14.223 -            //            }
  14.224 -            //
  14.225 -            //            context.webform = webform;
  14.226 -            
  14.227 -            // The rest of the import deals with insync models and has to happen
  14.228 -            // on the AWT thread (insync requirement)
  14.229 -            SwingUtilities.invokeLater(new Runnable() {
  14.230 -                public void run() {
  14.231 -                    try {
  14.232 -                        // The cursor change doesn't seem to have any effect:
  14.233 -                        //setCursor(org.openide.util.Utilities.createProgressCursor(ImportPagePanel.this));
  14.234 -                        
  14.235 -                        finishImportSafely();
  14.236 -                    } finally {
  14.237 -                        //setCursor(null);
  14.238 -                        clearContext();
  14.239 -                    }
  14.240 -                }
  14.241 -            });
  14.242 -        } catch (Exception ex) {
  14.243 -            ErrorManager.getDefault().notify(ex);
  14.244 -            
  14.245 -            String message = NbBundle.getMessage(ImportPagePanel.class, "ImportFailed"); // NOI18N
  14.246 -            NotifyDescriptor d = new NotifyDescriptor.Message(message);
  14.247 -            d.setMessageType(NotifyDescriptor.ERROR_MESSAGE);
  14.248 -            DialogDisplayer.getDefault().notify(d);
  14.249 -        }
  14.250 -    }
  14.251 -    
  14.252 -    
  14.253 -    private void clearContext() {
  14.254 -        context = null;
  14.255 -    }
  14.256 -    
  14.257 -    /** Given a URL to an online document or a file, read the file, parse it,
  14.258 -     * translate resource strings (and import the resources into the project in the process)
  14.259 -     * and returned the cleaned up dom contents.
  14.260 -     */
  14.261 -    private Document cleanup(URL resourceURL) {
  14.262 -        InputStream is = null;
  14.263 -        
  14.264 -        try {
  14.265 -            is = resourceURL.openStream();
  14.266 -        } catch (IOException e) {
  14.267 -            ErrorManager.getDefault().notify(e);
  14.268 -            
  14.269 -            String message =
  14.270 -                    NbBundle.getMessage(ImportPagePanel.class, "URLAccessFailed", resourceURL.toString()); // NOI18N
  14.271 -            NotifyDescriptor d = new NotifyDescriptor.Message(message);
  14.272 -            d.setMessageType(NotifyDescriptor.ERROR_MESSAGE);
  14.273 -            DialogDisplayer.getDefault().notify(d);
  14.274 -            
  14.275 -            return null;
  14.276 -        }
  14.277 -        
  14.278 -        try {
  14.279 -            String name = resourceURL.toString().toLowerCase();
  14.280 -            boolean isJsp =
  14.281 -                    name.endsWith(".jsp") || name.endsWith(".jspx") || // NOI18N
  14.282 -                    name.endsWith(".jspf"); // NOI18N
  14.283 -            Tidy tidy = getTidy(isJsp, encoding);
  14.284 -            Document dom = rewrite(tidy, is);
  14.285 -            
  14.286 -            if (dom == null) {
  14.287 -                return null;
  14.288 -            }
  14.289 -            
  14.290 -            Document target = null;
  14.291 -            
  14.292 -            try {
  14.293 -                org.xml.sax.InputSource is2 =
  14.294 -                        new org.xml.sax.InputSource(new StringReader(
  14.295 -                        "<jsp:root version=\"1.2\" xmlns:f=\"http://java.sun.com/jsf/core\" " +
  14.296 -                        "xmlns:h=\"http://java.sun.com/jsf/html\" xmlns:jsp=\"http://java.sun.com/JSP/Page\"><jsp:directive.page contentType=\"text/html;charset=UTF-8\"/><f:view/></jsp:root>"));
  14.297 -                
  14.298 -                // I do need CSS handling now that I'm parsing style elements
  14.299 -                boolean css = true;
  14.300 -                DocumentBuilder parser = MarkupService.createRaveSourceDocumentBuilder(css);
  14.301 -                target = parser.parse(is2);
  14.302 -            } catch (java.io.IOException e) {
  14.303 -                ErrorManager.getDefault().notify(e);
  14.304 -                
  14.305 -                return null;
  14.306 -            } catch (org.xml.sax.SAXException e) {
  14.307 -                ErrorManager.getDefault().notify(e);
  14.308 -                
  14.309 -                return null;
  14.310 -            } catch (javax.xml.parsers.ParserConfigurationException e) {
  14.311 -                ErrorManager.getDefault().notify(e);
  14.312 -                
  14.313 -                return null;
  14.314 -            }
  14.315 -            
  14.316 -            /*
  14.317 -            Node html = null;
  14.318 -            NodeList nl = dom.getChildNodes();
  14.319 -            for (int i = 0, n = nl.getLength(); i < n; i++) {
  14.320 -                Node node = nl.item(i);
  14.321 -                if (node instanceof Element) {
  14.322 -                    html = node;
  14.323 -                    break;
  14.324 -                }
  14.325 -            }
  14.326 -            if (html == null) {
  14.327 -                return null;
  14.328 -            }
  14.329 -             */
  14.330 -            
  14.331 -            //Node html = dom.getDocumentElement();
  14.332 -            NodeList children = (NodeList) dom.getElementsByTagName(HtmlTag.HTML.name);
  14.333 -            
  14.334 -            // jsp:root serves the same role when importing JSP documents:
  14.335 -            // contains name space lists etc.
  14.336 -            if (children.getLength() < 1) {
  14.337 -                children = dom.getElementsByTagName("jsp:root");
  14.338 -            }
  14.339 -            
  14.340 -            if (children.getLength() < 1) {
  14.341 -                String message = NbBundle.getMessage(ImportPagePanel.class, "NoHtmlElement"); // NOI18N
  14.342 -                NotifyDescriptor d = new NotifyDescriptor.Message(message);
  14.343 -                d.setMessageType(NotifyDescriptor.ERROR_MESSAGE);
  14.344 -                DialogDisplayer.getDefault().notify(d);
  14.345 -                
  14.346 -                return null;
  14.347 -            }
  14.348 -            
  14.349 -            Node html = children.item(0);
  14.350 -            
  14.351 -            // Strip xmlns stuff off the html element since it causes insync to fail
  14.352 -            // (Can't insert default form beans etc.)
  14.353 -            if (html.getNodeType() == Node.ELEMENT_NODE) {
  14.354 -                Element he = (Element)html;
  14.355 -                he.removeAttribute("xmlns"); // NOI18N
  14.356 -                
  14.357 -                NamedNodeMap nnm = he.getAttributes();
  14.358 -                int num = nnm.getLength();
  14.359 -                Map map = new HashMap();
  14.360 -                context.nameSpaces = map;
  14.361 -                
  14.362 -                // Look for other namespace attributes to duplicate to the
  14.363 -                // jsp root
  14.364 -                for (int i = 0; i < num; i++) {
  14.365 -                    Node a = nnm.item(i); // XXX move element.getAttributes out of loop
  14.366 -                    
  14.367 -                    String attribute = a.getNodeName();
  14.368 -                    if (attribute.startsWith("xmlns:")) { // NOI18N
  14.369 -                        map.put(attribute, a.getNodeValue());
  14.370 -                    }
  14.371 -                }
  14.372 -                
  14.373 -                Iterator it = map.keySet().iterator();
  14.374 -                while (it.hasNext()) {
  14.375 -                    String attribute = (String)it.next();
  14.376 -                    he.removeAttribute(attribute);
  14.377 -                }
  14.378 -            }
  14.379 -            
  14.380 -            // Do surgery to insert our own stuff
  14.381 -            children = target.getElementsByTagName("f:view"); // NOI18N
  14.382 -            
  14.383 -            if (children.getLength() < 1) {
  14.384 -                return null;
  14.385 -            }
  14.386 -            
  14.387 -            Element fview = (Element)children.item(0);
  14.388 -            Node copy = importNode(target, html);
  14.389 -            fview.appendChild(copy);
  14.390 -            
  14.391 -            // Hack
  14.392 -            Tidy.cleanEntities(copy, !isJsp);
  14.393 -            
  14.394 -            // Add taglibs from the top of the document
  14.395 -            if (dom instanceof DOMDocumentImpl) {
  14.396 -                //                List nodes =  ((DOMDocumentImpl) dom).getJspStartNodes();
  14.397 -                List<Node> nodes = ((DOMDocumentImpl)dom).getJspStartNodes();
  14.398 -                if( nodes != null ) {
  14.399 -                    for (Node node : nodes ){
  14.400 -                        String data = node.getNodeValue();
  14.401 -                        getJspxElementFromJsp(target, data);
  14.402 -                    }
  14.403 -                    //
  14.404 -                    //                if (nodes != null) {
  14.405 -                    //                    Iterator it = nodes.iterator();
  14.406 -                    //
  14.407 -                    //                    while (it.hasNext()) {
  14.408 -                    //                        Node node = (Node)it.next();
  14.409 -                    //                        String data = node.getNodeValue();
  14.410 -                    //                        getJspxElementFromJsp(target, data);
  14.411 -                    //
  14.412 -                    //                        // We don't use the nodes here since they are outside
  14.413 -                    //                        // the body, but as a side effect, the tagLibs list
  14.414 -                    //                        // may be modified
  14.415 -                    //                    }
  14.416 -                    //                }
  14.417 -                }
  14.418 -            }
  14.419 -            
  14.420 -            if (context.tagLibs != null) {
  14.421 -                int i = 0;
  14.422 -                Element jspRoot = target.getDocumentElement();
  14.423 -                
  14.424 -                while (i < context.tagLibs.size()) {
  14.425 -                    String xmlns = (String)context.tagLibs.get(i++);
  14.426 -                    String uri = (String)context.tagLibs.get(i++);
  14.427 -                    
  14.428 -                    if (!jspRoot.hasAttribute(xmlns)) {
  14.429 -                        jspRoot.setAttribute(xmlns, uri);
  14.430 -                    }
  14.431 -                }
  14.432 -            }
  14.433 -            
  14.434 -            context.fullUrl = resourceURL;
  14.435 -            context.base = computeBase(target, resourceURL);
  14.436 -            
  14.437 -            if (context.copyResources) {
  14.438 -                context.resources = new HashMap(50);
  14.439 -                int oldMode = AddResourceOverwriteDialog.getMode();
  14.440 -                try {
  14.441 -                    // Let users respond with "yes to all" or "no to all" on file conflicts
  14.442 -                    AddResourceOverwriteDialog.setMode(AddResourceOverwriteDialog.CONFLICT_ASK_MANY);
  14.443 -                    
  14.444 -                    copyResources(target.getDocumentElement());
  14.445 -                } finally {
  14.446 -                    AddResourceOverwriteDialog.setMode(oldMode);
  14.447 -                }
  14.448 -            }
  14.449 -            
  14.450 -            //String result = FacesSupport.getHtmlStream(target);
  14.451 -            //return result;
  14.452 -            return target;
  14.453 -        } finally {
  14.454 -            try {
  14.455 -                if (is != null) {
  14.456 -                    is.close();
  14.457 -                }
  14.458 -            } catch (IOException ioe) {
  14.459 -                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe);
  14.460 -            }
  14.461 -        }
  14.462 -    }
  14.463 -    
  14.464 -    
  14.465 -    
  14.466 -    /** The actual import method. Will create the web forms etc. */
  14.467 -    private void finishImportSafely() {
  14.468 -        assert SwingUtilities.isEventDispatchThread();
  14.469 -        
  14.470 -        try {
  14.471 -            FileObject webformFile = context.webformFile;
  14.472 -            FacesModel model = getModel(webformFile);
  14.473 -            
  14.474 -            if (model == null) {
  14.475 -                return;
  14.476 -            }
  14.477 -            
  14.478 -            // Ensure that we start off in a clean state
  14.479 -            model.sync();
  14.480 -            
  14.481 -            UndoEvent undoEvent = null;
  14.482 -            
  14.483 -            try {
  14.484 -                undoEvent = model.writeLock(null);
  14.485 -                
  14.486 -                // Copy pieces from the body and from the head into the corresponding places in the document
  14.487 -                insertPortions(context, context.parsedDocument);
  14.488 -                
  14.489 -                /*
  14.490 -                if (doc instanceof BaseDocument)
  14.491 -                    ((BaseDocument)doc).atomicLock();
  14.492 -                try {
  14.493 -                 
  14.494 -                    String cleanedup = cleanup(url);
  14.495 -                    if (cleanedup == null) {
  14.496 -                        return;
  14.497 -                    }
  14.498 -                 
  14.499 -                    doc.remove(0, doc.getLength());
  14.500 -                    doc.insertString(0, cleanedup, null);
  14.501 -                } catch (Exception e) {
  14.502 -                    ErrorManager.getDefault().notify(e);
  14.503 -                } finally {
  14.504 -                    if (doc instanceof BaseDocument)
  14.505 -                        ((BaseDocument)doc).atomicUnlock();
  14.506 -                }
  14.507 -                 */
  14.508 -                if (convert) {
  14.509 -                    convertCompsToJsf(context);
  14.510 -                }
  14.511 -            } finally {
  14.512 -                model.writeUnlock(undoEvent);
  14.513 -            }
  14.514 -            
  14.515 -            // Force a global element rebuild. This is necessary to ensure that
  14.516 -            // all the source<->render references are correct since we've been
  14.517 -            // doing surgery on the DOM. Without this, you might for example
  14.518 -            // import the Sun homepage, but you can't click on text nodes and
  14.519 -            // have the caret position itself inside the word until you hit Refresh.
  14.520 -            // This MAY be related to
  14.521 -            //  http://jupiter.czech.sun.com/wiki/view/Creator/InSyncAi1067
  14.522 -            // <move> XXX Bad API.
  14.523 -            //            webform.getActions().refresh(true);
  14.524 -            // ====
  14.525 -            //            DesignerServiceHack.getDefault().refresh(null, context.webformDobj, true);
  14.526 -            //            DesignerServiceHack.getDefault().refreshDataObject(context.webformDobj, true);
  14.527 -            // There is needed to refresh only the insync part, designer is not opened yet.
  14.528 -            model.refresh(true);
  14.529 -            // </move>
  14.530 -            
  14.531 -            
  14.532 -            OpenCookie open = (OpenCookie)context.webformDobj.getCookie(OpenCookie.class);
  14.533 -            
  14.534 -            if (open != null) {
  14.535 -                open.open();
  14.536 -            }
  14.537 -            
  14.538 -            if (context.haveOldJsp) {
  14.539 -                //                InSyncService.getProvider().getRaveErrorHandler().displayError(NbBundle.getMessage(ImportPagePanel.class,
  14.540 -                //                        "JspConversionWarning")); // NOI18N
  14.541 -                IllegalStateException ex = new IllegalStateException("Old jsp"); // NOI18N
  14.542 -                Throwable th = ErrorManager.getDefault().annotate(ex, NbBundle.getMessage(ImportPagePanel.class, "JspConversionWarning"));
  14.543 -                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, th);
  14.544 -            }
  14.545 -        } catch (Exception ex) {
  14.546 -            ErrorManager.getDefault().notify(ex);
  14.547 -            
  14.548 -            String message = NbBundle.getMessage(ImportPagePanel.class, "ImportFailed"); // NOI18N
  14.549 -            NotifyDescriptor d = new NotifyDescriptor.Message(message);
  14.550 -            d.setMessageType(NotifyDescriptor.ERROR_MESSAGE);
  14.551 -            DialogDisplayer.getDefault().notify(d);
  14.552 -        }
  14.553 -    }
  14.554 -    
  14.555 -    
  14.556 -    private static Tidy getTidy(boolean isJsp, int encoding) {
  14.557 -        // Set configuration settings
  14.558 -        Tidy tidy = new Tidy();
  14.559 -        tidy.setOnlyErrors(false);
  14.560 -        tidy.setShowWarnings(true);
  14.561 -        tidy.setQuiet(false);
  14.562 -        tidy.getConfiguration().outputJspMode = true;
  14.563 -        tidy.getConfiguration().inputJspMode = isJsp;
  14.564 -        
  14.565 -        //        int encoding = getEncoding();
  14.566 -        
  14.567 -        if (encoding != -1) {
  14.568 -            tidy.setCharEncoding(encoding);
  14.569 -        }
  14.570 -        
  14.571 -        // XXX Apparently JSP pages (at least those involving
  14.572 -        // JSF) need XML handling in order for JTidy not to choke on them
  14.573 -        tidy.setXmlTags(false);
  14.574 -        
  14.575 -        tidy.setXHTML(true); // XXX ?
  14.576 -        
  14.577 -        //tidy.setMakeClean(panel.getReplace());
  14.578 -        //tidy.setIndentContent(panel.getIndent());
  14.579 -        //tidy.setSmartIndent(panel.getIndent());
  14.580 -        //tidy.setUpperCaseTags(panel.getUpper());
  14.581 -        //tidy.setHideEndTags(panel.getOmit());
  14.582 -        //tidy.setWraplen(panel.getWrapCol());
  14.583 -        return tidy;
  14.584 -    }
  14.585 -    
  14.586 -    
  14.587 -    
  14.588 -    
  14.589 -    
  14.590 -    private static org.w3c.dom.Document rewrite(Tidy tidy, InputStream input) {
  14.591 -        StringBuffer sb = new StringBuffer(4000);
  14.592 -        OutputStream output = new StringBufferOutputStream(sb);
  14.593 -        
  14.594 -        //tidy.parse(input, output);
  14.595 -        StringWriter sw = new StringWriter();
  14.596 -        tidy.setErrout(new PrintWriter(sw));
  14.597 -        
  14.598 -        /* Show NetBeans output window with the errors? But how do I get an
  14.599 -         * output stream from the output writer?
  14.600 -                InputOutput io = IOProvider.getDefault().getStdOut();
  14.601 -                OutputWriter out = io.getOut();
  14.602 -                OutputStreamWriter
  14.603 -         */
  14.604 -        boolean escape =
  14.605 -                tidy.getConfiguration().outputJspMode && !tidy.getConfiguration().inputJspMode;
  14.606 -        org.w3c.dom.Document document =
  14.607 -                tidy.parseDOM(new Tidy.EntityWrapperInputStream(input),
  14.608 -                new Tidy.EntityWrapperOutputStream(output, escape));
  14.609 -        
  14.610 -        /* The Tidy DOM implementation sucks - it throws not implemented
  14.611 -           exceptions for CharacterData methods etc., so we call this on
  14.612 -           the duplicated node tree instead
  14.613 -        if (document != null) {
  14.614 -            tidy.cleanEntities(document, escape);
  14.615 -        }
  14.616 -         */
  14.617 -        
  14.618 -        //return sb.toString();
  14.619 -        if (document == null) {
  14.620 -            String message =
  14.621 -                    NbBundle.getMessage(ImportPagePanel.class, "ParsingFailed",
  14.622 -                    sb.toString() + "\n" + sw.getBuffer().toString()); // NOI18N
  14.623 -            NotifyDescriptor d = new NotifyDescriptor.Message(message);
  14.624 -            d.setMessageType(NotifyDescriptor.ERROR_MESSAGE);
  14.625 -            DialogDisplayer.getDefault().notify(d);
  14.626 -        }
  14.627 -        
  14.628 -        return document;
  14.629 -    }
  14.630 -    
  14.631 -    
  14.632 -    /** Import the given node into this document (but don't parent it).
  14.633 -     * For some freakin' reason, Xerces throws NPEs when I try to import nodes
  14.634 -     * from JTidy's DOM. Not sure why; perhaps its the namespace stuff that's
  14.635 -     * improperly implemented in JTidy's DOM implementation.
  14.636 -     */
  14.637 -    private Node importNode(Document target, Node node) {
  14.638 -        // Can't just use DOM's own method - xerces barfs:
  14.639 -        //return target.getDocumentElement().appendChild(target.importNode(node, true));
  14.640 -        Node curr = null;
  14.641 -        
  14.642 -        switch (node.getNodeType()) {
  14.643 -        case Node.ELEMENT_NODE:
  14.644 -            
  14.645 -            Element e = (Element)node;
  14.646 -            Element ec = target.createElement(e.getTagName());
  14.647 -            curr = ec;
  14.648 -            
  14.649 -            // Copy attributes
  14.650 -            int num = e.getAttributes().getLength();
  14.651 -            
  14.652 -            for (int i = 0; i < num; i++) {
  14.653 -                Node a = e.getAttributes().item(i);
  14.654 -                ec.setAttribute(a.getNodeName(), a.getNodeValue());
  14.655 -            }
  14.656 -            
  14.657 -            break;
  14.658 -            
  14.659 -        case Node.TEXT_NODE:
  14.660 -            curr = target.createTextNode(node.getNodeValue());
  14.661 -            
  14.662 -            break;
  14.663 -            
  14.664 -        case Node.ENTITY_REFERENCE_NODE:
  14.665 -            curr = target.createEntityReference(node.getNodeValue());
  14.666 -            
  14.667 -            break;
  14.668 -            
  14.669 -        case Node.ENTITY_NODE:
  14.670 -            
  14.671 -            // We won't copy the entity into our document
  14.672 -            break;
  14.673 -            
  14.674 -        case Node.COMMENT_NODE:
  14.675 -            curr = target.createComment(node.getNodeValue());
  14.676 -            
  14.677 -            break;
  14.678 -            
  14.679 -        case Node.CDATA_SECTION_NODE:
  14.680 -            curr = target.createCDATASection(node.getNodeValue());
  14.681 -            
  14.682 -            break;
  14.683 -            
  14.684 -            // XXX what to do, what to do?
  14.685 -            //break;
  14.686 -        case 115: // XXX special hack. See  org.w3c.tidy.DOMNodeImpl's getNodeType()
  14.687 -            
  14.688 -            String data = node.getNodeValue();
  14.689 -            curr = getJspxElementFromJsp(target, data);
  14.690 -            
  14.691 -            break;
  14.692 -            
  14.693 -        case Node.ATTRIBUTE_NODE:
  14.694 -        case Node.PROCESSING_INSTRUCTION_NODE:
  14.695 -        case Node.DOCUMENT_NODE:
  14.696 -        case Node.DOCUMENT_TYPE_NODE:
  14.697 -        case Node.DOCUMENT_FRAGMENT_NODE:
  14.698 -        case Node.NOTATION_NODE:default:
  14.699 -            
  14.700 -            // TODO - check for other character data, ... others?
  14.701 -            ErrorManager.getDefault().log("Not processing node " + node);
  14.702 -        }
  14.703 -        
  14.704 -        NodeList nl = node.getChildNodes();
  14.705 -        
  14.706 -        for (int i = 0, n = nl.getLength(); i < n; i++) {
  14.707 -            Node child = importNode(target, nl.item(i));
  14.708 -            
  14.709 -            if (child != null) {
  14.710 -                curr.appendChild(child);
  14.711 -            }
  14.712 -        }
  14.713 -        
  14.714 -        return curr;
  14.715 -    }
  14.716 -    
  14.717 -    
  14.718 -    
  14.719 -    /*
  14.720 -     * Convert:
  14.721 -     * <pre>
  14.722 -        Regular JSP page          JSP Document
  14.723 -        <%@ page attribute list %>         <jsp:directive.page attribute list />
  14.724 -        <%@ include file="path" %>         <jsp:directive.include file="path" />
  14.725 -        <%! declaration %>         <jsp:declaration>declaration</jsp:declaration>
  14.726 -        <%= expression %>         <jsp:expression>expression</jsp:expression>
  14.727 -        <% scriptlet %>         <jsp:scriptlet>scriptlet</jsp:scriptlet>
  14.728 -     </pre>
  14.729 -     *
  14.730 -     */
  14.731 -    private Node getJspxElementFromJsp(Document document, String data) {
  14.732 -        context.haveOldJsp = true;
  14.733 -        
  14.734 -        if (data.startsWith("@")) {
  14.735 -            // Look for taglib
  14.736 -            String s = data;
  14.737 -            
  14.738 -            if (s.startsWith("@ taglib ")) {
  14.739 -                // taglib
  14.740 -                // Find prefix and uri
  14.741 -                int n = s.length();
  14.742 -                int prefix = s.indexOf(" prefix=\"");
  14.743 -                int uri = s.indexOf(" uri=\"");
  14.744 -                
  14.745 -                if ((prefix != -1) && (uri != -1)) {
  14.746 -                    StringBuffer p = new StringBuffer();
  14.747 -                    
  14.748 -                    for (int i = prefix + 9; i < n; i++) {
  14.749 -                        char c = s.charAt(i);
  14.750 -                        
  14.751 -                        if ((c == '"') || !Character.isLetter(c)) {
  14.752 -                            break;
  14.753 -                        }
  14.754 -                        
  14.755 -                        p.append(c);
  14.756 -                    }
  14.757 -                    
  14.758 -                    StringBuffer u = new StringBuffer();
  14.759 -                    
  14.760 -                    for (int i = uri + 6; i < n; i++) {
  14.761 -                        if (s.charAt(i) == '"') {
  14.762 -                            break;
  14.763 -                        }
  14.764 -                        
  14.765 -                        u.append(s.charAt(i));
  14.766 -                    }
  14.767 -                    
  14.768 -                    if ((p.length() > 0) && (u.length() > 0)) {
  14.769 -                        String xmlns = "xmlns:" + p.toString(); // NOI18N
  14.770 -                        
  14.771 -                        if (context.tagLibs == null) {
  14.772 -                            context.tagLibs = new ArrayList();
  14.773 -                        }
  14.774 -                        
  14.775 -                        context.tagLibs.add(xmlns);
  14.776 -                        context.tagLibs.add(u.toString());
  14.777 -                        
  14.778 -                        /*
  14.779 -                        if (!jspRoot.hasAttribute(xmlns)) {
  14.780 -                            jspRoot.setAttribute(xmlns, u.toString());
  14.781 -                        }
  14.782 -                         */
  14.783 -                    }
  14.784 -                }
  14.785 -                
  14.786 -                // TODO: }  else if (s.startsWith("@ include ")) {
  14.787 -            } else if (s.startsWith("@ page ")) {
  14.788 -                // Find the attribute list
  14.789 -                // XXX. this is wrong, I should change this to do arbitrary attribute list conversion
  14.790 -                int n = s.length();
  14.791 -                int imp = s.indexOf(" import=\"");
  14.792 -                
  14.793 -                if (imp != -1) {
  14.794 -                    StringBuffer p = new StringBuffer();
  14.795 -                    
  14.796 -                    for (int i = imp + 9; i < n; i++) {
  14.797 -                        char c = s.charAt(i);
  14.798 -                        
  14.799 -                        if ((c == '"') || !Character.isLetter(c)) {
  14.800 -                            break;
  14.801 -                        }
  14.802 -                        
  14.803 -                        p.append(c);
  14.804 -                    }
  14.805 -                    
  14.806 -                    if (p.length() > 0) {
  14.807 -                        Element e = document.createElement("jsp:directive.page");
  14.808 -                        e.setAttribute("import", p.toString());
  14.809 -                        
  14.810 -                        return e;
  14.811 -                    }
  14.812 -                }
  14.813 -            }
  14.814 -        } else if (data.startsWith("!")) {
  14.815 -            Element e = document.createElement("jsp:declaration");
  14.816 -            e.appendChild(document.createTextNode(data.substring(1))); // skip !
  14.817 -            
  14.818 -            return e;
  14.819 -        } else if (data.startsWith("=")) {
  14.820 -            Element e = document.createElement("jsp:expression");
  14.821 -            e.appendChild(document.createTextNode(data.substring(1))); // skip !
  14.822 -            
  14.823 -            return e;
  14.824 -        } else {
  14.825 -            // Just a scriptlet
  14.826 -            Element e = document.createElement("jsp:scriptlet");
  14.827 -            e.appendChild(document.createTextNode(data));
  14.828 -            
  14.829 -            return e;
  14.830 -        }
  14.831 -        
  14.832 -        return null;
  14.833 -    }
  14.834 -    
  14.835 -    
  14.836 -    
  14.837 -    /**
  14.838 -     * Returns the location to resolve relative URLs against.  By
  14.839 -     * default this will be the document's URL if the document
  14.840 -     * was loaded from a URL.  If a base tag is found and
  14.841 -     * can be parsed, it will be used as the base location.
  14.842 -     *
  14.843 -     * @return the base location
  14.844 -     */
  14.845 -    public URL computeBase(Document document, URL fullUrl) {
  14.846 -        // First see if we have a <base> tag within the <head>
  14.847 -        URL base = null;
  14.848 -        
  14.849 -        // TODO - gather ALL <base> elements within the head
  14.850 -        // and process them
  14.851 -        Element root = document.getDocumentElement();
  14.852 -        Element html = findHtmlTag(root);
  14.853 -        
  14.854 -        if (html != null) {
  14.855 -            Element head = findElement(HtmlTag.HEAD.name, html);
  14.856 -            
  14.857 -            if (head != null) {
  14.858 -                Element baseElement = findElement(HtmlTag.BASE.name, head);
  14.859 -                
  14.860 -                if (baseElement != null) {
  14.861 -                    String href = baseElement.getAttribute(HtmlAttribute.HREF);
  14.862 -                    
  14.863 -                    if ((href != null) && (href.length() > 0)) {
  14.864 -                        try {
  14.865 -                            base = new URL(href);
  14.866 -                            
  14.867 -                            return base;
  14.868 -                        } catch (MalformedURLException ex) {
  14.869 -                            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
  14.870 -                        }
  14.871 -                    }
  14.872 -                }
  14.873 -            }
  14.874 -        }
  14.875 -        
  14.876 -        // No <base>, so use the URL of the document file itself
  14.877 -        // and use that to resolve relative URLs.
  14.878 -        // However, we can't simply strip off the basename and use that
  14.879 -        // as the base, because of "ambiguous" urls, such as
  14.880 -        // 'http://wwws.sun.com/software/products/jscreator'. The REAL
  14.881 -        // URL to the resource is
  14.882 -        // 'http://wwws.sun.com/software/products/jscreator/index.html'
  14.883 -        // but we don't know that -- the HTTP server on the receiving end
  14.884 -        // will check if the pointed to URL is really a directory, and if
  14.885 -        // so pick a default file (typically index.html) within it.
  14.886 -        // Unfortunately it's hard for me to detect if this is the case.
  14.887 -        // I thought I could just try to add "/index.html" to the given
  14.888 -        // URL and see if that "exists", but that won't work either --
  14.889 -        // the web server will redirect this request to some other page
  14.890 -        // (perhaps an error page) and serve that back, and I can't tell
  14.891 -        // that content from regular content. So instead the caller will
  14.892 -        // simply have to use the fullURL as a "backup" url to try
  14.893 -        // when copying a resource fails.
  14.894 -        try {
  14.895 -            String file = new File(fullUrl.getFile()).getParent() + "/";
  14.896 -            base = new URL(fullUrl.getProtocol(), fullUrl.getHost(), fullUrl.getPort(), file);
  14.897 -        } catch (MalformedURLException e) {
  14.898 -            ErrorManager.getDefault().notify(e);
  14.899 -        }
  14.900 -        
  14.901 -        return base;
  14.902 -    }
  14.903 -    
  14.904 -    
  14.905 -    
  14.906 -    /** Copy the resources from the given URL to the given project */
  14.907 -    private void copyResources(Node node) {
  14.908 -        // TODO: iterate over the DOM, looking for resources I should copy,
  14.909 -        // and rewrite the URLs if necessary and copy the resource
  14.910 -        if (!(node instanceof Element)) {
  14.911 -            return;
  14.912 -        }
  14.913 -        
  14.914 -        Element element = (Element)node;
  14.915 -        String tag = element.getTagName();
  14.916 -        
  14.917 -        // What about jsp include??
  14.918 -        if (HtmlTag.IMG.name.equals(tag)) {
  14.919 -            copyResource(element, HtmlAttribute.SRC);
  14.920 -        } else if (HtmlTag.SCRIPT.name.equals(tag) &&
  14.921 -                (element.getAttribute(HtmlAttribute.SRC).length() > 0)) {
  14.922 -            copyResource(element, HtmlAttribute.SRC);
  14.923 -        } else if (HtmlTag.STYLE.name.equals(tag)) {
  14.924 -            handleStyleSheet(0, element, null);
  14.925 -        } else if (HtmlTag.LINK.name.equals(tag) &&
  14.926 -                "stylesheet".equalsIgnoreCase(element.getAttribute(HtmlAttribute.REL))) { // NOI18N
  14.927 -            handleStyleSheet(0, element, HtmlAttribute.HREF);
  14.928 -        } else if (HtmlTag.INPUT.name.equals(tag) &&
  14.929 -                "image".equals(element.getAttribute(HtmlAttribute.TYPE))) { // NOI18N
  14.930 -            copyResource(element, HtmlAttribute.SRC);
  14.931 -        } else if (HtmlTag.OBJECT.name.equals(tag) &&
  14.932 -                (element.getAttribute(HtmlAttribute.SRC).length() > 0)) {
  14.933 -            copyResource(element, HtmlAttribute.SRC);
  14.934 -        }
  14.935 -        
  14.936 -        if (element.getAttribute(HtmlAttribute.STYLE).length() > 0) {
  14.937 -            handleStyleSheet(0, element, HtmlAttribute.STYLE);
  14.938 -        }
  14.939 -        
  14.940 -        // XXX what about <frame> and <iframe> -- should I copy these too?
  14.941 -        // More likely I should recursively import them, not just copy, such
  14.942 -        // that their images are also copied. I should use the same name map
  14.943 -        // to make sure I don't duplicate copies of shared resources, and
  14.944 -        // I can use this to make sure that I don't get in infinite recursion
  14.945 -        // as well by putting my own url in there so that other pages referring
  14.946 -        // to me simply use the new url value returned by the resources map!
  14.947 -        NodeList nl = element.getChildNodes();
  14.948 -        
  14.949 -        for (int i = 0, n = nl.getLength(); i < n; i++) {
  14.950 -            System.out.println("Item i: " + i + " is " + nl.item(1));
  14.951 -            copyResources(nl.item(i));
  14.952 -        }
  14.953 -    }
  14.954 -    
  14.955 -    /** Rewrite the given url attribute for the given element to
  14.956 -     * point to a local copy of the resource, and create that local
  14.957 -     * copy. Take the URL from the given element and attribute,
  14.958 -     * and store the new project relative uri in there when done. */
  14.959 -    private void copyResource(Element element, String urlAttribute) {
  14.960 -        // Look up the url
  14.961 -        String urlString = element.getAttribute(urlAttribute);
  14.962 -        
  14.963 -        if (urlString.length() == 0) {
  14.964 -            return;
  14.965 -        }
  14.966 -        
  14.967 -        // Reuse existing resource if we've already copied it in during this import
  14.968 -        if (context.resources.get(urlString) != null) {
  14.969 -            // Rewrite html url
  14.970 -            element.setAttribute(urlAttribute, (String)context.resources.get(urlString));
  14.971 -            
  14.972 -            return;
  14.973 -        }
  14.974 -        
  14.975 -        String projectUrl = copyResource(urlString);
  14.976 -        
  14.977 -        if (projectUrl != null) {
  14.978 -            element.setAttribute(urlAttribute, projectUrl);
  14.979 -        }
  14.980 -    }
  14.981 -    
  14.982 -    /** Rewrite the given url attribute for the given element to
  14.983 -     * point to a local copy of the resource, and create that local
  14.984 -     * copy. */
  14.985 -    private String copyResource(String urlString) {
  14.986 -        // Reuse existing resource if we've already copied it in during this import
  14.987 -        if (context.resources.get(urlString) != null) {
  14.988 -            return (String)context.resources.get(urlString);
  14.989 -        }
  14.990 -        
  14.991 -        URL url;
  14.992 -        
  14.993 -        try {
  14.994 -            url = new URL(context.base, urlString);
  14.995 -        } catch (MalformedURLException ex) {
  14.996 -            ErrorManager.getDefault().notify(ex);
  14.997 -            
  14.998 -            return null;
  14.999 -        }
 14.1000 -        
 14.1001 -        // Copy resource into project
 14.1002 -        try {
 14.1003 -            String projectPath = null;
 14.1004 -            
 14.1005 -            // XXX Shouldn't JsfProjectUtils take a project parameter?
 14.1006 -            projectPath = JsfProjectUtils.addResource(context.webformFile, url, true);
 14.1007 -            
 14.1008 -            if (projectPath == null) {
 14.1009 -                // XXX what do we do?  The user has cancelled when
 14.1010 -                // there was a conflict warning in the PM - but the
 14.1011 -                // PM returned null so we don't know exactly what the
 14.1012 -                // conflict path was -- I'd like to use it here
 14.1013 -                // Does this also happen if we pass in a bogus url (e.g. a src to an image
 14.1014 -                // where the image doesn't actually exist?)
 14.1015 -                return null;
 14.1016 -            }
 14.1017 -            
 14.1018 -            String projectUrl = MarkupUnit.toURL(projectPath);
 14.1019 -            context.resources.put(urlString, projectUrl);
 14.1020 -            
 14.1021 -            return projectUrl;
 14.1022 -        } catch (java.io.FileNotFoundException fnfe) {
 14.1023 -            // Try with full url as base instead; see comment in computeBase() for why
 14.1024 -            // this is necessary
 14.1025 -            URL fullUrl = context.fullUrl;
 14.1026 -            
 14.1027 -            try {
 14.1028 -                //url = new URL(fullUrl, urlString);
 14.1029 -                url = new URL(fullUrl.getProtocol(), fullUrl.getHost(), fullUrl.getPort(),
 14.1030 -                        fullUrl.getFile() + "/" + urlString);
 14.1031 -            } catch (MalformedURLException ex) {
 14.1032 -                ErrorManager.getDefault().notify(ex);
 14.1033 -                
 14.1034 -                return null;
 14.1035 -            }
 14.1036 -            
 14.1037 -            // Copy resource into project
 14.1038 -            try {
 14.1039 -                String projectPath = null;
 14.1040 -                
 14.1041 -                // XXX Shouldn't JsfProjectUtils take a project parameter?
 14.1042 -                projectPath = JsfProjectUtils.addResource(context.webformFile, url, true);
 14.1043 -                
 14.1044 -                if (projectPath == null) {
 14.1045 -                    // XXX what do we do?  The user has cancelled when
 14.1046 -                    // there was a conflict warning in the PM - but the
 14.1047 -                    // PM returned null so we don't know exactly what the
 14.1048 -                    // conflict path was -- I'd like to use it here
 14.1049 -                    return null;
 14.1050 -                }
 14.1051 -                
 14.1052 -                String projectUrl = MarkupUnit.toURL(projectPath);
 14.1053 -                
 14.1054 -                // Rewrite html url
 14.1055 -                context.resources.put(urlString, projectUrl);
 14.1056 -                
 14.1057 -                return projectUrl;
 14.1058 -            } catch (java.net.UnknownHostException uhe) {
 14.1059 -                // Open the output window instead and tell the user that the resource couldn't
 14.1060 -                // be imported
 14.1061 -                if (context.warnMissingFile) {
 14.1062 -                    //                    InSyncService.getProvider().getRaveErrorHandler().displayError(NbBundle.getMessage(ImportPagePanel.class,
 14.1063 -                    //                            "NoSuchResource", uhe.getLocalizedMessage() + ": " + urlString)); // NOI18N
 14.1064 -                    IllegalStateException ise = new IllegalStateException(uhe);
 14.1065 -                    Throwable th = ErrorManager.getDefault().annotate(ise, NbBundle.getMessage(ImportPagePanel.class, "NoSuchResource", uhe.getLocalizedMessage() + ": " + urlString));
 14.1066 -                    ErrorManager.getDefault().notify(ErrorManager.WARNING, th);
 14.1067 -                } else {
 14.1068 -                    ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, uhe);
 14.1069 -                }
 14.1070 -            } catch (java.io.FileNotFoundException fnfe2) {
 14.1071 -                if (context.warnMissingFile) {
 14.1072 -                    //                    InSyncService.getProvider().getRaveErrorHandler().displayError(NbBundle.getMessage(ImportPagePanel.class,
 14.1073 -                    //                            "NoSuchResource", urlString)); // NOI18N
 14.1074 -                    IllegalStateException ise = new IllegalStateException(fnfe2);
 14.1075 -                    Throwable th = ErrorManager.getDefault().annotate(ise, NbBundle.getMessage(ImportPagePanel.class, "NoSuchResource", urlString));
 14.1076 -                    ErrorManager.getDefault().notify(ErrorManager.WARNING, th);
 14.1077 -                } else {
 14.1078 -                    ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, fnfe2);
 14.1079 -                }
 14.1080 -            } catch (Exception ex) {
 14.1081 -                ErrorManager.getDefault().notify(ex);
 14.1082 -            }
 14.1083 -        } catch (java.net.UnknownHostException uhe) {
 14.1084 -            // Open the output window instead and tell the user that the resource couldn't
 14.1085 -            // be imported
 14.1086 -            if (context.warnMissingFile) {
 14.1087 -                //                InSyncService.getProvider().getRaveErrorHandler().displayError(NbBundle.getMessage(ImportPagePanel.class,
 14.1088 -                //                        "NoSuchResource", uhe.getLocalizedMessage() + ": " + urlString)); // NOI18N
 14.1089 -                IllegalStateException ise = new IllegalStateException(uhe);
 14.1090 -                Throwable th = ErrorManager.getDefault().annotate(ise, NbBundle.getMessage(ImportPagePanel.class, "NoSuchResource", uhe.getLocalizedMessage() + ": " + urlString));
 14.1091 -                ErrorManager.getDefault().notify(ErrorManager.WARNING, th);
 14.1092 -            } else {
 14.1093 -                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, uhe);
 14.1094 -            }
 14.1095 -        } catch (Exception ex) {
 14.1096 -            ErrorManager.getDefault().notify(ex);
 14.1097 -        }
 14.1098 -        
 14.1099 -        return null;
 14.1100 -    }
 14.1101 -    // <move-first>
 14.1102 -    private static FacesModel getModel(FileObject fo) {
 14.1103 -        return FacesModel.getInstance(fo);
 14.1104 -    }
 14.1105 -    
 14.1106 -    
 14.1107 -    private void insertPortions(ImportContext context, Document document) {
 14.1108 -        FileObject webformFile = context.webformFile;
 14.1109 -        LiveUnit unit = getModel(webformFile).getLiveUnit();
 14.1110 -        
 14.1111 -        // Locate <body> in document. Look for <ui:body> too?
 14.1112 -        NodeList importBodys = document.getElementsByTagName(HtmlTag.BODY.name);
 14.1113 -        
 14.1114 -        if (importBodys.getLength() == 0) {
 14.1115 -            importBodys = document.getElementsByTagName("ui:body"); // NOI18N
 14.1116 -        }
 14.1117 -        
 14.1118 -        if (importBodys.getLength() > 0) {
 14.1119 -            Node importbody = importBodys.item(0);
 14.1120 -            MarkupDesignBean body;
 14.1121 -            if (context.fragment) {
 14.1122 -                MarkupBean bean = getModel(webformFile).getFacesUnit().getDefaultParent();
 14.1123 -                //                RaveElement element = (RaveElement)bean.getElement();
 14.1124 -                //                body = element.getDesignBean();
 14.1125 -                Element element = bean.getElement();
 14.1126 -                body = InSyncService.getProvider().getMarkupDesignBeanForElement(element);
 14.1127 -                for (int i = 0; i < body.getChildBeanCount(); i++) {
 14.1128 -                    DesignBean child = body.getChildBean(i);
 14.1129 -                    if (child.getInstance() instanceof org.netbeans.modules.visualweb.xhtml.P) {
 14.1130 -                        unit.deleteBean(child);
 14.1131 -                        break;
 14.1132 -                    }
 14.1133 -                }
 14.1134 -            } else {
 14.1135 -                DesignBean[] bodys;
 14.1136 -                if (JsfProjectUtils.JAVA_EE_5.equals(JsfProjectUtils.getJ2eePlatformVersion(context.project))) {
 14.1137 -                    // XXX Woodstock
 14.1138 -                    bodys = unit.getBeansOfType(com.sun.webui.jsf.component.Body.class);
 14.1139 -                } else {
 14.1140 -                    // XXX Braveheart
 14.1141 -                    bodys = unit.getBeansOfType(com.sun.rave.web.ui.component.Body.class);
 14.1142 -                }
 14.1143 -                
 14.1144 -                if ((bodys == null) || (bodys.length == 0)) {
 14.1145 -                    bodys = unit.getBeansOfType(org.netbeans.modules.visualweb.xhtml.Body.class);
 14.1146 -                    
 14.1147 -                    if ((bodys == null) || (bodys.length == 0)) {
 14.1148 -                        // XXX ERROR
 14.1149 -                        ErrorManager.getDefault().log("No body found");
 14.1150 -                        
 14.1151 -                        return;
 14.1152 -                    }
 14.1153 -                }
 14.1154 -                
 14.1155 -                body = (MarkupDesignBean)bodys[0];
 14.1156 -            }
 14.1157 -            
 14.1158 -            //Duplicate attributes on the body... when applicable
 14.1159 -            //        like bgcolor etc.
 14.1160 -            //        TODO: bgcolor !
 14.1161 -            Element importBodyElement = (Element)importbody;
 14.1162 -            String style = importBodyElement.getAttribute(HtmlAttribute.STYLE);
 14.1163 -            String bgcolor = importBodyElement.getAttribute(HtmlAttribute.BGCOLOR);
 14.1164 -            if (bgcolor.length() > 0) {
 14.1165 -                if (style.length() == 0) {
 14.1166 -                    style = ";"; // NOI18N
 14.1167 -                }
 14.1168 -                style = style+";background-color:"+bgcolor; // NONI18N
 14.1169 -            }
 14.1170 -            String background = importBodyElement.getAttribute(HtmlAttribute.BACKGROUND);
 14.1171 -            if (background.length() > 0) {
 14.1172 -                if (style.length() == 0) {
 14.1173 -                    style = ";"; // NOI18N
 14.1174 -                }
 14.1175 -                style = style+";background-image:url("+background+")"; // NOI18N
 14.1176 -            }
 14.1177 -            String text = importBodyElement.getAttribute(HtmlAttribute.TEXT);
 14.1178 -            if (text.length() > 0) {
 14.1179 -                if (style.length() == 0) {
 14.1180 -                    style = ";"; // NOI18N
 14.1181 -                }
 14.1182 -                style = style+";color"+text; // NOI18N
 14.1183 -            }
 14.1184 -            
 14.1185 -            DesignProperty styleProp = null;
 14.1186 -            if (context.fragment && body.getBeanParent() != null) {
 14.1187 -                styleProp = body.getBeanParent().getProperty("style");
 14.1188 -            } else {
 14.1189 -                styleProp = body.getProperty("style");
 14.1190 -            }
 14.1191 -            if (styleProp != null) {
 14.1192 -                styleProp.setValue(style);
 14.1193 -            }
 14.1194 -            
 14.1195 -            String onload = importBodyElement.getAttribute(HtmlAttribute.ONLOAD);
 14.1196 -            if (onload.length() > 0) {
 14.1197 -                DesignProperty onLoadProp = body.getProperty("onLoad");
 14.1198 -                if (onLoadProp != null) {
 14.1199 -                    onLoadProp.setValue(onload);
 14.1200 -                }
 14.1201 -            }
 14.1202 -            
 14.1203 -            //            String onunload = importBodyElement.getAttribute(HtmlAttribute.ONUNLOAD);
 14.1204 -            //            if (onunload.length() > 0) {
 14.1205 -            //                body.getProperty("onUnload").setValue(onunload);
 14.1206 -            //
 14.1207 -            //            }
 14.1208 -            
 14.1209 -            String cls = importBodyElement.getAttribute(HtmlAttribute.CLASS);
 14.1210 -            if (cls.length() > 0) {
 14.1211 -                DesignProperty styleClassProp = body.getProperty("styleClass");
 14.1212 -                if (styleClassProp != null) {
 14.1213 -                    styleClassProp.setValue(cls); // NOI18N
 14.1214 -                }
 14.1215 -            }
 14.1216 -            
 14.1217 -            NodeList nl = importbody.getChildNodes();
 14.1218 -            Element parent = body.getElement();
 14.1219 -            
 14.1220 -            for (int i = 0, n = nl.getLength(); i < n; i++) {
 14.1221 -                Node copied = getDom(webformFile).importNode(nl.item(i), true);
 14.1222 -                parent.appendChild(copied);
 14.1223 -            }
 14.1224 -            
 14.1225 -            // Eliminate duplicate <title> ?
 14.1226 -            // Eliminate duplicate <meta> ?
 14.1227 -        }
 14.1228 -        
 14.1229 -        // Locate <head> in document. Look for <ui:head> too?
 14.1230 -        NodeList importHeads = document.getElementsByTagName(HtmlTag.HEAD.name);
 14.1231 -        
 14.1232 -        if (importHeads.getLength() == 0) {
 14.1233 -            importHeads = document.getElementsByTagName("ui:head"); // NOI18N
 14.1234 -        }
 14.1235 -        
 14.1236 -        if (importHeads.getLength() > 0) {
 14.1237 -            Node importHead = importHeads.item(0);
 14.1238 -            DesignBean[] heads;
 14.1239 -            if (JsfProjectUtils.JAVA_EE_5.equals(JsfProjectUtils.getJ2eePlatformVersion(context.project))) {
 14.1240 -                // Woodstock
 14.1241 -                heads = unit.getBeansOfType(com.sun.webui.jsf.component.Head.class);
 14.1242 -            } else {
 14.1243 -                // XXX Braveheart
 14.1244 -                heads = unit.getBeansOfType(com.sun.rave.web.ui.component.Head.class);
 14.1245 -            }
 14.1246 -            
 14.1247 -            if ((heads == null) || (heads.length == 0)) {
 14.1248 -                heads = unit.getBeansOfType(org.netbeans.modules.visualweb.xhtml.Head.class);
 14.1249 -                
 14.1250 -                if ((heads == null) || (heads.length == 0)) {
 14.1251 -                    // XXX ERROR
 14.1252 -                    ErrorManager.getDefault().log("No head found");
 14.1253 -                    
 14.1254 -                    return;
 14.1255 -                }
 14.1256 -            }
 14.1257 -            
 14.1258 -            MarkupDesignBean head = (MarkupDesignBean)heads[0];
 14.1259 -            NodeList nl = importHead.getChildNodes();
 14.1260 -            Element parent = head.getElement();
 14.1261 -            
 14.1262 -            for (int i = 0, n = nl.getLength(); i < n; i++) {
 14.1263 -                Node copied = getDom(webformFile).importNode(nl.item(i), true);
 14.1264 -                parent.appendChild(copied);
 14.1265 -            }
 14.1266 -            
 14.1267 -            // Eliminate duplicate <title> ?
 14.1268 -            // Eliminate duplicate <meta> ?
 14.1269 -        }
 14.1270 -        
 14.1271 -        // Duplicate name spaces
 14.1272 -        if (context.nameSpaces != null) {
 14.1273 -            Element root = getDom(webformFile).getDocumentElement();
 14.1274 -            Iterator it = context.nameSpaces.keySet().iterator();
 14.1275 -            while (it.hasNext()) {
 14.1276 -                String attribute = (String)it.next();
 14.1277 -                if (!root.hasAttribute(attribute)) {
 14.1278 -                    root.setAttribute(attribute,  (String)context.nameSpaces.get(attribute));
 14.1279 -                }
 14.1280 -            }
 14.1281 -        }
 14.1282 -    }
 14.1283 -    
 14.1284 -    
 14.1285 -    
 14.1286 -    
 14.1287 -    /** Convert the input components to JSF components */
 14.1288 -    private void convertCompsToJsf(ImportContext context) {
 14.1289 -        FileObject webformFile = context.webformFile;
 14.1290 -        FacesModel model = getModel(webformFile);
 14.1291 -        
 14.1292 -        if (model == null) {
 14.1293 -            return;
 14.1294 -        }
 14.1295 -        
 14.1296 -        LiveUnit lunit = model.getLiveUnit();
 14.1297 -        
 14.1298 -        if (lunit == null) {
 14.1299 -            return;
 14.1300 -        }
 14.1301 -        
 14.1302 -        // Iterate over the DOM, change <input>, <select> etc. tags
 14.1303 -        //MarkupUnit munit = webform.getMarkup();
 14.1304 -        Document document = getDom(webformFile);
 14.1305 -        
 14.1306 -        convertCompsToJsf(document.getDocumentElement(), webformFile, importImages,
 14.1307 -                convertForms);
 14.1308 -        
 14.1309 -        // Clean up forms
 14.1310 -        if (context.formsAdded != null) {
 14.1311 -            removeBogusForms(context.formsAdded, webformFile);
 14.1312 -        }
 14.1313 -        
 14.1314 -        // Get rid of old element references etc.
 14.1315 -        //        model.getMarkupUnit().setSourceDirty(); // we've been messing with the DOM
 14.1316 -        //        model.sync();
 14.1317 -        model.getMarkupUnit().setModelDirty();
 14.1318 -        model.getJavaUnit().setModelDirty();
 14.1319 -        model.flush();
 14.1320 -        LifecycleManager.getDefault().saveAll();
 14.1321 -    }
 14.1322 -    
 14.1323 -    
 14.1324 -    private void convertCompsToJsf(Element element, FileObject webformFile, boolean images,
 14.1325 -            boolean formComps) {
 14.1326 -        String tagName = element.getTagName();
 14.1327 -        HtmlTag tag = HtmlTag.getTag(tagName);
 14.1328 -        DesignBean bean = null;
 14.1329 -        
 14.1330 -        // Declare early so specific components can prune their children
 14.1331 -        // by nulling out
 14.1332 -        boolean skipChildren = false;
 14.1333 -        
 14.1334 -        if (tag != null) {
 14.1335 -            char c = tagName.charAt(0);
 14.1336 -            
 14.1337 -            switch (c) {
 14.1338 -            case 'l':
 14.1339 -                
 14.1340 -                if (tag == HtmlTag.LABEL) {
 14.1341 -                    bean =
 14.1342 -                            replaceComponent(webformFile, element,
 14.1343 -                            javax.faces.component.html.HtmlOutputLabel.class.getName()); // NOI18N
 14.1344 -                    
 14.1345 -                    if (bean != null) {
 14.1346 -                        convertProperty(bean, element, HtmlAttribute.FOR, "for"); // NOI18N
 14.1347 -                    }
 14.1348 -                }
 14.1349 -                
 14.1350 -                break;
 14.1351 -                
 14.1352 -            case 'f':
 14.1353 -                
 14.1354 -                if (formComps && (tag == HtmlTag.FORM)) {
 14.1355 -                    //bean = replaceComponent(webform, element, "javax.faces.component.html.HtmlForm"); // NOI18N
 14.1356 -                    if (JsfProjectUtils.JAVA_EE_5.equals(JsfProjectUtils.getJ2eePlatformVersion(context.project))) {
 14.1357 -                        // Woodstock
 14.1358 -                        bean = replaceComponent(webformFile, element, com.sun.webui.jsf.component.Form.class.getName());
 14.1359 -                    } else {
 14.1360 -                        // Braveheart
 14.1361 -                        bean = replaceComponent(webformFile, element, com.sun.rave.web.ui.component.Form.class.getName());
 14.1362 -                    }
 14.1363 -                    
 14.1364 -                    if (bean != null) {
 14.1365 -                        if (context.formsAdded == null) {
 14.1366 -                            context.formsAdded = new ArrayList();
 14.1367 -                        }
 14.1368 -                        
 14.1369 -                        context.formsAdded.add(bean);
 14.1370 -                        // TODO - check these
 14.1371 -                        //convertProperty(bean, element, HtmlAttribute.TARGET, "target"); // NOI18N
 14.1372 -                        //convertProperty(bean, element, "accept", "accept"); // NOI18N
 14.1373 -                        convertProperty(bean, element, HtmlAttribute.ENCTYPE, "enctype"); // NOI18N
 14.1374 -                        convertProperty(bean, element, "onsubmit", "onSubmit"); // NOI18N
 14.1375 -                        convertProperty(bean, element, "onreset", "onReset"); // NOI18N
 14.1376 -                        //convertProperty(bean, element, "accept-charset", "acceptcharset"); // NOI18N
 14.1377 -                    }
 14.1378 -                }
 14.1379 -                
 14.1380 -                break;
 14.1381 -                
 14.1382 -            /*
 14.1383 -            case 'a':
 14.1384 -            if (tag == HtmlTag.A) {
 14.1385 -                bean = replaceComponent(webform, element, "javax.faces.component.html.HtmlOutputLink"); // NOI18N
 14.1386 -                if (bean != null) {
 14.1387 -                    convertProperty(bean, element, HtmlAttribute.HREF, "value"); // NOI18N
 14.1388 -                }
 14.1389 -             
 14.1390 -             
 14.1391 -                // Also, HtmlOutputLink does not render its markup children,
 14.1392 -                // only its component children, so I've gotta insert an
 14.1393 -                // output text to contain its link text!
 14.1394 -            }
 14.1395 -            break;
 14.1396 -             */
 14.1397 -            case 'i':
 14.1398 -                
 14.1399 -                if (formComps && (tag == HtmlTag.INPUT)) {
 14.1400 -                    String type = element.getAttribute(HtmlAttribute.TYPE);
 14.1401 -                    
 14.1402 -                    if ((type == null) || (type.length() == 0) || type.equals("text")) { // NOI18N
 14.1403 -                        
 14.1404 -                        // Text Field
 14.1405 -                        bean =
 14.1406 -                                replaceComponent(webformFile, element,
 14.1407 -                                javax.faces.component.html.HtmlInputText.class.getName());
 14.1408 -                        
 14.1409 -                        if (bean != null) {
 14.1410 -                            convertProperty(bean, element, HtmlAttribute.MAXLENGTH, "maxlength"); // NOI18N
 14.1411 -                            convertProperty(bean, element, HtmlAttribute.SIZE, "size"); // NOI18N
 14.1412 -                            convertProperty(bean, element, "readonly", "readonly"); // NOI18N
 14.1413 -                        }
 14.1414 -                    } else if (type.equals("submit") // NOI18N
 14.1415 -                            ||type.equals("reset") // NOI18N
 14.1416 -                            ||type.equals("button")) { // NOI18N
 14.1417 -                        bean =
 14.1418 -                                replaceComponent(webformFile, element,
 14.1419 -                                javax.faces.component.html.HtmlCommandButton.class.getName());
 14.1420 -                    } else if (type.equals("checkbox")) {
 14.1421 -                        bean =
 14.1422 -                                replaceComponent(webformFile, element,
 14.1423 -                                javax.faces.component.html.HtmlSelectBooleanCheckbox.class.getName());
 14.1424 -                        
 14.1425 -                        if (bean != null) {
 14.1426 -                            convertProperty(bean, element, HtmlAttribute.CHECKED, "value"); // NOI18N
 14.1427 -                        }
 14.1428 -                    } else if (type.equals("file")) { // NOI18N
 14.1429 -                        
 14.1430 -                        // XXX no file upload component!!
 14.1431 -                    } else if (type.equals("hidden")) { // NOI18N
 14.1432 -                        bean =
 14.1433 -                                replaceComponent(webformFile, element,
 14.1434 -                                javax.faces.component.html.HtmlInputHidden.class.getName());
 14.1435 -                    } else if (type.equals("password")) { // NOI18N
 14.1436 -                        bean =
 14.1437 -                                replaceComponent(webformFile, element,
 14.1438 -                                javax.faces.component.html.HtmlInputSecret.class.getName());
 14.1439 -                        
 14.1440 -                        if (bean != null) {
 14.1441 -                            convertProperty(bean, element, HtmlAttribute.MAXLENGTH, "maxlength"); // NOI18N
 14.1442 -                            convertProperty(bean, element, HtmlAttribute.SIZE, "size"); // NOI18N
 14.1443 -                            convertProperty(bean, element, "readonly", "readonly"); // NOI18N
 14.1444 -                        }
 14.1445 -                    } else if (type.equals("radio")) {
 14.1446 -                        bean =
 14.1447 -                                replaceComponent(webformFile, element,
 14.1448 -                                javax.faces.component.html.HtmlSelectManyCheckbox.class.getName());
 14.1449 -                        
 14.1450 -                        if (bean != null) {
 14.1451 -                            convertProperty(bean, element, HtmlAttribute.CHECKED, "value"); // NOI18N
 14.1452 -                        }
 14.1453 -                    } else if ("image".equals(type)) {
 14.1454 -                        // HtmlCommandButton with image attribute
 14.1455 -                        bean =
 14.1456 -                                replaceComponent(webformFile, element,
 14.1457 -                                javax.faces.component.html.HtmlCommandButton.class.getName());
 14.1458 -                        
 14.1459 -                        if (bean != null) {
 14.1460 -                            convertProperty(bean, element, HtmlAttribute.SRC, "image"); // NOI18N
 14.1461 -                        }
 14.1462 -                    }
 14.1463 -                    
 14.1464 -                    if (bean != null) {
 14.1465 -                        convertProperty(bean, element, HtmlAttribute.VALUE, "value"); // NOI18N
 14.1466 -                        
 14.1467 -                        // Not a JSF prop: convertProperty(bean, element, "accept", "accept"); // NOI18N
 14.1468 -                    }
 14.1469 -                }
 14.1470 -                // CONTROVERSIAL:
 14.1471 -                else if (images && (tag == HtmlTag.IMG)) {
 14.1472 -                    bean =
 14.1473 -                            replaceComponent(webformFile, element,
 14.1474 -                            javax.faces.component.html.HtmlGraphicImage.class.getName());
 14.1475 -                    
 14.1476 -                    if (bean != null) {
 14.1477 -                        convertProperty(bean, element, HtmlAttribute.SRC, "value"); // NOI18N
 14.1478 -                        convertProperty(bean, element, HtmlAttribute.WIDTH, "width"); // NOI18N
 14.1479 -                        convertProperty(bean, element, HtmlAttribute.HEIGHT, "height"); // NOI18N
 14.1480 -                        convertProperty(bean, element, "longdesc", "longdesc"); // NOI18N
 14.1481 -                        
 14.1482 -                        // TODO: usemap, ismap
 14.1483 -                    }
 14.1484 -                }
 14.1485 -                
 14.1486 -                break;
 14.1487 -                
 14.1488 -                // CONTROVERSIAL:
 14.1489 -            case 's':
 14.1490 -                
 14.1491 -                if (formComps && (tag == HtmlTag.SELECT)) {
 14.1492 -                    int size =
 14.1493 -                            HtmlAttribute.getIntegerAttributeValue(element, HtmlAttribute.SIZE, 1);
 14.1494 -                    boolean multiple = element.hasAttribute(HtmlAttribute.MULTIPLE);
 14.1495 -                    
 14.1496 -                    if ((size > 1) || multiple) {
 14.1497 -                        // javax.faces.component.html.HtmlSelectOneListbox
 14.1498 -                        // javax.faces.component.html.HtmlSelectManyListbox
 14.1499 -                        // XXX Todo: look up selection attribute and do the right thing!
 14.1500 -                        bean =
 14.1501 -                                replaceComponent(webformFile, element,
 14.1502 -                                javax.faces.component.html.HtmlSelectOneListbox.class.getName(), false);
 14.1503 -                        
 14.1504 -                        if (bean != null) {
 14.1505 -                            convertProperty(bean, element, HtmlAttribute.SIZE, "size"); // NOI18N
 14.1506 -                        }
 14.1507 -                    } else {
 14.1508 -                        bean =
 14.1509 -                                replaceComponent(webformFile, element,
 14.1510 -                                javax.faces.component.html.HtmlSelectOneMenu.class.getName(), false);
 14.1511 -                    }
 14.1512 -                    
 14.1513 -                    if (bean != null) {
 14.1514 -                        skipChildren = true; // Option children should not be included!
 14.1515 -                        
 14.1516 -                        // XXX will this conflict with checkbox/radiobox
 14.1517 -                        // setting value from the "checked" attribute?
 14.1518 -                        convertProperty(bean, element, HtmlAttribute.VALUE, "value"); // NOI18N
 14.1519 -                        convertProperty(bean, element, HtmlAttribute.CLASS, "styleClass"); // NOI18N
 14.1520 -                        
 14.1521 -                        // Create a select items!
 14.1522 -                        // XXX I've gotta get the id set first... so
 14.1523 -                        // that I pick a decent select items name!
 14.1524 -                        String[] optionList = extractOptions(element);
 14.1525 -                        
 14.1526 -                        try {
 14.1527 -                            DesignContext context = bean.getDesignContext();
 14.1528 -                            
 14.1529 -                            // create and setup a default items array
 14.1530 -                            DesignBean items =
 14.1531 -                                    context.createBean(DefaultSelectItemsArray.class.getName(), null,
 14.1532 -                                    null);
 14.1533 -                            items.setInstanceName(bean.getInstanceName() + "DefaultItems", true); //NOI18N
 14.1534 -                            
 14.1535 -                            DesignProperty itp = items.getProperty("items"); // NOI18N
 14.1536 -                            
 14.1537 -                            if (itp != null) {
 14.1538 -                                itp.setValue(optionList);
 14.1539 -                            }
 14.1540 -                            
 14.1541 -                            // create a selectitems child
 14.1542 -                            if (context.canCreateBean(UISelectItems.class.getName(), bean, null)) {
 14.1543 -                                DesignBean si =
 14.1544 -                                        context.createBean(UISelectItems.class.getName(), bean, null);
 14.1545 -                                
 14.1546 -                                if (si != null) {
 14.1547 -                                    si.setInstanceName(bean.getInstanceName() + "SelectItems", true); //NOI18N
 14.1548 -                                    
 14.1549 -                                    String outer =
 14.1550 -                                            bean.getDesignContext().getRootContainer().getInstanceName();
 14.1551 -                                    si.getProperty("value").setValueSource("#{" + outer + "." + //NOI18N
 14.1552 -                                            items.getInstanceName() + "}"); //NOI18N
 14.1553 -                                }
 14.1554 -                            }
 14.1555 -                        } catch (Exception e) {
 14.1556 -                            e.printStackTrace();
 14.1557 -                        }
 14.1558 -                    }
 14.1559 -                    
 14.1560 -                    // Todo: nuke out all children; possibly convert the
 14.1561 -                    // <option> tags to a SelectItems object and populate it,
 14.1562 -                    // then nuke the <option> tags!
 14.1563 -                    
 14.1564 -                    /*
 14.1565 -                    } else if (tag == HtmlTag.SPAN) {
 14.1566 -                    // CONTROVERSIAL!
 14.1567 -                    // javax.faces.component.html.HtmlOutputText
 14.1568 -                    // javax.faces.component.html.HtmlPanelGroup
 14.1569 -                     */
 14.1570 -                }
 14.1571 -                
 14.1572 -                break;
 14.1573 -                
 14.1574 -            case 't':
 14.1575 -                
 14.1576 -                if (formComps && (tag == HtmlTag.TEXTAREA)) {
 14.1577 -                    bean =
 14.1578 -                            replaceComponent(webformFile, element,
 14.1579 -                            javax.faces.component.html.HtmlInputTextarea.class.getName());
 14.1580 -                    
 14.1581 -                    if (bean != null) {
 14.1582 -                        convertProperty(bean, element, HtmlAttribute.VALUE, "value"); // NOI18N
 14.1583 -                        convertProperty(bean, element, HtmlAttribute.ROWS, "rows"); // NOI18N
 14.1584 -                        convertProperty(bean, element, HtmlAttribute.COLS, "cols"); // NOI18N
 14.1585 -                        convertProperty(bean, element, "readonly", "readonly"); // NOI18N
 14.1586 -                    }
 14.1587 -                    
 14.1588 -                    /*
 14.1589 -                    } else if (tag == HtmlTag.TABLE) {
 14.1590 -                    // CONTROVERSIAL:
 14.1591 -                    // javax.faces.component.html.HtmlDataTable
 14.1592 -                    // javax.faces.component.html.HtmlPanelGrid
 14.1593 -                     */
 14.1594 -                }
 14.1595 -                
 14.1596 -                break;
 14.1597 -                
 14.1598 -            case 'o':
 14.1599 -                
 14.1600 -                //                if (tag == HtmlTag.OPTION) {
 14.1601 -                //                    // Should convert these as part of <select>'s children.
 14.1602 -                //                    // When they appear outside of a select, wipe them out.
 14.1603 -                //                    // TODO
 14.1604 -                //                }
 14.1605 -                
 14.1606 -                break;
 14.1607 -            }
 14.1608 -            
 14.1609 -            // XXX How do we convert to checkbox lists and radiobutton lists?
 14.1610 -        } else {
 14.1611 -            // Use reverse map from tags to class names to instantiate
 14.1612 -            // a component behind the tag
 14.1613 -            initPaletteComponents();
 14.1614 -            
 14.1615 -            int colon = tagName.indexOf(':');
 14.1616 -            
 14.1617 -            if (colon != -1) {
 14.1618 -                tagName = tagName.substring(colon + 1);
 14.1619 -            }
 14.1620 -            
 14.1621 -            String cls = (String)context.paletteComponents.get(tagName);
 14.1622 -            
 14.1623 -            if (cls != null) {
 14.1624 -                // I may already have some existing DesignBeans in the document
 14.1625 -                // I'm mutating -- the default parent form for example; don't
 14.1626 -                // do anything with these.
 14.1627 -                //                if (((RaveElement)element).getDesignBean() == null) {
 14.1628 -                if (InSyncService.getProvider().getMarkupDesignBeanForElement(element) == null) {
 14.1629 -                    // we don't set "bean" -- don't want html treatment below
 14.1630 -                    DesignBean newBean = replaceTag(webformFile, element, cls);
 14.1631 -                    
 14.1632 -                    // If I've replaced the Element, ensure that I recurse into
 14.1633 -                    // the new element instead
 14.1634 -                    if (newBean != null) {
 14.1635 -                        if (tagName.equals(HtmlTag.FORM.name)) {
 14.1636 -                            if (context.formsAdded == null) {
 14.1637 -                                context.formsAdded = new ArrayList();
 14.1638 -                            }
 14.1639 -                            
 14.1640 -                            context.formsAdded.add(newBean);
 14.1641 -                        }
 14.1642 -                        
 14.1643 -                        // <move>
 14.1644 -                        //                        Element e = FacesSupport.getElement(newBean);
 14.1645 -                        // ====
 14.1646 -                        Element e = getElement(newBean);
 14.1647 -                        // </move>
 14.1648 -                        
 14.1649 -                        if (e != null) {
 14.1650 -                            element = e;
 14.1651 -                            
 14.1652 -                            // See if we should import some additional resources
 14.1653 -                            // I don't actually know which component properties represent URLs
 14.1654 -                            // Is there metadata for this?
 14.1655 -                            // Should I try to simply iterate over all properties, looking to
 14.1656 -                            // see if they are importable resources?? Seems like this could
 14.1657 -                            // have some accidental effects
 14.1658 -                            String propName = null;
 14.1659 -                            
 14.1660 -                            if (newBean.getInstance() instanceof com.sun.rave.web.ui.component.ImageComponent
 14.1661 -                                    || newBean.getInstance() instanceof com.sun.webui.jsf.component.ImageComponent) { // XXX Woodstock
 14.1662 -                                propName = "url"; // NOI18N
 14.1663 -                            } else if (newBean.getInstance() instanceof UIGraphic) {
 14.1664 -                                propName = "value"; // NOI18N
 14.1665 -                            } else if (newBean.getInstance() instanceof HtmlCommandButton) {
 14.1666 -                                propName = "image"; // NOI18N
 14.1667 -                            } // XXX are there any known other ones?
 14.1668 -                            
 14.1669 -                            if (context.copyResources && (propName != null)) {
 14.1670 -                                DesignProperty prop = newBean.getProperty(propName);
 14.1671 -                                
 14.1672 -                                if (prop != null) {
 14.1673 -                                    String value = prop.getValueSource();
 14.1674 -                                    
 14.1675 -                                    if ((value != null) && (value.length() > 0) &&
 14.1676 -                                            // <move>
 14.1677 -                                            //                                            !FacesSupport.isValueBindingExpression(value, false)) {
 14.1678 -                                            // ====
 14.1679 -                                            !isValueBindingExpression(value, false)) {
 14.1680 -                                        // </move>
 14.1681 -                                        context.warnMissingFile = false;
 14.1682 -                                        copyResource(element, propName);
 14.1683 -                                        
 14.1684 -                                        String copied = element.getAttribute(propName);
 14.1685 -                                        
 14.1686 -                                        if ((copied != value) && (copied != null) &&
 14.1687 -                                                (copied.length() > 0)) {
 14.1688 -                                            prop.setValue(copied);
 14.1689 -                                        }
 14.1690 -                                        
 14.1691 -                                        context.warnMissingFile = true;
 14.1692 -                                    }
 14.1693 -                                }
 14.1694 -                            }
 14.1695 -                        }
 14.1696 -                    }
 14.1697 -                }
 14.1698 -            }
 14.1699 -        }
 14.1700 -        
 14.1701 -        if (bean != null) {
 14.1702 -            // XXX Can I preserve the name somehow?
 14.1703 -            String id = null;
 14.1704 -            
 14.1705 -            if (element.getAttribute(HtmlAttribute.ID).length() > 0) {
 14.1706 -                id = element.getAttribute(HtmlAttribute.ID);
 14.1707 -            } else if (element.getAttribute(HtmlAttribute.NAME).length() > 0) {
 14.1708 -                id = element.getAttribute(HtmlAttribute.NAME);
 14.1709 -            }
 14.1710 -            
 14.1711 -            if (id != null) {
 14.1712 -                // Make sure id is unique
 14.1713 -                if (context.names == null) {
 14.1714 -                    context.names = new HashSet();
 14.1715 -                    context.names.add(id);
 14.1716 -                } else {
 14.1717 -                    while (context.names.contains(id)) {
 14.1718 -                        id = id + "_";
 14.1719 -                    }
 14.1720 -                    
 14.1721 -                    context.names.add(id);
 14.1722 -                }
 14.1723 -                
 14.1724 -                bean.setInstanceName(id);
 14.1725 -            }
 14.1726 -            
 14.1727 -            convertProperty(bean, element, HtmlAttribute.CLASS, "styleClass"); // NOI18N
 14.1728 -            convertProperty(bean, element, HtmlAttribute.STYLE, "style"); // NOI18N
 14.1729 -            convertProperty(bean, element, HtmlAttribute.ALT, "alt"); // NOI18N
 14.1730 -            convertProperty(bean, element, HtmlAttribute.TITLE, "title"); // NOI18N
 14.1731 -            convertProperty(bean, element, HtmlAttribute.DIR, "dir"); // NOI18N
 14.1732 -            convertProperty(bean, element, HtmlAttribute.LANG, "lang"); // NOI18N
 14.1733 -            convertProperty(bean, element, "disabled", "disabled"); // NOI18N
 14.1734 -            convertProperty(bean, element, "accesskey", "accesskey"); // NOI18N
 14.1735 -            convertProperty(bean, element, "tabindex", "tabindex"); // NOI18N
 14.1736 -            
 14.1737 -            // Copy all the JavaScript properties... "onblur", "onchange", ...
 14.1738 -            convertProperty(bean, element, "onblur", "onblur"); // NOI18N
 14.1739 -            convertProperty(bean, element, "onchange", "onchange"); // NOI18N
 14.1740 -            convertProperty(bean, element, "onclick", "onclick"); // NOI18N
 14.1741 -            convertProperty(bean, element, "ondblclick", "ondblclick"); // NOI18N
 14.1742 -            convertProperty(bean, element, "onfocus", "onfocus"); // NOI18N
 14.1743 -            convertProperty(bean, element, "okeydownn", "oneydownn"); // NOI18N
 14.1744 -            convertProperty(bean, element, "onkeypress", "onkeypress"); // NOI18N
 14.1745 -            convertProperty(bean, element, "onkeyup", "onkeyup"); // NOI18N
 14.1746 -            convertProperty(bean, element, "onmousedown", "onmousedown"); // NOI18N
 14.1747 -            convertProperty(bean, element, "onmousemove", "onmousemove"); // NOI18N
 14.1748 -            convertProperty(bean, element, "onmouseout", "onmouseout"); // NOI18N
 14.1749 -            convertProperty(bean, element, "onmouseover", "onmouseover"); // NOI18N
 14.1750 -            convertProperty(bean, element, "onmouseup", "onmouseup"); // NOI18N
 14.1751 -            convertProperty(bean, element, "onselect", "onselect"); // NOI18N
 14.1752 -            
 14.1753 -            // If I've replaced the Element, ensure that I recurse into
 14.1754 -            // the new element instead
 14.1755 -            // <move>
 14.1756 -            //            Element e = FacesSupport.getElement(bean);
 14.1757 -            // ====
 14.1758 -            Element e = getElement(bean);
 14.1759 -            // </move>
 14.1760 -            
 14.1761 -            if (e != null) {
 14.1762 -                element = e;
 14.1763 -            }
 14.1764 -        }
 14.1765 -        
 14.1766 -        if (skipChildren) {
 14.1767 -            return;
 14.1768 -        }
 14.1769 -        
 14.1770 -        NodeList nl = element.getChildNodes();
 14.1771 -        
 14.1772 -        if ((nl == null) || (nl.getLength() == 0)) {
 14.1773 -            return;
 14.1774 -        }
 14.1775 -        
 14.1776 -        // Copy children list first since we're mutating while we fly
 14.1777 -        ArrayList children = new ArrayList(nl.getLength());
 14.1778 -        
 14.1779 -        for (int i = 0, n = nl.getLength(); i < n; i++) {
 14.1780 -            Node child = nl.item(i);
 14.1781 -            
 14.1782 -            if (child.getNodeType() == Node.ELEMENT_NODE) {
 14.1783 -                children.add(child);
 14.1784 -            }
 14.1785 -        }
 14.1786 -        
 14.1787 -        for (int i = 0, n = children.size(); i < n; i++) {
 14.1788 -            Element e = (Element)children.get(i);
 14.1789 -            convertCompsToJsf(e, webformFile, images, formComps);
 14.1790 -        }
 14.1791 -    }
 14.1792 -    
 14.1793 -    
 14.1794 -    
 14.1795 -    /** Locate the &lt;html&gt; tag. In a normal xhtml/html document, it's
 14.1796 -     * the same as the root tag for the DOM, but in our JSF files, it
 14.1797 -     * might be nested within &lt;jsp:root&gt;, &lt;f:view&gt;, etc.
 14.1798 -     * @param parent The root tag
 14.1799 -     * @todo Just pass in the Document node instead?
 14.1800 -     * @todo Move to Utilities?
 14.1801 -     * @return The html tag Element
 14.1802 -     */
 14.1803 -    private Element findHtmlTag(Node root) {
 14.1804 -        if (root.getNodeType() == Node.ELEMENT_NODE) {
 14.1805 -            Element element = (Element)root;
 14.1806 -            
 14.1807 -            if (HtmlTag.HTML.name.equals(element.getTagName())) { // Don't allow "HTML"
 14.1808 -                
 14.1809 -                return element;
 14.1810 -            }
 14.1811 -        }
 14.1812 -        
 14.1813 -        NodeList list = root.getChildNodes();
 14.1814 -        int len = list.getLength();
 14.1815 -        
 14.1816 -        for (int i = 0; i < len; i++) {
 14.1817 -            Node child = list.item(i);
 14.1818 -            Element match = findHtmlTag(child);
 14.1819 -            
 14.1820 -            if (match != null) {
 14.1821 -                return match;
 14.1822 -            }
 14.1823 -        }
 14.1824 -        
 14.1825 -        return null;
 14.1826 -    }
 14.1827 -    
 14.1828 -    /** Locate an element of the given tag name as a direct child of
 14.1829 -     * the given parent. If no element of that tag name is found it
 14.1830 -     * will either return null if the create flag is false, or if the
 14.1831 -     * create flag is true, the element will be created and inserted
 14.1832 -     * before it is returned.
 14.1833 -     * @todo Move to Utilities?
 14.1834 -     * @param tag The tag name of the tag to be found or created
 14.1835 -     * @param parent The element parent under which we want to search
 14.1836 -     * @param create If true, create the element if it doesn't exist,
 14.1837 -     *    otherwise return null if the tag is not found.
 14.1838 -     */
 14.1839 -    private Element findElement(String tag, Node parent) {
 14.1840 -        NodeList list = parent.getChildNodes();
 14.1841 -        int len = list.getLength();
 14.1842 -        
 14.1843 -        for (int i = 0; i < len; i++) {
 14.1844 -            org.w3c.dom.Node child = list.item(i);
 14.1845 -            
 14.1846 -            if (child.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) {
 14.1847 -                Element element = (Element)child;
 14.1848 -                
 14.1849 -                if (tag.equals(element.getTagName())) {
 14.1850 -                    return element;
 14.1851 -                }
 14.1852 -            }
 14.1853 -        }
 14.1854 -        
 14.1855 -        return null;
 14.1856 -    }
 14.1857 -    
 14.1858 -    
 14.1859 -    /** Import the given stylesheet into the project, rewrite the url,
 14.1860 -     * and recursively copy other stylesheets and images referred to
 14.1861 -     * by the stylesheet. The stylesheet references should also be
 14.1862 -     * changed to reflect the new names. */
 14.1863 -    private void handleStyleSheet(int depth, Element element, String urlAttribute) {
 14.1864 -        if (HtmlAttribute.STYLE.equals(urlAttribute)) {
 14.1865 -            String rules = element.getAttribute(HtmlAttribute.STYLE);
 14.1866 -            
 14.1867 -            if (rules.length() == 0) {
 14.1868 -                return;
 14.1869 -            }
 14.1870 -            
 14.1871 -            ////            Document doc = MarkupUnit.createEmptyDocument(true);
 14.1872 -            ////
 14.1873 -            ////            // XXX I should share the engine for all the stylesheets
 14.1874 -            //////            doc.setUrl(context.base);
 14.1875 -            ////            InSyncService.getProvider().setUrl(doc, context.base);
 14.1876 -            ////
 14.1877 -            ////            // <markup_separation>
 14.1878 -            //////            XhtmlCssEngine ces = XhtmlCssEngine.create(doc, null, doc.getUrl());
 14.1879 -            ////            // ====
 14.1880 -            //////            XhtmlCssEngine ces = XhtmlCssEngine.create(doc, doc.getUrl());
 14.1881 -            //////            XhtmlCssEngine ces = XhtmlCssEngine.create(doc, InSyncService.getProvider().getUrl(doc));
 14.1882 -            //////            // </markup_separation>
 14.1883 -            //////// <moved from engine impl> it doesn't (shoudn't) know about RaveDocument.
 14.1884 -            //////            if (doc != null) {
 14.1885 -            ////////                doc.setCssEngine(ces);
 14.1886 -            //////                CssEngineServiceProvider.getDefault().setCssEngine(doc, ces);
 14.1887 -            //////            }
 14.1888 -            ////            CssProvider.getEngineService().createCssEngineForDocument(doc, InSyncService.getProvider().getUrl(doc));
 14.1889 -            //////            XhtmlCssEngine ces = CssEngineServiceProvider.getDefault().getCssEngine(doc);
 14.1890 -            ////// </moved from engine impl>
 14.1891 -            ////
 14.1892 -            //////            StyleDeclaration sd = ces.parseStyleDeclaration((RaveElement)element, rules);
 14.1893 -            ////            StyleDeclaration sd = CssProvider.getEngineService().parseStyleDeclarationForElement(element, rules);
 14.1894 -            ////
 14.1895 -            ////            Map rewrite = importStyleResources(depth, sd);
 14.1896 -            Map rewrite = getStyleResourcesForElement(element, rules);
 14.1897 -            
 14.1898 -            if (rewrite.size() > 0) {
 14.1899 -                String newStylesheet = replaceStrings(rewrite, rules);
 14.1900 -                element.setAttribute(HtmlAttribute.STYLE, newStylesheet);
 14.1901 -            }
 14.1902 -            
 14.1903 -            return;
 14.1904 -        } else if (element.getTagName().equals(HtmlTag.STYLE.name)) {
 14.1905 -            String rules = MarkupService.getStyleText(element);
 14.1906 -            
 14.1907 -            if (rules.length() == 0) {
 14.1908 -                return;
 14.1909 -            }
 14.1910 -            
 14.1911 -            ////            Document doc = MarkupUnit.createEmptyDocument(true);
 14.1912 -            ////
 14.1913 -            ////            // XXX I should share the engine for all the stylesheets
 14.1914 -            //////            doc.setUrl(context.base);
 14.1915 -            ////            InSyncService.getProvider().setUrl(doc, context.base);
 14.1916 -            ////
 14.1917 -            ////            // <markup_separation>
 14.1918 -            //////            XhtmlCssEngine ces = XhtmlCssEngine.create(doc, null, doc.getUrl());
 14.1919 -            ////            // ====
 14.1920 -            //////            XhtmlCssEngine ces = XhtmlCssEngine.create(doc, doc.getUrl());
 14.1921 -            //////            XhtmlCssEngine ces = XhtmlCssEngine.create(doc, InSyncService.getProvider().getUrl(doc));
 14.1922 -            //////            // </markup_separation>
 14.1923 -            //////// <moved from engine impl> it doesn't (shoudn't) know about RaveDocument.
 14.1924 -            //////            if (doc != null) {
 14.1925 -            ////////                doc.setCssEngine(ces);
 14.1926 -            //////                CssEngineServiceProvider.getDefault().setCssEngine(doc, ces);
 14.1927 -            //////            }
 14.1928 -            ////            CssProvider.getEngineService().createCssEngineForDocument(doc, InSyncService.getProvider().getUrl(doc));
 14.1929 -            //////            XhtmlCssEngine ces = CssEngineServiceProvider.getDefault().getCssEngine(doc);
 14.1930 -            ////// </moved from engine impl>
 14.1931 -            ////            InputSource is = new InputSource(new StringReader(rules));
 14.1932 -            //////            StyleSheet ss = ces.parseStyleSheet(is, context.base, "all", context.base);
 14.1933 -            ////            StyleSheet ss = CssProvider.getEngineService().parseStyleSheetForDocument(doc, is, context.base, "all", context.base); // NOI18N
 14.1934 -            ////
 14.1935 -            ////            Map rewrite = importStyleResources(depth, doc, ss);
 14.1936 -            Map rewrite = getStyleResources(rules, depth);
 14.1937 -            
 14.1938 -            if (rewrite.size() > 0) {
 14.1939 -                String newStylesheet = replaceStrings(rewrite, rules);
 14.1940 -                
 14.1941 -                // Replace child nodes of the style element
 14.1942 -                while (element.getChildNodes().getLength() > 0) {
 14.1943 -                    element.removeChild(element.getFirstChild());
 14.1944 -                }
 14.1945 -                
 14.1946 -                element.appendChild(element.getOwnerDocument().createComment(newStylesheet));
 14.1947 -            }
 14.1948 -            
 14.1949 -            return;
 14.1950 -        }
 14.1951 -        
 14.1952 -        String urlString = element.getAttribute(urlAttribute);
 14.1953 -        
 14.1954 -        if (urlString.length() == 0) {
 14.1955 -            return;
 14.1956 -        }
 14.1957 -        
 14.1958 -        // Reuse existing resource if we've already copied it in during this import
 14.1959 -        if (context.resources.get(urlString) != null) {
 14.1960 -            // Rewrite html url
 14.1961 -            element.setAttribute(urlAttribute, (String)context.resources.get(urlString));
 14.1962 -            
 14.1963 -            return;
 14.1964 -        }
 14.1965 -        
 14.1966 -        String relPath = handleStyleSheet(depth, urlString);
 14.1967 -        
 14.1968 -        if (relPath != null) {
 14.1969 -            element.setAttribute(urlAttribute, relPath);
 14.1970 -        }
 14.1971 -    }
 14.1972 -    
 14.1973 -    /** Import the given stylesheet into the project, rewrite the url,
 14.1974 -     * and recursively copy other stylesheets and images referred to
 14.1975 -     * by the stylesheet. The stylesheet references should also be
 14.1976 -     * changed to reflect the new names. */
 14.1977 -    private String handleStyleSheet(int depth, String urlString) {
 14.1978 -        URL url;
 14.1979 -        
 14.1980 -        try {
 14.1981 -            url = new URL(context.base, urlString);
 14.1982 -        } catch (MalformedURLException ex) {
 14.1983 -            ErrorManager.getDefault().notify(ex);
 14.1984 -            
 14.1985 -            return null;
 14.1986 -        }
 14.1987 -        
 14.1988 -        return handleStyleSheet(depth, urlString, url);
 14.1989 -    }
 14.1990 -    
 14.1991 -    /** Import the given stylesheet into the project, rewrite the url,
 14.1992 -     * and recursively copy other stylesheets and images referred to
 14.1993 -     * by the stylesheet. The stylesheet references should also be
 14.1994 -     * changed to reflect the new names. */
 14.1995 -    private String handleStyleSheet(int depth, String urlString, URL url) {
 14.1996 -        if (depth > 15) {
 14.1997 -            // Probably circular references!
 14.1998 -            // XXX Probably???
 14.1999 -            return null;
 14.2000 -        }
 14.2001 -        
 14.2002 -        ////        // XXX do I have to do the context.fullUrl trick here too, as in copyResource????
 14.2003 -        ////        // Parse the stylesheet
 14.2004 -        ////        Document doc = MarkupUnit.createEmptyDocument(true);
 14.2005 -        //////        doc.setUrl(context.base);
 14.2006 -        ////        InSyncService.getProvider().setUrl(doc, context.base);
 14.2007 -        ////
 14.2008 -        ////        // XXX I should share the engine for all the stylesheets
 14.2009 -        ////        // <markup_separation>
 14.2010 -        //////        XhtmlCssEngine ces = XhtmlCssEngine.create(doc, null, doc.getUrl());
 14.2011 -        ////        // ====
 14.2012 -        //////        XhtmlCssEngine ces = XhtmlCssEngine.create(doc, doc.getUrl());
 14.2013 -        //////        XhtmlCssEngine ces = XhtmlCssEngine.create(doc, InSyncService.getProvider().getUrl(doc));
 14.2014 -        //////        // </markup_separation>
 14.2015 -        //////// <moved from engine impl> it doesn't (shoudn't) know about RaveDocument.
 14.2016 -        //////        if (doc != null) {
 14.2017 -        ////////            doc.setCssEngine(ces);
 14.2018 -        //////            CssEngineServiceProvider.getDefault().setCssEngine(doc, ces);
 14.2019 -        //////        }
 14.2020 -        ////        CssProvider.getEngineService().createCssEngineForDocument(doc, InSyncService.getProvider().getUrl(doc));
 14.2021 -        //////        XhtmlCssEngine ces = CssEngineServiceProvider.getDefault().getCssEngine(doc);
 14.2022 -        ////// </moved from engine impl>
 14.2023 -        ////        InputSource is = new InputSource(url.toString());
 14.2024 -        //////        StyleSheet ss = ces.parseStyleSheet(is, url, "all", url);
 14.2025 -        ////        StyleSheet ss = CssProvider.getEngineService().parseStyleSheetForDocument(doc, is, url, "all", url); // NOI18N
 14.2026 -        ////
 14.2027 -        ////        Map rewrite = importStyleResources(depth, doc, ss);
 14.2028 -        Map rewrite = getStyleResources(url, depth);
 14.2029 -        
 14.2030 -        URL oldBase = context.base;
 14.2031 -        context.base = url;
 14.2032 -        context.base = oldBase;
 14.2033 -        
 14.2034 -        try {
 14.2035 -            String newStylesheet = replaceStrings(rewrite, read(url));
 14.2036 -            
 14.2037 -            String name = urlString.substring(urlString.lastIndexOf('/') + 1);
 14.2038 -            
 14.2039 -            if (name.indexOf('.') == -1) {
 14.2040 -                name = name + ".css"; // NOI18N
 14.2041 -            }
 14.2042 -            
 14.2043 -            // TODO - store in the resources folder instead
 14.2044 -            FileObject webFolder = null;
 14.2045 -            webFolder = JsfProjectUtils.getDocumentRoot(context.project);
 14.2046 -            
 14.2047 -            File targetFile = new File(FileUtil.toFile(webFolder), name);
 14.2048 -            
 14.2049 -            if (targetFile.exists()) {
 14.2050 -                AddResourceOverwriteDialog d = new AddResourceOverwriteDialog(targetFile);
 14.2051 -                d.showDialog();
 14.2052 -                
 14.2053 -                File newTarget = d.getFile();
 14.2054 -                
 14.2055 -                if (newTarget == null) {
 14.2056 -                    // User pressed cancel - just use the original name
 14.2057 -                    return name;
 14.2058 -                }
 14.2059 -                
 14.2060 -                if (newTarget.exists()) {
 14.2061 -                    //return linkRef;
 14.2062 -                    return name;
 14.2063 -                }
 14.2064 -                
 14.2065 -                name = newTarget.getName();
 14.2066 -                
 14.2067 -                /*
 14.2068 -                if (mimeDir != null) {
 14.2069 -                    linkRef = mimeDir + "/" + fileName;  // NOI18N
 14.2070 -                } else {
 14.2071 -                    linkRef = fileName;
 14.2072 -                }
 14.2073 -                 */
 14.2074 -            }
 14.2075 -            
 14.2076 -            DataObject ssdo = addSource(webFolder, newStylesheet, name);
 14.2077 -            String s = ssdo.getPrimaryFile().getNameExt();
 14.2078 -            
 14.2079 -            // XXX get full name
 14.2080 -            String relPath = s;
 14.2081 -            
 14.2082 -            return relPath;
 14.2083 -        } catch (IOException ex) {
 14.2084 -            if (context.warnMissingFile) {
 14.2085 -                //                InSyncService.getProvider().getRaveErrorHandler().displayError(NbBundle.getMessage(ImportPagePanel.class,
 14.2086 -                //                        "NoSuchResource", ex.getLocalizedMessage() + ": " + urlString)); // NOI18N
 14.2087 -                IllegalStateException ise = new IllegalStateException(ex);
 14.2088 -                Throwable th = ErrorManager.getDefault().annotate(ise, NbBundle.getMessage(ImportPagePanel.class, "NoSuchResource", ex.getLocalizedMessage() + ": " + urlString));
 14.2089 -                ErrorManager.getDefault().notify(ErrorManager.WARNING, th);
 14.2090 -            } else {
 14.2091 -                ErrorManager.getDefault().notify(ex);
 14.2092 -            }
 14.2093 -        }
 14.2094 -        
 14.2095 -        /*
 14.2096 -        // Now I just need to change the resourceURL to something temporary
 14.2097 -        // that I can copy from
 14.2098 -        try {
 14.2099 -            URL resourceURL = url;
 14.2100 -            String projectUrl = WebAppProject.addResource(webform, resourceURL, true);
 14.2101 -            element.setAttribute(urlAttribute, projectUrl);
 14.2102 -            return projectUrl;
 14.2103 -        } catch (IOException ex) {
 14.2104 -            ErrorManager.getDefault().notify(ex);
 14.2105 -            return null;
 14.2106 -        }
 14.2107 -         */
 14.2108 -        return null;
 14.2109 -    }
 14.2110 -    
 14.2111 -    private static Document getDom(FileObject fo) {
 14.2112 -        MarkupUnit unit = getMarkupUnit(fo);
 14.2113 -        
 14.2114 -        if (unit == null) { // possible when project has closed
 14.2115 -            
 14.2116 -            return null;
 14.2117 -        }
 14.2118 -        
 14.2119 -        return unit.getSourceDom();
 14.2120 -    }
 14.2121 -    
 14.2122 -    
 14.2123 -    
 14.2124 -    private static MarkupUnit getMarkupUnit(FileObject fo) {
 14.2125 -        FacesModel model = getModel(fo);
 14.2126 -        if(model == null) {
 14.2127 -            return null;
 14.2128 -        }
 14.2129 -        
 14.2130 -        return model.getMarkupUnit();
 14.2131 -    }
 14.2132 -    
 14.2133 -    
 14.2134 -    
 14.2135 -    /** Remove form beans in the document except for the given set of forms to keep */
 14.2136 -    private void removeBogusForms(List keepForms, FileObject webformFile) {
 14.2137 -        // Remove all form beans that are "bogus" (empty)
 14.2138 -        // Also make sure that the FacesPageUnit has the correct default parent
 14.2139 -        // after this (since it may currently be using the bogus)
 14.2140 -        // Strategy: locate all form tags in the hierarchy: those we didn't add
 14.2141 -        // via import should be yanked.
 14.2142 -        MarkupBean defaultParent = getModel(webformFile).getFacesUnit().getDefaultParent();
 14.2143 -        ArrayList allForms = new ArrayList();
 14.2144 -        findForms(allForms, getModel(webformFile).getRootBean());
 14.2145 -        
 14.2146 -        Iterator it = allForms.iterator();
 14.2147 -        
 14.2148 -        while (it.hasNext()) {
 14.2149 -            DesignBean bean = (DesignBean)it.next();
 14.2150 -            
 14.2151 -            if (!keepForms.contains(bean)) {
 14.2152 -                // <move>
 14.2153 -                //                if (FacesSupport.getMarkupBean(bean) == defaultParent) {
 14.2154 -                // ====
 14.2155 -                if (getMarkupBean(bean) == defaultParent) {
 14.2156 -                    // </move>
 14.2157 -                    defaultParent = null;
 14.2158 -                }
 14.2159 -                
 14.2160 -                getModel(webformFile).getLiveUnit().deleteBean(bean);
 14.2161 -            } else {
 14.2162 -                // <move>
 14.2163 -                //                Element e = FacesSupport.getElement(bean);
 14.2164 -                // ====
 14.2165 -                Element e = getElement(bean);
 14.2166 -                // </move>
 14.2167 -                
 14.2168 -                if (e != null) {
 14.2169 -                    e.setAttribute(HtmlAttribute.ID, bean.getInstanceName());
 14.2170 -                }
 14.2171 -            }
 14.2172 -        }
 14.2173 -        
 14.2174 -        if (defaultParent == null) {
 14.2175 -            // We've deleted the bean that used to be the parent so set a new parent
 14.2176 -            // Pick a suitable candidate.... let's pick the bean with the largest number
 14.2177 -            // of children (recursively). The rationale is that this probably includes
 14.2178 -            // the most content... so if we have a main form and a smaller form for
 14.2179 -            // say search, we pick the main form. Another possible selection criterion
 14.2180 -            // would be hierarchy depth; pick form tags closer to body than deeply
 14.2181 -            // nested forms.
 14.2182 -            int fewestChildren = Integer.MAX_VALUE;
 14.2183 -            it = keepForms.iterator();
 14.2184 -            
 14.2185 -            while (it.hasNext()) {
 14.2186 -                DesignBean bean = (DesignBean)it.next();
 14.2187 -                // <move>
 14.2188 -                //                MarkupBean mb = FacesSupport.getMarkupBean(bean);
 14.2189 -                // ====
 14.2190 -                MarkupBean mb = getMarkupBean(bean);
 14.2191 -                // </move>
 14.2192 -                
 14.2193 -                if (mb != null) {
 14.2194 -                    int children = getChildCount(mb.getElement());
 14.2195 -                    
 14.2196 -                    if (children < fewestChildren) {
 14.2197 -                        defaultParent = mb;
 14.2198 -                    }
 14.2199 -                }
 14.2200 -            }
 14.2201 -            
 14.2202 -            getModel(webformFile).getFacesUnit().setDefaultParent(defaultParent);
 14.2203 -        }
 14.2204 -    }
 14.2205 -    
 14.2206 -    
 14.2207 -    private DesignBean replaceComponent(FileObject webformFile, Element element, String className) {
 14.2208 -        return replaceComponent(webformFile, element, className, true);
 14.2209 -    }
 14.2210 -    
 14.2211 -    private DesignBean replaceComponent(FileObject webformFile, Element element, String className,
 14.2212 -            boolean copyChildren) {
 14.2213 -        LiveUnit unit = getModel(webformFile).getLiveUnit();
 14.2214 -        Node under = element.getParentNode();
 14.2215 -        Node before = element;
 14.2216 -        MarkupPosition pos = new MarkupPosition(under, before);
 14.2217 -        
 14.2218 -        DesignBean parent = null;
 14.2219 -        Node n = under;
 14.2220 -        
 14.2221 -        //        while (n instanceof RaveElement) {
 14.2222 -        //            RaveElement xel = (RaveElement)n;
 14.2223 -        while (n instanceof Element) {
 14.2224 -            Element xel = (Element)n;
 14.2225 -            
 14.2226 -            //            if (xel.getDesignBean() != null) {
 14.2227 -            //                DesignBean lbean = (DesignBean)xel.getDesignBean();
 14.2228 -            DesignBean lbean = InSyncService.getProvider().getMarkupDesignBeanForElement(xel);
 14.2229 -            if (lbean != null) {
 14.2230 -                if (lbean.isContainer()) {
 14.2231 -                    parent = lbean;
 14.2232 -                    
 14.2233 -                    break;
 14.2234 -                }
 14.2235 -            }
 14.2236 -            
 14.2237 -            n = n.getParentNode();
 14.2238 -        }
 14.2239 -        
 14.2240 -        DesignBean bean = unit.createBean(className, parent, pos);
 14.2241 -        
 14.2242 -        // Move the element's children to the new bean
 14.2243 -        if (bean != null) {
 14.2244 -            if (copyChildren) {
 14.2245 -                // <move>
 14.2246 -                //                Element e = FacesSupport.getElement(bean);
 14.2247 -                // ====
 14.2248 -                Element e = getElement(bean);
 14.2249 -                // </move>
 14.2250 -                
 14.2251 -                if (e != null) {
 14.2252 -                    NodeList nl = element.getChildNodes();
 14.2253 -                    int num = nl.getLength();
 14.2254 -                    
 14.2255 -                    if (num > 0) {
 14.2256 -                        // Copy list first since nodelist object changes
 14.2257 -                        // under us when we move the nodes
 14.2258 -                        ArrayList children = new ArrayList(num);
 14.2259 -                        
 14.2260 -                        for (int i = 0; i < num; i++) {
 14.2261 -                            children.add(nl.item(i));
 14.2262 -                        }
 14.2263 -                        
 14.2264 -                        for (int i = 0; i < num; i++) {
 14.2265 -                            e.appendChild((Node)children.get(i));
 14.2266 -                        }
 14.2267 -                    }
 14.2268 -                }
 14.2269 -            }
 14.2270 -            
 14.2271 -            // Get rid of the old element that we've replaced!
 14.2272 -            /*
 14.2273 -            // This doesn't work as expected because deleteBean on the old
 14.2274 -            // element will see that a component of id "foo" is being removed
 14.2275 -            // and it will therefore remove references to "foo" in other components
 14.2276 -            // like the "for" property of associated labels. Instead we rely on a
 14.2277 -            // sync when the import is done.
 14.2278 -            DesignBean oldBean = null;
 14.2279 -            if (element instanceof XhtmlElement) {
 14.2280 -                oldBean = ((XhtmlElement)element).getDesignBean();
 14.2281 -            }
 14.2282 -            if (oldBean != null) {
 14.2283 -                unit.deleteBean(oldBean);
 14.2284 -            } else {
 14.2285 -                under.removeChild(element);
 14.2286 -            }
 14.2287 -             */
 14.2288 -            under.removeChild(element);
 14.2289 -        }
 14.2290 -        
 14.2291 -        // TODO: remove the element since it now has a sibling!
 14.2292 -        return bean;
 14.2293 -    }
 14.2294 -    
 14.2295 -    
 14.2296 -    
 14.2297 -    private void convertProperty(DesignBean bean, Element element, String htmlAttr, String jsfProp) {
 14.2298 -        if ((bean == null) || (element == null)) {
 14.2299 -            return;
 14.2300 -        }
 14.2301 -        
 14.2302 -        if (!element.hasAttribute(htmlAttr)) {
 14.2303 -            return;
 14.2304 -        }
 14.2305 -        
 14.2306 -        String value = element.getAttribute(htmlAttr);
 14.2307 -        DesignProperty prop = bean.getProperty(jsfProp);
 14.2308 -        
 14.2309 -        if (prop == null) {
 14.2310 -            ErrorManager.getDefault().log(ErrorManager.WARNING,
 14.2311 -                    "No such jsf property alias " + jsfProp + " in bean " + bean.getInstanceName() + " for html attribute " + htmlAttr); // NOI18N
 14.2312 -            
 14.2313 -            return;
 14.2314 -        }
 14.2315 -        
 14.2316 -        // XXX Do any kind of to-Object conversion here?? Do we have any
 14.2317 -        // cases where we have to convert from e.g. a string color description
 14.2318 -        // in HTML to an actual Color object (for example) in the JSF
 14.2319 -        // component?
 14.2320 -        try {
 14.2321 -            PropertyDescriptor pd = prop.getPropertyDescriptor();
 14.2322 -            
 14.2323 -            if (pd != null) {
 14.2324 -                if (pd.getPropertyType() == Integer.TYPE) {
 14.2325 -                    try {
 14.2326 -                        int f = Integer.parseInt(value);
 14.2327 -                        prop.setValue(new Integer(f));
 14.2328 -                        
 14.2329 -                        return;
 14.2330 -                    } catch (NumberFormatException nfe) {
 14.2331 -                        ErrorManager.getDefault().notify(nfe);
 14.2332 -                    }
 14.2333 -                } else if (pd.getPropertyType() == Boolean.TYPE) {
 14.2334 -                    // True if "yes", "on", "true", "1", or <name>
 14.2335 -                    // (e.g.  checked="checked" is considered true)
 14.2336 -                    if (value.equalsIgnoreCase("yes") || // NOI18N
 14.2337 -                            value.equalsIgnoreCase("on") || // NOI18N
 14.2338 -                            value.equalsIgnoreCase("true") || // NOI18N
 14.2339 -                            value.equalsIgnoreCase("1") || // NOI18N
 14.2340 -                            value.equalsIgnoreCase(jsfProp)) {
 14.2341 -                        prop.setValue(Boolean.TRUE);
 14.2342 -                    } else {
 14.2343 -                        assert value.equalsIgnoreCase("no") || // NOI18N
 14.2344 -                                value.equalsIgnoreCase("off") || // NOI18N
 14.2345 -                                value.equalsIgnoreCase("false") || // NOI18N
 14.2346 -                                value.equalsIgnoreCase("0") || // NOI18N
 14.2347 -                                value.equalsIgnoreCase(""); // NOI18N
 14.2348 -                        prop.setValue(Boolean.FALSE);
 14.2349 -                    }
 14.2350 -                    
 14.2351 -                    return;
 14.2352 -                }
 14.2353 -            }
 14.2354 -            
 14.2355 -            prop.setValue(value);
 14.2356 -        } catch (Exception ex) { // Don't let one-value assignment stop whole conversion
 14.2357 -            ErrorManager.getDefault().notify(ex);
 14.2358 -        }
 14.2359 -    }
 14.2360 -    
 14.2361 -    /** For the given select element, find all option children and
 14.2362 -     * return as an array of strings */
 14.2363 -    private String[] extractOptions(Element element) {
 14.2364 -        Vector v = new Vector();
 14.2365 -        // <move>
 14.2366 -        //        int[] selected = FormComponentBox.populateOptions(element, v, context.webform.getMarkup());
 14.2367 -        // ====
 14.2368 -        int[] selected = populateOptions(element, v, getMarkupUnit(context.webformFile));
 14.2369 -        // </move>
 14.2370 -        
 14.2371 -        // XXX Can I somehow preserve the selection into the data?
 14.2372 -        if (v.size() == 0) {
 14.2373 -            return new String[0];
 14.2374 -        }
 14.2375 -        
 14.2376 -        return (String[])v.toArray(new String[v.size()]);
 14.2377 -    }
 14.2378 -    
 14.2379 -    private DesignBean replaceTag(FileObject webformFile, Element element, String className) {
 14.2380 -        boolean copyChildren = true;
 14.2381 -        LiveUnit unit = getModel(webformFile).getLiveUnit();
 14.2382 -        Node under = element.getParentNode();
 14.2383 -        Node before = element;
 14.2384 -        MarkupPosition pos = new MarkupPosition(under, before);
 14.2385 -        
 14.2386 -        DesignBean parent = null;
 14.2387 -        Node n = under;
 14.2388 -        
 14.2389 -        //        while (n instanceof RaveElement) {
 14.2390 -        //            RaveElement xel = (RaveElement)n;
 14.2391 -        while (n instanceof Element) {
 14.2392 -            Element xel = (Element)n;
 14.2393 -            
 14.2394 -            //            if (xel.getDesignBean() != null) {
 14.2395 -            //                DesignBean lbean = (DesignBean)xel.getDesignBean();
 14.2396 -            DesignBean lbean = InSyncService.getProvider().getMarkupDesignBeanForElement(xel);
 14.2397 -            if (lbean != null) {
 14.2398 -                if (lbean.isContainer()) {
 14.2399 -                    parent = lbean;
 14.2400 -                    
 14.2401 -                    break;
 14.2402 -                }
 14.2403 -            }
 14.2404 -            
 14.2405 -            n = n.getParentNode();
 14.2406 -        }
 14.2407 -        
 14.2408 -        DesignBean bean = unit.createBean(className, parent, pos);
 14.2409 -        
 14.2410 -        // Move the element's children to the new bean
 14.2411 -        if (bean != null) {
 14.2412 -            // Copy all the attributes!!
 14.2413 -            // <move>
 14.2414 -            //            Element e = FacesSupport.getElement(bean);
 14.2415 -            // ====
 14.2416 -            Element e = getElement(bean);
 14.2417 -            // </move>
 14.2418 -            
 14.2419 -            if (e != null) {
 14.2420 -                int numAttr = element.getAttributes().getLength();
 14.2421 -                
 14.2422 -                for (int i = 0; i < numAttr; i++) {
 14.2423 -                    Node a = element.getAttributes().item(i); // XXX move element.getAttributes out of loop
 14.2424 -                    String attribute = a.getNodeName();
 14.2425 -                    
 14.2426 -                    if (attribute.equals(FacesBean.BINDING_ATTR)) {
 14.2427 -                        // Don't mess with component binding!!!
 14.2428 -                        continue;
 14.2429 -                    }
 14.2430 -                    
 14.2431 -                    String value = a.getNodeValue();
 14.2432 -                    e.setAttribute(a.getNodeName(), a.getNodeValue());
 14.2433 -                    
 14.2434 -                    DesignProperty prop = bean.getProperty(attribute);
 14.2435 -                    
 14.2436 -                    try {
 14.2437 -                        if (prop != null) {
 14.2438 -                            prop.setValue(value);
 14.2439 -                        }
 14.2440 -                    } catch (Exception ex) {
 14.2441 -                        ErrorManager.getDefault().notify(ex);
 14.2442 -                    }
 14.2443 -                }
 14.2444 -                
 14.2445 -                if (copyChildren) {
 14.2446 -                    NodeList nl = element.getChildNodes();
 14.2447 -                    int num = nl.getLength();
 14.2448 -                    
 14.2449 -                    if (num > 0) {
 14.2450 -                        // Copy list first since nodelist object changes
 14.2451 -                        // under us when we move the nodes
 14.2452 -                        ArrayList children = new ArrayList(num);
 14.2453 -                        
 14.2454 -                        for (int i = 0; i < num; i++) {
 14.2455 -                            children.add(nl.item(i));
 14.2456 -                        }
 14.2457 -                        
 14.2458 -                        for (int i = 0; i < num; i++) {
 14.2459 -                            e.appendChild((Node)children.get(i));
 14.2460 -                        }
 14.2461 -                    }
 14.2462 -                }
 14.2463 -            }
 14.2464 -            
 14.2465 -            // Get rid of the old element that we've replaced!
 14.2466 -            under.removeChild(element);
 14.2467 -        }
 14.2468 -        
 14.2469 -        // TODO: remove the element since it now has a sibling!
 14.2470 -        return bean;
 14.2471 -    }
 14.2472 -    
 14.2473 -    /** XXX Copy from designer FacesSupport, it shouldn't be neither in designer not here. */
 14.2474 -    private static Element getElement(DesignBean lb) {
 14.2475 -        if (lb instanceof MarkupDesignBean) {
 14.2476 -            return ((MarkupDesignBean)lb).getElement();
 14.2477 -        } else {
 14.2478 -            return null;
 14.2479 -        }
 14.2480 -    }
 14.2481 -    
 14.2482 -    
 14.2483 -    
 14.2484 -    /** XXX Copy from designer FormComponentBox, it shouldn't be neither in designer not here. */
 14.2485 -    private static int[] populateOptions(Element element, Vector v, MarkupUnit markup) {
 14.2486 -        // <markup_separation>
 14.2487 -        //        MarkupService markupService = MarkupServiceProvider.getDefault();
 14.2488 -        // </markup_separation>
 14.2489 -        ArrayList selected = new ArrayList();
 14.2490 -        NodeList list = element.getChildNodes();
 14.2491 -        int len = list.getLength();
 14.2492 -        
 14.2493 -        for (int i = 0; i < len; i++) {
 14.2494 -            Node child = list.item(i);
 14.2495 -            
 14.2496 -            if (child.getNodeType() != Node.ELEMENT_NODE) {
 14.2497 -                continue;
 14.2498 -            }
 14.2499 -            
 14.2500 -            Element option = (Element)child;
 14.2501 -            
 14.2502 -            if (!option.getTagName().equals(HtmlTag.OPTION.getTagName())) {
 14.2503 -                continue;
 14.2504 -            }
 14.2505 -            
 14.2506 -            // Found an option
 14.2507 -            NodeList list2 = option.getChildNodes();
 14.2508 -            int len2 = list2.getLength();
 14.2509 -            StringBuffer sb = new StringBuffer();
 14.2510 -            
 14.2511 -            for (int j = 0; j < len2; j++) {
 14.2512 -                Node child2 = list2.item(j);
 14.2513 -                
 14.2514 -                if ((child2.getNodeType() != Node.TEXT_NODE) &&
 14.2515 -                        (child2.getNodeType() != Node.CDATA_SECTION_NODE)) {
 14.2516 -                    continue;
 14.2517 -                }
 14.2518 -                
 14.2519 -                String nodeVal = child2.getNodeValue();
 14.2520 -                
 14.2521 -                if (nodeVal != null) {
 14.2522 -                    nodeVal = nodeVal.trim();
 14.2523 -                    
 14.2524 -                    //                    RaveText textNode = (child2 instanceof RaveText) ? (RaveText)child2 : null;
 14.2525 -                    Text textNode = (child2 instanceof Text) ? (Text)child2 : null;
 14.2526 -                    
 14.2527 -                    //                    if ((textNode != null) && textNode.isJspx()) {
 14.2528 -                    if (textNode != null && MarkupService.isJspxNode(textNode)) {
 14.2529 -                        // <markup_separation>
 14.2530 -                        //                        nodeVal = markupService.expandHtmlEntities(nodeVal, true, element);
 14.2531 -                        // ====
 14.2532 -                        nodeVal = InSyncService.getProvider().expandHtmlEntities(nodeVal, true, element);
 14.2533 -                        // </markup_separation>
 14.2534 -                    } // ELSE: regular entity fixing?
 14.2535 -                    
 14.2536 -                    sb.append(nodeVal);
 14.2537 -                    
 14.2538 -                    // XXX I should be able to bail here - for combo
 14.2539 -                    // boxes I only show the first item! (There's no
 14.2540 -                    // way for the user to open the menu). However,
 14.2541 -                    // for things like a multi select, you need to
 14.2542 -                    // show possibly multiple choices, so perhaps pass
 14.2543 -                    // in a max count?
 14.2544 -                }
 14.2545 -            }
 14.2546 -            
 14.2547 -            if (sb.length() > 0) {
 14.2548 -                // Is this item selected too?
 14.2549 -                Attr attr = option.getAttributeNode(HtmlAttribute.SELECTED);
 14.2550 -                
 14.2551 -                if (attr != null) {
 14.2552 -                    selected.add(new Integer(v.size()));
 14.2553 -                }
 14.2554 -                
 14.2555 -                v.addElement(sb.toString());
 14.2556 -            }
 14.2557 -        }
 14.2558 -        
 14.2559 -        if (selected != null) {
 14.2560 -            int[] result = new int[selected.size()];
 14.2561 -            
 14.2562 -            for (int i = 0, n = selected.size(); i < n; i++) {
 14.2563 -                result[i] = ((Integer)selected.get(i)).intValue();
 14.2564 -            }
 14.2565 -            
 14.2566 -            return result;
 14.2567 -        }
 14.2568 -        
 14.2569 -        return null;
 14.2570 -    }
 14.2571 -    
 14.2572 -    
 14.2573 -    
 14.2574 -    private void initPaletteComponents() {
 14.2575 -        if (context.paletteComponents != null) {
 14.2576 -            return;
 14.2577 -        }
 14.2578 -        
 14.2579 -        context.paletteComponents = new HashMap(200);
 14.2580 -        
 14.2581 -        //        // Iterate over the palette contents and locate all available components
 14.2582 -        //        // such that I can create a reverse map, from tag name to component name.
 14.2583 -        //        // This is used in component import to create binding attributes
 14.2584 -        //        // to concrete components, since JSPs being imported may not contain these
 14.2585 -        //        // (page import doesn't study java code, and besides, JSF doesn't require
 14.2586 -        //        // component binding but we always need it.)
 14.2587 -        //        Palette[] palettes = PaletteComponentModel.getInstance().getPalettes();
 14.2588 -        //        for (int i = 0; palettes != null && i < palettes.length; i++) {
 14.2589 -        //            PaletteSection[] paletteSections = palettes[i].getPaletteSections();
 14.2590 -        //            for (int j = 0; paletteSections != null && j < paletteSections.length; j++) {
 14.2591 -        //                PaletteItem[] paletteItems = paletteSections[j].getItems();
 14.2592 -        //                for (int k = 0; paletteItems != null && k < paletteItems.length; k++) {
 14.2593 -        //                    PaletteItem pi = paletteItems[k];
 14.2594 -        //
 14.2595 -        //                    if (pi instanceof BeanPaletteItem) {
 14.2596 -        //                        BeanPaletteItem bpi = (BeanPaletteItem)pi;
 14.2597 -        //
 14.2598 -        //                        // getBeanClassName() seems to do more work than it should!!
 14.2599 -        //                        String className = bpi.getName();
 14.2600 -        //                        BeanInfo beanInfo = BeanPaletteItem.loadBeanInfo(className);
 14.2601 -        //
 14.2602 -        //                        if (beanInfo != null) {
 14.2603 -        //                            String tagName = FacesUnit.getBeanTagName(beanInfo);
 14.2604 -        //
 14.2605 -        //                            if ((tagName != null) && (tagName.length() > 0)) {
 14.2606 -        //                                context.paletteComponents.put(tagName, className);
 14.2607 -        //                            }
 14.2608 -        //                        }
 14.2609 -        //                    }
 14.2610 -        //                }
 14.2611 -        //            }
 14.2612 -        //        }
 14.2613 -        // TODO The old way is not working now, there needs to be new API made.
 14.2614 -        //        context.paletteComponents = Complib.getTagName2ClassNameMap(context.project);
 14.2615 -        ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL,
 14.2616 -                new IllegalStateException("Missing API (from complib?) to provide map with tag names to class names for project, project=" + context.project)); // TEMP
 14.2617 -        context.paletteComponents = Collections.EMPTY_MAP;
 14.2618 -    }
 14.2619 -    
 14.2620 -    /** XXX Copy from designer FacesSupport, it shouldn't be neither in designer not here. */
 14.2621 -    private static boolean isValueBindingExpression(String s, boolean containsOk) {
 14.2622 -        assert s != null;
 14.2623 -        
 14.2624 -        // TODO: Use
 14.2625 -        //  ((FacesDesignProperty)designProperty).isBound()
 14.2626 -        // instead - so change to passing in a DesignProperty etc.
 14.2627 -        if (containsOk) {
 14.2628 -            return s.indexOf("#{") != -1; // NOI18N
 14.2629 -        } else {
 14.2630 -            return s.startsWith("#{"); // NOI18N
 14.2631 -        }
 14.2632 -    }
 14.2633 -    
 14.2634 -    
 14.2635 -    private Map getStyleResourcesForElement(Element element, String rules) {
 14.2636 -        //        Document doc = MarkupUnit.createEmptyDocument(true);
 14.2637 -        Document doc = createEmptyDocument();
 14.2638 -        InSyncService.getProvider().setUrl(doc, context.base);
 14.2639 -        
 14.2640 -        //        URL docUrl = InSyncService.getProvider().getUrl(doc);
 14.2641 -        //        CssProvider.getEngineService().createCssEngineForDocument(doc, docUrl);
 14.2642 -        //        StyleDeclaration sd = CssProvider.getEngineService().parseStyleDeclarationForElement(element, rules);
 14.2643 -        //        String[] urlStrings = getStyleResourcesFromStyleDeclaration(sd);
 14.2644 -        URL docUrl = InSyncService.getProvider().getUrl(doc);
 14.2645 -        String[] urlStrings = CssProvider.getEngineService().getStyleResourcesForElement(
 14.2646 -                element,
 14.2647 -                rules,
 14.2648 -                doc,
 14.2649 -                docUrl,
 14.2650 -                new int[] {XhtmlCss.BACKGROUND_IMAGE_INDEX, XhtmlCss.LIST_STYLE_IMAGE_INDEX});
 14.2651 -        
 14.2652 -        return importStyleResources(urlStrings);
 14.2653 -    }
 14.2654 -    
 14.2655 -    private Map getStyleResources(String rules, int depth) {
 14.2656 -        //        Document doc = MarkupUnit.createEmptyDocument(true);
 14.2657 -        Document doc = createEmptyDocument();
 14.2658 -        InSyncService.getProvider().setUrl(doc, context.base);
 14.2659 -        
 14.2660 -        //        URL docUrl = InSyncService.getProvider().getUrl(doc);
 14.2661 -        //        CssProvider.getEngineService().createCssEngineForDocument(doc, docUrl);
 14.2662 -        //        InputSource is = new InputSource(new StringReader(rules));
 14.2663 -        //        StyleSheet ss = CssProvider.getEngineService().parseStyleSheetForDocument(doc, is, context.base, "all", context.base); // NOI18N
 14.2664 -        //        ResourceData[] resourceData = getStyleResourcesFromStyleSheet(doc, ss);
 14.2665 -        URL docUrl = InSyncService.getProvider().getUrl(doc);
 14.2666 -        ResourceData[] resourceData = CssProvider.getEngineService().getStyleResourcesForRules(
 14.2667 -                rules,
 14.2668 -                doc,
 14.2669 -                docUrl,
 14.2670 -                context.base,
 14.2671 -                new int[] {XhtmlCss.BACKGROUND_IMAGE_INDEX, XhtmlCss.LIST_STYLE_IMAGE_INDEX});
 14.2672 -        
 14.2673 -        return importStyleResources(depth, resourceData);
 14.2674 -    }
 14.2675 -    
 14.2676 -    private Map getStyleResources(URL url, int depth) {
 14.2677 -        //        Document doc = MarkupUnit.createEmptyDocument(true);
 14.2678 -        Document doc = createEmptyDocument();
 14.2679 -        InSyncService.getProvider().setUrl(doc, context.base);
 14.2680 -        
 14.2681 -        //        URL docUrl = InSyncService.getProvider().getUrl(doc);
 14.2682 -        //        CssProvider.getEngineService().createCssEngineForDocument(doc, docUrl);
 14.2683 -        //        InputSource is = new InputSource(url.toString());
 14.2684 -        //        StyleSheet ss = CssProvider.getEngineService().parseStyleSheetForDocument(doc, is, url, "all", url); // NOI18N
 14.2685 -        //        ResourceData[] resourceData = getStyleResourcesFromStyleSheet(doc, ss);
 14.2686 -        URL docUrl = InSyncService.getProvider().getUrl(doc);
 14.2687 -        ResourceData[] resourceData = CssProvider.getEngineService().getStyleResourcesForUrl(
 14.2688 -                url,
 14.2689 -                doc,
 14.2690 -                docUrl,
 14.2691 -                new int[] {XhtmlCss.BACKGROUND_IMAGE_INDEX, XhtmlCss.LIST_STYLE_IMAGE_INDEX});
 14.2692 -        
 14.2693 -        return importStyleResources(depth, resourceData);
 14.2694 -    }
 14.2695 -    
 14.2696 -    /** Replace the keys in oldStylesheet with values from the hashmap. */
 14.2697 -    private String replaceStrings(Map rewrite, String oldStylesheet) {
 14.2698 -        Set keySet = rewrite.keySet();
 14.2699 -        String newStylesheet = oldStylesheet;
 14.2700 -        
 14.2701 -        if (keySet.size() > 0) {
 14.2702 -            String[] keys = (String[])keySet.toArray(new String[keySet.size()]);
 14.2703 -            String[] values = new String[keys.length];
 14.2704 -            
 14.2705 -            for (int i = 0; i < keys.length; i++) {
 14.2706 -                values[i] = (String)rewrite.get(keys[i]);
 14.2707 -            }
 14.2708 -            
 14.2709 -            StringBuffer sb = new StringBuffer(oldStylesheet.length() + 200);
 14.2710 -            int m = keys.length;
 14.2711 -            outer:
 14.2712 -                for (int i = 0, n = oldStylesheet.length(); i < n; i++) {
 14.2713 -                    for (int j = 0; j < m; j++) {
 14.2714 -                        if (oldStylesheet.startsWith(keys[j], i)) {
 14.2715 -                            // Replace here!
 14.2716 -                            sb.append(values[j]);
 14.2717 -                            i += (keys[j].length() - 1); // -1: since we're going to add in for loop
 14.2718 -                            
 14.2719 -                            continue outer;
 14.2720 -                        }
 14.2721 -                    }
 14.2722 -                    
 14.2723 -                    sb.append(oldStylesheet.charAt(i));
 14.2724 -                }
 14.2725 -                
 14.2726 -                newStylesheet = sb.toString();
 14.2727 -        }
 14.2728 -        
 14.2729 -        return newStylesheet;
 14.2730 -    }
 14.2731 -    
 14.2732 -    private String read(URL url) throws IOException {
 14.2733 -        StringBuffer sb = new StringBuffer(1000); // XXX is there a utility method for this?
 14.2734 -        InputStream is = null;
 14.2735 -        BufferedInputStream in = null;
 14.2736 -        
 14.2737 -        try {
 14.2738 -            is = url.openStream();
 14.2739 -            in = new BufferedInputStream(is);
 14.2740 -            
 14.2741 -            int c;
 14.2742 -            
 14.2743 -            while ((c = in.read()) != -1)
 14.2744 -                sb.append((char)c);
 14.2745 -        } finally {
 14.2746 -            try {
 14.2747 -                if (in != null) {
 14.2748 -                    in.close();
 14.2749 -                }
 14.2750 -            } catch (IOException ioe) {
 14.2751 -                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe);
 14.2752 -            }
 14.2753 -        }
 14.2754 -        
 14.2755 -        return sb.toString();
 14.2756 -    }
 14.2757 -    
 14.2758 -    
 14.2759 -    
 14.2760 -    
 14.2761 -    
 14.2762 -    /** Based closely on WebAppProject.addResource, but adds to the source folder instead. (The "source" folder can be anything, not necessary just the form folder. I should change the name -- TODO). */
 14.2763 -    private DataObject addSource(FileObject formFolderFO, String contents, String name)
 14.2764 -            throws IOException {
 14.2765 -        //GenericFolder formFolder = (GenericFolder)webForm.getParent();
 14.2766 -        //DataObject formFolderDO = formFolder.getDataObject();
 14.2767 -        //FileObject formFolderFO = formFolderDO.getPrimaryFile();
 14.2768 -        InputStream is = null;
 14.2769 -        OutputStream os = null;
 14.2770 -        BufferedInputStream in = null;
 14.2771 -        BufferedOutputStream out = null;
 14.2772 -        FileLock lock = null;
 14.2773 -        
 14.2774 -        try {
 14.2775 -            is = new StringBufferInputStream(contents);
 14.2776 -            
 14.2777 -            FileObject resourceFO = null;
 14.2778 -            resourceFO = formFolderFO.getFileObject(name);
 14.2779 -            
 14.2780 -            if (resourceFO == null) {
 14.2781 -                resourceFO = formFolderFO.createData(name);
 14.2782 -            }
 14.2783 -            
 14.2784 -            lock = resourceFO.lock();
 14.2785 -            os = resourceFO.getOutputStream(lock);
 14.2786 -            in = new BufferedInputStream(is);
 14.2787 -            out = new BufferedOutputStream(os);
 14.2788 -            
 14.2789 -            int c;
 14.2790 -            
 14.2791 -            while ((c = in.read()) != -1)
 14.2792 -                out.write(c);
 14.2793 -            
 14.2794 -            DataObject dobj = DataObject.find(resourceFO);
 14.2795 -            
 14.2796 -            return dobj;
 14.2797 -        } catch (IOException e) {
 14.2798 -            throw e;
 14.2799 -        } finally {
 14.2800 -            try {
 14.2801 -                if (lock != null) {
 14.2802 -                    lock.releaseLock();
 14.2803 -                }
 14.2804 -                
 14.2805 -                if (in != null) {
 14.2806 -                    in.close();
 14.2807 -                }
 14.2808 -                
 14.2809 -                if (out != null) {
 14.2810 -                    out.close();
 14.2811 -                }
 14.2812 -            } catch (IOException ioe) {
 14.2813 -                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe);
 14.2814 -            }
 14.2815 -        }
 14.2816 -    }
 14.2817 -    
 14.2818 -    
 14.2819 -    
 14.2820 -    /** Locate all UIForm beans in the component tree */
 14.2821 -    private void findForms(List list, DesignBean bean) {
 14.2822 -        if (bean.getInstance() instanceof UIForm) {
 14.2823 -            list.add(bean);
 14.2824 -        }
 14.2825 -        
 14.2826 -        for (int i = 0, n = bean.getChildBeanCount(); i < n; i++) {
 14.2827 -            findForms(list, bean.getChildBean(i));
 14.2828 -        }
 14.2829 -    }
 14.2830 -    
 14.2831 -    
 14.2832 -    /** XXX Copy from designer FacesSupport, it shouldn't be neither in designer not here. */
 14.2833 -    private static MarkupBean getMarkupBean(DesignBean lb) {
 14.2834 -        if (!(lb instanceof BeansDesignBean)) {
 14.2835 -            return null;
 14.2836 -        }
 14.2837 -        
 14.2838 -        Bean b = ((BeansDesignBean)lb).getBean();
 14.2839 -        
 14.2840 -        if (b instanceof MarkupBean) {
 14.2841 -            return (MarkupBean)b;
 14.2842 -        }
 14.2843 -        
 14.2844 -        return null;
 14.2845 -    }
 14.2846 -    
 14.2847 -    
 14.2848 -    private int getChildCount(Node n) {
 14.2849 -        int count = 1; // me
 14.2850 -        NodeList nl = n.getChildNodes();
 14.2851 -        
 14.2852 -        for (int i = 0; i < nl.getLength(); i++) {
 14.2853 -            count += getChildCount(nl.item(i));
 14.2854 -        }
 14.2855 -        
 14.2856 -        return count;
 14.2857 -    }
 14.2858 -    
 14.2859 -    
 14.2860 -    // Moved from insync/MarkupUnit.
 14.2861 -    private static Document createEmptyDocument() {
 14.2862 -        try {
 14.2863 -            org.xml.sax.InputSource is =
 14.2864 -                    new org.xml.sax.InputSource(new StringReader("<html><body><p/></body></html>"));
 14.2865 -            DocumentBuilder parser = MarkupService.createRaveSourceDocumentBuilder(true);
 14.2866 -            Document doc = parser.parse(is);
 14.2867 -            return doc;
 14.2868 -        } catch (java.io.IOException e) {
 14.2869 -            // should not happen reading from a string!
 14.2870 -            //            Trace.trace("insync.markup", "Error in createEmptyDocument");
 14.2871 -            //            Trace.trace("insync.markup", e);
 14.2872 -            e.printStackTrace();
 14.2873 -        } catch (org.xml.sax.SAXException e) {
 14.2874 -            //            Trace.trace("insync.markup", "Error in createEmptyDocument");
 14.2875 -            //            Trace.trace("insync.markup", e);
 14.2876 -            e.printStackTrace();
 14.2877 -        } catch (javax.xml.parsers.ParserConfigurationException e) {
 14.2878 -            //            Trace.trace("insync.markup", "Error in createEmptyDocument");
 14.2879 -            //            Trace.trace("insync.markup", e);
 14.2880 -            e.printStackTrace();
 14.2881 -        }
 14.2882 -        return null;
 14.2883 -    }
 14.2884 -    
 14.2885 -    private Map importStyleResources(String[] urlStrings) {
 14.2886 -        Map rewrite = new HashMap();
 14.2887 -        
 14.2888 -        for(int i = 0; i < urlStrings.length; i++) {
 14.2889 -            String urlString = urlStrings[i];
 14.2890 -            // Import the image, as newUrl
 14.2891 -            String projectUrl = copyResource(urlString);
 14.2892 -            if (projectUrl != null) {
 14.2893 -                rewrite.put(urlString, projectUrl);
 14.2894 -            }
 14.2895 -        }
 14.2896 -        return rewrite;
 14.2897 -    }
 14.2898 -    
 14.2899 -    private Map importStyleResources(int depth, ResourceData[] resourceData) {
 14.2900 -        Map rewrite = new HashMap();
 14.2901 -        for (int i = 0; i < resourceData.length; i++) {
 14.2902 -            ResourceData rd = resourceData[i];
 14.2903 -            if (rd instanceof UrlStringsResourceData) {
 14.2904 -                UrlStringsResourceData urlStringsResourceData = (UrlStringsResourceData)rd;
 14.2905 -                rewrite.putAll(importStyleResources(urlStringsResourceData.getUrlStrings()));
 14.2906 -            } else if (rd instanceof UrlResourceData) {
 14.2907 -                UrlResourceData urlResourceData = (UrlResourceData)rd;
 14.2908 -                String relPath;
 14.2909 -                try {
 14.2910 -                    relPath = importStyleSheetResource(depth, urlResourceData.getUrl(), urlResourceData.getUrlString());
 14.2911 -                } catch (MalformedURLException mfu) {
 14.2912 -                    // XXX shouldn't happen
 14.2913 -                    ErrorManager.getDefault().notify(mfu);
 14.2914 -                    return rewrite;
 14.2915 -                }
 14.2916 -                
 14.2917 -                if (relPath != null) {
 14.2918 -                    rewrite.put(urlResourceData.getUrlString(), relPath);
 14.2919 -                }
 14.2920 -            } else {
 14.2921 -                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL,
 14.2922 -                        new IllegalStateException("Unexpected resourceData=" + rd)); // NOI18N
 14.2923 -            }
 14.2924 -        }
 14.2925 -        return rewrite;
 14.2926 -    }
 14.2927 -    
 14.2928 -    private String importStyleSheetResource(int depth, URL url, String urlString) throws MalformedURLException {
 14.2929 -        String parent = new File(url.getPath()).getParent() + "/";
 14.2930 -        URL oldBase = context.base;
 14.2931 -        
 14.2932 -        context.base = new URL(url.getProtocol(), url.getHost(), url.getPort(), parent);
 14.2933 -        
 14.2934 -        //        String urlString = mr.getRelativeUri();
 14.2935 -        String relPath = handleStyleSheet(depth + 1, urlString, url);
 14.2936 -        context.base = oldBase;
 14.2937 -        return relPath;
 14.2938 -    }
 14.2939 -    
 14.2940 -}
 14.2941 -
    15.1 --- a/visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/ImportContext.java	Wed Feb 23 20:05:40 2011 -0500
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,98 +0,0 @@
    15.4 -/*
    15.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    15.6 - *
    15.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    15.8 - *
    15.9 - * The contents of this file are subject to the terms of either the GNU
   15.10 - * General Public License Version 2 only ("GPL") or the Common
   15.11 - * Development and Distribution License("CDDL") (collectively, the
   15.12 - * "License"). You may not use this file except in compliance with the
   15.13 - * License. You can obtain a copy of the License at
   15.14 - * http://www.netbeans.org/cddl-gplv2.html
   15.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   15.16 - * specific language governing permissions and limitations under the
   15.17 - * License.  When distributing the software, include this License Header
   15.18 - * Notice in each file and include the License file at
   15.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   15.20 - * particular file as subject to the "Classpath" exception as provided
   15.21 - * by Sun in the GPL Version 2 section of the License file that
   15.22 - * accompanied this code. If applicable, add the following below the
   15.23 - * License Header, with the fields enclosed by brackets [] replaced by
   15.24 - * your own identifying information:
   15.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   15.26 - *
   15.27 - * Contributor(s):
   15.28 - *
   15.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   15.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   15.31 - * Microsystems, Inc. All Rights Reserved.
   15.32 - *
   15.33 - * If you wish your version of this file to be governed by only the CDDL
   15.34 - * or only the GPL Version 2, indicate your decision by adding
   15.35 - * "[Contributor] elects to include this software in this distribution
   15.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   15.37 - * single choice of license, a recipient has the option to distribute
   15.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   15.39 - * to extend the choice of license to its licensees as provided above.
   15.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   15.41 - * Version 2 license, then the option applies only if the new code is
   15.42 - * made subject to such option by the copyright holder.
   15.43 - */
   15.44 -/*
   15.45 - * Context.java
   15.46 - *
   15.47 - * Created on February 13, 2007, 10:24 AM
   15.48 - *
   15.49 - * To change this template, choose Tools | Template Manager
   15.50 - * and open the template in the editor.
   15.51 - */
   15.52 -
   15.53 -package org.netbeans.modules.visualweb.project.importpage;
   15.54 -
   15.55 -import java.net.URL;
   15.56 -import java.util.ArrayList;
   15.57 -import java.util.HashMap;
   15.58 -import java.util.Map;
   15.59 -import java.util.Set;
   15.60 -import org.netbeans.api.project.Project;
   15.61 -import org.openide.filesystems.FileObject;
   15.62 -import org.openide.loaders.DataObject;
   15.63 -import org.w3c.dom.Document;
   15.64 -
   15.65 -/**
   15.66 - *
   15.67 - * @author joelle
   15.68 - */
   15.69 -public class ImportContext {
   15.70 -    
   15.71 -    private static ImportContext importContext = null;
   15.72 -    
   15.73 -    /** Creates a new instance of Context */
   15.74 -    public ImportContext() {
   15.75 -    }
   15.76 -    
   15.77 -    public static ImportContext getInstance() {
   15.78 -        if (importContext == null) {
   15.79 -            importContext = new ImportContext();
   15.80 -        } 
   15.81 -        return importContext;         
   15.82 -    }
   15.83 -    
   15.84 -        boolean fragment;
   15.85 -        Document parsedDocument;
   15.86 -        Project project;
   15.87 -        FileObject webformFile;
   15.88 -        DataObject webformDobj;
   15.89 -        Map paletteComponents;
   15.90 -        ArrayList formsAdded;
   15.91 -        Set names;
   15.92 -        ArrayList tagLibs;
   15.93 -        boolean haveOldJsp;
   15.94 -        URL base;
   15.95 -        URL fullUrl;
   15.96 -        boolean warnMissingFile = true;
   15.97 -        HashMap resources;
   15.98 -        boolean copyResources;
   15.99 -        Map nameSpaces;
  15.100 -    
  15.101 -}
    16.1 --- a/visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/ImportPagePanel.form	Wed Feb 23 20:05:40 2011 -0500
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,178 +0,0 @@
    16.4 -<?xml version="1.0" encoding="UTF-8" ?>
    16.5 -
    16.6 -<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
    16.7 -  <Properties>
    16.8 -    <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
    16.9 -      <Dimension value="[600, 300]"/>
   16.10 -    </Property>
   16.11 -  </Properties>
   16.12 -  <AuxValues>
   16.13 -    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
   16.14 -    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
   16.15 -    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
   16.16 -    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
   16.17 -    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
   16.18 -  </AuxValues>
   16.19 -
   16.20 -  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
   16.21 -  <SubComponents>
   16.22 -    <Component class="javax.swing.JLabel" name="fileLabel">
   16.23 -      <Properties>
   16.24 -        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
   16.25 -          <ComponentRef name="fileField"/>
   16.26 -        </Property>
   16.27 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
   16.28 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="FileOrURL" replaceFormat="NbBundle.getMessage(ImportPagePanel.class, &quot;{key}&quot;)"/>
   16.29 -        </Property>
   16.30 -      </Properties>
   16.31 -      <Constraints>
   16.32 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   16.33 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
   16.34 -        </Constraint>
   16.35 -      </Constraints>
   16.36 -    </Component>
   16.37 -    <Component class="javax.swing.JTextField" name="fileField">
   16.38 -      <Constraints>
   16.39 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   16.40 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
   16.41 -        </Constraint>
   16.42 -      </Constraints>
   16.43 -    </Component>
   16.44 -    <Component class="javax.swing.JButton" name="browseButton">
   16.45 -      <Properties>
   16.46 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
   16.47 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="Browse" replaceFormat="NbBundle.getMessage(ImportPagePanel.class, &quot;{key}&quot;)"/>
   16.48 -        </Property>
   16.49 -      </Properties>
   16.50 -      <Events>
   16.51 -        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/>
   16.52 -      </Events>
   16.53 -      <Constraints>
   16.54 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   16.55 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/>
   16.56 -        </Constraint>
   16.57 -      </Constraints>
   16.58 -    </Component>
   16.59 -    <Component class="javax.swing.JLabel" name="encodingLabel">
   16.60 -      <Properties>
   16.61 -        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
   16.62 -          <ComponentRef name="encodingCombo"/>
   16.63 -        </Property>
   16.64 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
   16.65 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="Encoding" replaceFormat="NbBundle.getMessage(ImportPagePanel.class, &quot;{key}&quot;)"/>
   16.66 -        </Property>
   16.67 -      </Properties>
   16.68 -      <Constraints>
   16.69 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   16.70 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="12" insetsBottom="0" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/>
   16.71 -        </Constraint>
   16.72 -      </Constraints>
   16.73 -    </Component>
   16.74 -    <Component class="javax.swing.JComboBox" name="encodingCombo">
   16.75 -      <Constraints>
   16.76 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   16.77 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="12" insetsBottom="0" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/>
   16.78 -        </Constraint>
   16.79 -      </Constraints>
   16.80 -    </Component>
   16.81 -    <Component class="javax.swing.JCheckBox" name="includeCheckBox">
   16.82 -      <Properties>
   16.83 -        <Property name="selected" type="boolean" value="true"/>
   16.84 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
   16.85 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="IncludeFiles" replaceFormat="NbBundle.getMessage(ImportPagePanel.class, &quot;{key}&quot;)"/>
   16.86 -        </Property>
   16.87 -      </Properties>
   16.88 -      <Constraints>
   16.89 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
   16.90 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/>
   16.91 -        </Constraint>
   16.92 -      </Constraints>
   16.93 -    </Component>
   16.94 -    <Component class="javax.swing.JLabel" name="pageNameLabel">
   16.95 -      <Properties>
   16.96 -        <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
   16.97 -          <ComponentRef name="pageNameField"/>
   16.98 -        </Property>
   16.99 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  16.100 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="PageName" replaceFormat="NbBundle.getMessage(ImportPagePanel.class, &quot;{key}&quot;)"/>
  16.101 -        </Property>
  16.102 -      </Properties>
  16.103 -      <Constraints>
  16.104 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
  16.105 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
  16.106 -        </Constraint>
  16.107 -      </Constraints>
  16.108 -    </Component>
  16.109 -    <Component class="javax.swing.JTextField" name="pageNameField">
  16.110 -      <Constraints>
  16.111 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
  16.112 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
  16.113 -        </Constraint>
  16.114 -      </Constraints>
  16.115 -    </Component>
  16.116 -    <Component class="javax.swing.JCheckBox" name="convertCheckBox">
  16.117 -      <Properties>
  16.118 -        <Property name="selected" type="boolean" value="true"/>
  16.119 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  16.120 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="ConvertHtml" replaceFormat="NbBundle.getMessage(ImportPagePanel.class, &quot;{key}&quot;)"/>
  16.121 -        </Property>
  16.122 -      </Properties>
  16.123 -      <Constraints>
  16.124 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
  16.125 -          <GridBagConstraints gridX="0" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="0" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/>
  16.126 -        </Constraint>
  16.127 -      </Constraints>
  16.128 -    </Component>
  16.129 -    <Component class="javax.swing.JCheckBox" name="imageCheckBox">
  16.130 -      <Properties>
  16.131 -        <Property name="selected" type="boolean" value="true"/>
  16.132 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  16.133 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="ConvertImages" replaceFormat="NbBundle.getMessage(ImportPagePanel.class, &quot;{key}&quot;)"/>
  16.134 -        </Property>
  16.135 -      </Properties>
  16.136 -      <Constraints>
  16.137 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
  16.138 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="36" insetsBottom="0" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/>
  16.139 -        </Constraint>
  16.140 -      </Constraints>
  16.141 -    </Component>
  16.142 -    <Component class="javax.swing.JCheckBox" name="formCheckBox">
  16.143 -      <Properties>
  16.144 -        <Property name="selected" type="boolean" value="true"/>
  16.145 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  16.146 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="ConvertForms" replaceFormat="NbBundle.getMessage(ImportPagePanel.class, &quot;{key}&quot;)"/>
  16.147 -        </Property>
  16.148 -      </Properties>
  16.149 -      <Constraints>
  16.150 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
  16.151 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="36" insetsBottom="12" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/>
  16.152 -        </Constraint>
  16.153 -      </Constraints>
  16.154 -    </Component>
  16.155 -    <Component class="javax.swing.JCheckBox" name="fragmentCheckBox">
  16.156 -      <Properties>
  16.157 -        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  16.158 -          <ResourceString bundle="org/netbeans/modules/visualweb/designer/Bundle.properties" key="ImportFragment" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString(&quot;{key}&quot;)"/>
  16.159 -        </Property>
  16.160 -      </Properties>
  16.161 -      <Constraints>
  16.162 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
  16.163 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="12" insetsBottom="12" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
  16.164 -        </Constraint>
  16.165 -      </Constraints>
  16.166 -    </Component>
  16.167 -    <Component class="javax.swing.JLabel" name="errorLabel">
  16.168 -      <Properties>
  16.169 -        <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
  16.170 -          <Color blue="0" green="0" id="red" palette="1" red="ff" type="palette"/>
  16.171 -        </Property>
  16.172 -        <Property name="text" type="java.lang.String" value="   "/>
  16.173 -      </Properties>
  16.174 -      <Constraints>
  16.175 -        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
  16.176 -          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="12" insetsBottom="12" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
  16.177 -        </Constraint>
  16.178 -      </Constraints>
  16.179 -    </Component>
  16.180 -  </SubComponents>
  16.181 -</Form>
    17.1 --- a/visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/ImportPagePanel.java	Wed Feb 23 20:05:40 2011 -0500
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,948 +0,0 @@
    17.4 -/*
    17.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    17.6 - *
    17.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    17.8 - *
    17.9 - * The contents of this file are subject to the terms of either the GNU
   17.10 - * General Public License Version 2 only ("GPL") or the Common
   17.11 - * Development and Distribution License("CDDL") (collectively, the
   17.12 - * "License"). You may not use this file except in compliance with the
   17.13 - * License. You can obtain a copy of the License at
   17.14 - * http://www.netbeans.org/cddl-gplv2.html
   17.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   17.16 - * specific language governing permissions and limitations under the
   17.17 - * License.  When distributing the software, include this License Header
   17.18 - * Notice in each file and include the License file at
   17.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   17.20 - * particular file as subject to the "Classpath" exception as provided
   17.21 - * by Sun in the GPL Version 2 section of the License file that
   17.22 - * accompanied this code. If applicable, add the following below the
   17.23 - * License Header, with the fields enclosed by brackets [] replaced by
   17.24 - * your own identifying information:
   17.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   17.26 - *
   17.27 - * Contributor(s):
   17.28 - *
   17.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   17.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   17.31 - * Microsystems, Inc. All Rights Reserved.
   17.32 - *
   17.33 - * If you wish your version of this file to be governed by only the CDDL
   17.34 - * or only the GPL Version 2, indicate your decision by adding
   17.35 - * "[Contributor] elects to include this software in this distribution
   17.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   17.37 - * single choice of license, a recipient has the option to distribute
   17.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   17.39 - * to extend the choice of license to its licensees as provided above.
   17.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   17.41 - * Version 2 license, then the option applies only if the new code is
   17.42 - * made subject to such option by the copyright holder.
   17.43 - */
   17.44 -package org.netbeans.modules.visualweb.project.importpage;
   17.45 -
   17.46 -import org.netbeans.modules.visualweb.api.insync.InSyncService;
   17.47 -import java.awt.Dialog;
   17.48 -import java.awt.event.ActionListener;
   17.49 -import java.io.File;
   17.50 -import java.io.OutputStream;
   17.51 -import java.net.MalformedURLException;
   17.52 -import java.net.URL;
   17.53 -import java.util.ResourceBundle;
   17.54 -
   17.55 -import javax.swing.DefaultComboBoxModel;
   17.56 -import javax.swing.JFileChooser;
   17.57 -import javax.swing.JLabel;
   17.58 -import javax.swing.JPanel;
   17.59 -import javax.swing.JProgressBar;
   17.60 -import javax.swing.event.DocumentListener;
   17.61 -import javax.swing.text.BadLocationException;
   17.62 -
   17.63 -import org.netbeans.api.project.Project;
   17.64 -import org.openide.DialogDescriptor;
   17.65 -import org.openide.DialogDisplayer;
   17.66 -import org.openide.ErrorManager;
   17.67 -import org.openide.filesystems.FileObject;
   17.68 -import org.openide.util.NbBundle;
   17.69 -import org.openide.util.RequestProcessor;
   17.70 -import org.w3c.tidy.Configuration;
   17.71 -
   17.72 -import org.netbeans.modules.visualweb.project.jsf.api.JsfProjectUtils;
   17.73 -// <move>
   17.74 -//import com.sun.rave.css2.FacesSupport;
   17.75 -//import org.netbeans.modules.visualweb.css2.FormComponentBox;
   17.76 -// </move>
   17.77 -
   17.78 -
   17.79 -/**
   17.80 - * XXX Originaly in desinger module
   17.81 - * (designer/src/org/netbeans/modules/visualweb/designer/ImportPagePanel), moved away from there.
   17.82 - *
   17.83 - * Provide the ability to import a web page
   17.84 - *
   17.85 - * @todo Test that I properly handle comments, doctypes, entities, etc.
   17.86 - * @todo Try to remove the Cancel button on the progress bar
   17.87 - * @todo We should convert &lt;% references to &lt;jsp:scriptlet !
   17.88 - * @todo If you go and put a bad file name for the input file, then make
   17.89 - *     the output file bad, then make the output file good - the OK button
   17.90 - *     is enabled even though the input is still bad. I should refactor
   17.91 - *     such that both fields are checked before enabling the OK button!
   17.92 - * @todo Instead of node-duplicating the Tidy dom, have xerces parse tidy
   17.93 - *    output (which is generated during a parseDOM as it turns out so no
   17.94 - *    performance penalty). It would also take away the need for the
   17.95 - *    cleanEntities() hack
   17.96 - * @todo How do I handle the file upload tag? And how do I create the
   17.97 - *     radiobutton and checkbox lists?
   17.98 - * @todo Can I convert from table to grid panel or data table?
   17.99 - * @todo Do I convert img to graphic image etc. ? What about span to
  17.100 - *    output text? I should only do the span thing  if it only contains
  17.101 - *    text (or text and style elements)
  17.102 - * @todo Make sure that the Import action frees up the page panels when
  17.103 - *    done with them... or at least free up data! Perhaps have a cleanup()
  17.104 - *    method called after import?  @todo Initialize textfield to homedir!
  17.105 - *    and don't allow dir to be selected as filename!  Offer completion?
  17.106 - * @todo The JSP to JSPX tag converter needs to handle the "page" attribute
  17.107 - *    better; right now it only looks for imports.
  17.108 - * @todo Clean up context handling; move manipulation of the various lists
  17.109 - *    etc. into add(), get() etc. methods on the context.
  17.110 - * @todo Convert meta, title, link in html to braveheart components
  17.111 - * @todo Copy style attribute on from import body to our body
  17.112 - *
  17.113 - * @author  Tor Norbye
  17.114 - */
  17.115 -public class ImportPagePanel extends JPanel implements DocumentListener, ActionListener {
  17.116 -    private ImportContext context;
  17.117 -    private Project project;
  17.118 -    private DialogDescriptor descriptor;
  17.119 -    
  17.120 -    // XXX Should these puppies be localizable?
  17.121 -    private String[] encodingNames = { "UTF-8", "Latin 1", "ASCII", "ISO 2022", "MacRoman" };
  17.122 -    private int[] encodingValues =
  17.123 -    {
  17.124 -        Configuration.UTF8, Configuration.LATIN1, Configuration.ASCII, Configuration.ISO2022,
  17.125 -        Configuration.MACROMAN
  17.126 -    };
  17.127 -    
  17.128 -    // Variables declaration - do not modify//GEN-BEGIN:variables
  17.129 -    private javax.swing.JButton browseButton;
  17.130 -    private javax.swing.JCheckBox convertCheckBox;
  17.131 -    private javax.swing.JComboBox encodingCombo;
  17.132 -    private javax.swing.JLabel encodingLabel;
  17.133 -    private javax.swing.JLabel errorLabel;
  17.134 -    private javax.swing.JTextField fileField;
  17.135 -    private javax.swing.JLabel fileLabel;
  17.136 -    private javax.swing.JCheckBox formCheckBox;
  17.137 -    private javax.swing.JCheckBox fragmentCheckBox;
  17.138 -    private javax.swing.JCheckBox imageCheckBox;
  17.139 -    private javax.swing.JCheckBox includeCheckBox;
  17.140 -    private javax.swing.JTextField pageNameField;
  17.141 -    private javax.swing.JLabel pageNameLabel;
  17.142 -    // End of variables declaration//GEN-END:variables
  17.143 -    
  17.144 -    
  17.145 -    public ImportPagePanel() {
  17.146 -        context = ImportContext.getInstance();
  17.147 -    }
  17.148 -    
  17.149 -    /** Set the current project the dialog should be attached to */
  17.150 -    void setProject(Project project) {
  17.151 -        this.project = project;
  17.152 -    }
  17.153 -    
  17.154 -    /** This method is called from within the constructor to
  17.155 -     * initialize the form.
  17.156 -     * WARNING: Do NOT modify this code. The content of this method is
  17.157 -     * always regenerated by the Form Editor.
  17.158 -     */
  17.159 -    
  17.160 -    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  17.161 -    private void initComponents() {
  17.162 -        java.awt.GridBagConstraints gridBagConstraints;
  17.163 -
  17.164 -        fileLabel = new javax.swing.JLabel();
  17.165 -        fileField = new javax.swing.JTextField();
  17.166 -        browseButton = new javax.swing.JButton();
  17.167 -        encodingLabel = new javax.swing.JLabel();
  17.168 -        encodingCombo = new javax.swing.JComboBox();
  17.169 -        includeCheckBox = new javax.swing.JCheckBox();
  17.170 -        pageNameLabel = new javax.swing.JLabel();
  17.171 -        pageNameField = new javax.swing.JTextField();
  17.172 -        convertCheckBox = new javax.swing.JCheckBox();
  17.173 -        imageCheckBox = new javax.swing.JCheckBox();
  17.174 -        formCheckBox = new javax.swing.JCheckBox();
  17.175 -        fragmentCheckBox = new javax.swing.JCheckBox();
  17.176 -        errorLabel = new javax.swing.JLabel();
  17.177 -
  17.178 -        setLayout(new java.awt.GridBagLayout());
  17.179 -
  17.180 -        setPreferredSize(new java.awt.Dimension(600, 300));
  17.181 -        fileLabel.setLabelFor(fileField);
  17.182 -        fileLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "FileOrURL"));
  17.183 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.184 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.185 -        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
  17.186 -        add(fileLabel, gridBagConstraints);
  17.187 -
  17.188 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.189 -        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
  17.190 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.191 -        gridBagConstraints.weightx = 1.0;
  17.192 -        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
  17.193 -        add(fileField, gridBagConstraints);
  17.194 -
  17.195 -        browseButton.setText(NbBundle.getMessage(ImportPagePanel.class, "Browse"));
  17.196 -        browseButton.addActionListener(new java.awt.event.ActionListener() {
  17.197 -            public void actionPerformed(java.awt.event.ActionEvent evt) {
  17.198 -                browseButtonActionPerformed(evt);
  17.199 -            }
  17.200 -        });
  17.201 -
  17.202 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.203 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.204 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.205 -        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
  17.206 -        add(browseButton, gridBagConstraints);
  17.207 -
  17.208 -        encodingLabel.setLabelFor(encodingCombo);
  17.209 -        encodingLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "Encoding"));
  17.210 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.211 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.212 -        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 11);
  17.213 -        add(encodingLabel, gridBagConstraints);
  17.214 -
  17.215 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.216 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.217 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.218 -        gridBagConstraints.insets = new java.awt.Insets(5, 12, 0, 11);
  17.219 -        add(encodingCombo, gridBagConstraints);
  17.220 -
  17.221 -        includeCheckBox.setSelected(true);
  17.222 -        includeCheckBox.setText(NbBundle.getMessage(ImportPagePanel.class, "IncludeFiles"));
  17.223 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.224 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.225 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.226 -        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
  17.227 -        add(includeCheckBox, gridBagConstraints);
  17.228 -
  17.229 -        pageNameLabel.setLabelFor(pageNameField);
  17.230 -        pageNameLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "PageName"));
  17.231 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.232 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.233 -        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
  17.234 -        add(pageNameLabel, gridBagConstraints);
  17.235 -
  17.236 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.237 -        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
  17.238 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.239 -        gridBagConstraints.weightx = 1.0;
  17.240 -        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 0);
  17.241 -        add(pageNameField, gridBagConstraints);
  17.242 -
  17.243 -        convertCheckBox.setSelected(true);
  17.244 -        convertCheckBox.setText(NbBundle.getMessage(ImportPagePanel.class, "ConvertHtml"));
  17.245 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.246 -        gridBagConstraints.gridx = 0;
  17.247 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.248 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.249 -        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
  17.250 -        add(convertCheckBox, gridBagConstraints);
  17.251 -
  17.252 -        imageCheckBox.setSelected(true);
  17.253 -        imageCheckBox.setText(NbBundle.getMessage(ImportPagePanel.class, "ConvertImages"));
  17.254 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.255 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.256 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.257 -        gridBagConstraints.insets = new java.awt.Insets(5, 36, 0, 11);
  17.258 -        add(imageCheckBox, gridBagConstraints);
  17.259 -
  17.260 -        formCheckBox.setSelected(true);
  17.261 -        formCheckBox.setText(NbBundle.getMessage(ImportPagePanel.class, "ConvertForms"));
  17.262 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.263 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.264 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.265 -        gridBagConstraints.insets = new java.awt.Insets(5, 36, 12, 11);
  17.266 -        add(formCheckBox, gridBagConstraints);
  17.267 -
  17.268 -        fragmentCheckBox.setText(org.openide.util.NbBundle.getBundle(ImportPagePanel.class).getString("ImportFragment"));
  17.269 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.270 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.271 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.272 -        gridBagConstraints.insets = new java.awt.Insets(0, 12, 12, 12);
  17.273 -        add(fragmentCheckBox, gridBagConstraints);
  17.274 -
  17.275 -        errorLabel.setForeground(java.awt.Color.red);
  17.276 -        errorLabel.setText("   ");
  17.277 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.278 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.279 -        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
  17.280 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.281 -        gridBagConstraints.insets = new java.awt.Insets(0, 12, 12, 0);
  17.282 -        add(errorLabel, gridBagConstraints);
  17.283 -
  17.284 -    }
  17.285 -    // </editor-fold>//GEN-END:initComponents
  17.286 -    
  17.287 -    /** Invoked when the user presses the browse button */
  17.288 -    private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
  17.289 -        
  17.290 -        //JFileChooser chooser = new JFileChooser(experimentName);
  17.291 -        JFileChooser chooser = new JFileChooser();
  17.292 -        chooser.setDialogTitle(NbBundle.getMessage(ImportPagePanel.class, "BrowseTitle"));
  17.293 -        chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
  17.294 -        chooser.setMultiSelectionEnabled(false);
  17.295 -        
  17.296 -        File currentFile = getCurrentFile();
  17.297 -        
  17.298 -        if (currentFile != null) {
  17.299 -            if (!currentFile.isDirectory()) {
  17.300 -                currentFile = currentFile.getParentFile();
  17.301 -            }
  17.302 -            
  17.303 -            if (currentFile.exists()) {
  17.304 -                chooser.setCurrentDirectory(currentFile);
  17.305 -            }
  17.306 -        }
  17.307 -        
  17.308 -        int returnVal = chooser.showOpenDialog(this);
  17.309 -        
  17.310 -        if (returnVal == JFileChooser.APPROVE_OPTION) {
  17.311 -            fileField.setText(chooser.getSelectedFile().getParent() + File.separator +
  17.312 -                    chooser.getSelectedFile().getName());
  17.313 -        }
  17.314 -    }//GEN-LAST:event_browseButtonActionPerformed
  17.315 -    
  17.316 -    private void initAccessibility() {
  17.317 -        ResourceBundle bundle = NbBundle.getBundle(ImportPagePanel.class);
  17.318 -        
  17.319 -        getAccessibleContext().setAccessibleDescription(bundle.getString("ACSD_AddExistingPagePanel"));
  17.320 -        
  17.321 -        browseButton.getAccessibleContext().setAccessibleDescription(
  17.322 -                bundle.getString("ACSD_BrowseButton"));
  17.323 -        convertCheckBox.getAccessibleContext().setAccessibleDescription(
  17.324 -                bundle.getString("ACSD_ConvertHtml"));
  17.325 -        formCheckBox.getAccessibleContext().setAccessibleDescription(
  17.326 -                bundle.getString("ACSD_ConvertForms"));
  17.327 -        imageCheckBox.getAccessibleContext().setAccessibleDescription(
  17.328 -                bundle.getString("ACSD_ConvertImages"));
  17.329 -        fragmentCheckBox.getAccessibleContext().setAccessibleDescription(
  17.330 -                bundle.getString("ACSD_ImportFragment"));
  17.331 -        includeCheckBox.getAccessibleContext().setAccessibleDescription(
  17.332 -                bundle.getString("ACSD_IncludeFiles"));
  17.333 -        encodingCombo.getAccessibleContext().setAccessibleDescription(
  17.334 -                bundle.getString("ACSD_Encoding"));
  17.335 -        fileField.getAccessibleContext().setAccessibleDescription(
  17.336 -                bundle.getString("ACSD_FileOrURL"));
  17.337 -        pageNameField.getAccessibleContext().setAccessibleDescription(
  17.338 -                bundle.getString("ACSD_PageName"));
  17.339 -        
  17.340 -        fileLabel.setDisplayedMnemonic(bundle.getString("LBL_FileOrURL_Mnem").charAt(0));
  17.341 -        encodingLabel.setDisplayedMnemonic(bundle.getString("LBL_Encoding_Mnem").charAt(0));
  17.342 -        pageNameLabel.setDisplayedMnemonic(bundle.getString("LBL_PageName_Mnem").charAt(0));
  17.343 -        
  17.344 -        browseButton.setMnemonic(bundle.getString("LBL_BrowseButton_Mnem").charAt(0));
  17.345 -        includeCheckBox.setMnemonic(bundle.getString("LBL_IncludeFiles_Mnem").charAt(0));
  17.346 -        convertCheckBox.setMnemonic(bundle.getString("LBL_ConvertHtml_Mnem").charAt(0));
  17.347 -        imageCheckBox.setMnemonic(bundle.getString("LBL_ConvertImages_Mnem").charAt(0));
  17.348 -        formCheckBox.setMnemonic(bundle.getString("LBL_ConvertForms_Mnem").charAt(0));
  17.349 -        fragmentCheckBox.setMnemonic(bundle.getString("LBL_ImportFragment_Mnem").charAt(0));
  17.350 -    }
  17.351 -    
  17.352 -    /** Additional initialization of the form, no done by the NetBeans form designer */
  17.353 -    private void postInitComponents(File initialFile) {
  17.354 -        if (initialFile != null) {
  17.355 -            fileField.setText(initialFile.getPath());
  17.356 -            updateNameSuggestion(fileField.getDocument());
  17.357 -        } else {
  17.358 -            fileField.setText(System.getProperty("user.home")); // NOI18N
  17.359 -        }
  17.360 -        fileField.getDocument().addDocumentListener(this);
  17.361 -        pageNameField.getDocument().addDocumentListener(this);
  17.362 -        convertCheckBox.setEnabled(true);
  17.363 -        convertCheckBox.setSelected(true);
  17.364 -        convertCheckBox.addActionListener(this);
  17.365 -        
  17.366 -        DefaultComboBoxModel df = new DefaultComboBoxModel(encodingNames);
  17.367 -        encodingCombo.setModel(df);
  17.368 -        
  17.369 -        if (project != null) {
  17.370 -            String srcenc = JsfProjectUtils.getSourceEncoding(project);
  17.371 -            int encoding = Configuration.UTF8;
  17.372 -            
  17.373 -            if (srcenc.startsWith("mac") || srcenc.startsWith("Mac")) { // NOI18N
  17.374 -            } else if (srcenc.equalsIgnoreCase("UTF-8")) { // NOI18N
  17.375 -                encoding = Configuration.UTF8;
  17.376 -            } else if ((srcenc.indexOf("latin") != -1) || // NOI18N
  17.377 -                    (srcenc.indexOf("8859") != -1)) { // NOI18N
  17.378 -                encoding = Configuration.LATIN1;
  17.379 -            } else if (srcenc.indexOf("2022") != -1) { // NOI18N
  17.380 -                encoding = Configuration.ISO2022;
  17.381 -            }
  17.382 -            
  17.383 -            for (int i = 0; i < encodingValues.length; i++) {
  17.384 -                if (encodingValues[i] == encoding) {
  17.385 -                    encodingCombo.setSelectedIndex(i);
  17.386 -                    
  17.387 -                    break;
  17.388 -                }
  17.389 -            }
  17.390 -        }
  17.391 -    }
  17.392 -    
  17.393 -    public void showImportDialog(File initialFile) {
  17.394 -        boolean checkInitialPath = fileField == null;
  17.395 -        
  17.396 -        if (fileField == null) {
  17.397 -            initComponents();
  17.398 -            initAccessibility();
  17.399 -            postInitComponents(initialFile);
  17.400 -        } else {
  17.401 -            errorLabel.setText("");
  17.402 -        }
  17.403 -        
  17.404 -        if (initialFile != null) {
  17.405 -            checkInitialPath = false;
  17.406 -            pageNameField.requestFocus();
  17.407 -        }
  17.408 -        
  17.409 -        String title = NbBundle.getMessage(ImportPagePanel.class, "AddExistingPage"); // NOI18N
  17.410 -        DialogDescriptor dlg =
  17.411 -                new DialogDescriptor(this, title, true, DialogDescriptor.OK_CANCEL_OPTION,
  17.412 -                DialogDescriptor.OK_OPTION, DialogDescriptor.DEFAULT_ALIGN,
  17.413 -                // DialogDescriptor.BOTTOM_ALIGN,
  17.414 -                null, //new HelpCtx("import_web_page"), // NOI18N
  17.415 -                null);
  17.416 -        
  17.417 -        Dialog dialog = DialogDisplayer.getDefault().createDialog(dlg);
  17.418 -        setDescriptor(dlg);
  17.419 -        
  17.420 -        //descriptor.setValid(false);
  17.421 -        if (checkInitialPath) {
  17.422 -            descriptor.setValid(false);
  17.423 -        } else {
  17.424 -            checkEditedName(pageNameField.getDocument());
  17.425 -            checkFileName(fileField.getText());
  17.426 -        }
  17.427 -        
  17.428 -        dialog.show();
  17.429 -        
  17.430 -        if (!dlg.getValue().equals(DialogDescriptor.OK_OPTION)) {
  17.431 -            // Cancel, or Esc: do nothing
  17.432 -            return;
  17.433 -        }
  17.434 -        
  17.435 -        URL url = null;
  17.436 -        final String name = pageNameField.getText();
  17.437 -        String fileName = fileField.getText();
  17.438 -        
  17.439 -        // URL constructor below doesn't handle this case well so convert it to filename first
  17.440 -        if (fileName.startsWith("file:")) { // NOI18N
  17.441 -            // <markup_separation>
  17.442 -            //            fileName = MarkupUnit.fromURL(fileName);
  17.443 -            // ====
  17.444 -            fileName = InSyncService.getProvider().fromURL(fileName);
  17.445 -            // </markup_separation>
  17.446 -        } else {
  17.447 -            try {
  17.448 -                url = new URL(fileName);
  17.449 -            } catch (MalformedURLException ex) {
  17.450 -                // We don't know if the String passed in is a URL or not!! It could be
  17.451 -                // a file ("C:\myfile.htm"), and it could be a URL ("http://www.sun.com").
  17.452 -                // We're doing a parse to see if it looks like a URL. A MalformedURLException
  17.453 -                // is NOT an error we should log; it just means that our test to see if it
  17.454 -                // was a URL has failed. (It would be better if there was a URL API to test
  17.455 -                // if a String will pass without relying on an exception to catch the case
  17.456 -                // where it is not, but alas there is no such method.)
  17.457 -            }
  17.458 -        }
  17.459 -        
  17.460 -        if ((url == null) || ((url.getProtocol() != null) && url.getProtocol().equals("file"))) {
  17.461 -            File file = new File(fileName);
  17.462 -            
  17.463 -            try {
  17.464 -                //url = file.toURL();
  17.465 -                url = file.toURI().toURL();
  17.466 -            } catch (MalformedURLException ex) {
  17.467 -                ErrorManager.getDefault().notify(ex);
  17.468 -                
  17.469 -                return;
  17.470 -            }
  17.471 -        }
  17.472 -        
  17.473 -        final boolean includeResources = includeCheckBox.isSelected();
  17.474 -        final boolean convert = convertCheckBox.isSelected();
  17.475 -        final URL furl = url;
  17.476 -        
  17.477 -        title = NbBundle.getMessage(ImportPagePanel.class, "PageImportProgress"); // NOI18N
  17.478 -        
  17.479 -        JPanel panel = new JPanel();
  17.480 -        java.awt.GridBagConstraints gridBagConstraints;
  17.481 -        JLabel jLabel1 = new javax.swing.JLabel();
  17.482 -        JProgressBar jProgressBar1 = new javax.swing.JProgressBar();
  17.483 -        jProgressBar1.setIndeterminate(true);
  17.484 -        jProgressBar1.setStringPainted(false);
  17.485 -        panel.setLayout(new java.awt.GridBagLayout());
  17.486 -        
  17.487 -        jLabel1.setText(title);
  17.488 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.489 -        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  17.490 -        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  17.491 -        gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 11);
  17.492 -        panel.add(jLabel1, gridBagConstraints);
  17.493 -        
  17.494 -        gridBagConstraints = new java.awt.GridBagConstraints();
  17.495 -        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
  17.496 -        gridBagConstraints.weightx = 1.0;
  17.497 -        gridBagConstraints.insets = new java.awt.Insets(0, 12, 11, 11);
  17.498 -        panel.add(jProgressBar1, gridBagConstraints);
  17.499 -        
  17.500 -        dlg = new DialogDescriptor(panel, title, false, DialogDescriptor.DEFAULT_OPTION,
  17.501 -                DialogDescriptor.OK_OPTION, DialogDescriptor.DEFAULT_ALIGN,
  17.502 -                // DialogDescriptor.BOTTOM_ALIGN,
  17.503 -                null, //new HelpCtx("import_web_page"), // NOI18N
  17.504 -                null);
  17.505 -        
  17.506 -        final Dialog progressDialog = DialogDisplayer.getDefault().createDialog(dlg);
  17.507 -        setDescriptor(dlg);
  17.508 -        progressDialog.show();
  17.509 -        
  17.510 -        RequestProcessor.getDefault().post(new Runnable() { // separate thread
  17.511 -            public void run() {
  17.512 -                try {
  17.513 -                    context = new ImportContext();
  17.514 -                    context.project = project;
  17.515 -                    context.fragment = fragmentCheckBox.isSelected();
  17.516 -                    Import importUtil = new Import();
  17.517 -                    importUtil.doImport(name, furl, includeResources, convert, getEncoding(), isCopyImage(), isConvertForm(), context);
  17.518 -                } finally {
  17.519 -                    progressDialog.hide();
  17.520 -                }
  17.521 -            }
  17.522 -        });
  17.523 -    }
  17.524 -    
  17.525 -    private boolean isCopyImage() {
  17.526 -        return imageCheckBox.isSelected();
  17.527 -    }
  17.528 -    
  17.529 -    private boolean isConvertForm() {
  17.530 -        return formCheckBox.isEnabled();
  17.531 -    }
  17.532 -    
  17.533 -    private int getEncoding() {
  17.534 -        String sel = encodingCombo.getSelectedItem().toString();
  17.535 -        
  17.536 -        for (int i = 0; i < encodingNames.length; i++) {
  17.537 -            if (encodingNames[i].equals(sel)) {
  17.538 -                return encodingValues[i];
  17.539 -            }
  17.540 -        }
  17.541 -        
  17.542 -        return -1;
  17.543 -    }
  17.544 -    
  17.545 -    public void setDescriptor(DialogDescriptor descriptor) {
  17.546 -        this.descriptor = descriptor;
  17.547 -    }
  17.548 -    
  17.549 -    // ---- Implements document listener
  17.550 -    public void changedUpdate(javax.swing.event.DocumentEvent e) {
  17.551 -    }
  17.552 -    
  17.553 -    public void insertUpdate(javax.swing.event.DocumentEvent e) {
  17.554 -        if (e.getDocument() == fileField.getDocument()) {
  17.555 -            updateNameSuggestion(e.getDocument());
  17.556 -        } else {
  17.557 -            checkEditedName(e.getDocument());
  17.558 -        }
  17.559 -    }
  17.560 -    
  17.561 -    public void removeUpdate(javax.swing.event.DocumentEvent e) {
  17.562 -        if (e.getDocument() == fileField.getDocument()) {
  17.563 -            updateNameSuggestion(e.getDocument());
  17.564 -        } else {
  17.565 -            checkEditedName(e.getDocument());
  17.566 -        }
  17.567 -    }
  17.568 -    
  17.569 -    private void checkEditedName(javax.swing.text.Document doc) {
  17.570 -        // The user has edited the name: make sure it's valid
  17.571 -        try {
  17.572 -            String text = doc.getText(0, doc.getLength());
  17.573 -            validateName(text);
  17.574 -        } catch (BadLocationException ex) {
  17.575 -            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
  17.576 -        }
  17.577 -    }
  17.578 -    
  17.579 -    private void updateNameSuggestion(javax.swing.text.Document doc) {
  17.580 -        // The user has changed the filename: make sure it's valid
  17.581 -        try {
  17.582 -            String text = doc.getText(0, doc.getLength());
  17.583 -            StringBuffer sb = new StringBuffer(text.length());
  17.584 -            
  17.585 -            int start = 0;
  17.586 -            
  17.587 -            // Ensure that we skip over paths, http://, file:, etc.
  17.588 -            int idx = text.lastIndexOf(File.separatorChar) + 1;
  17.589 -            
  17.590 -            if (idx > start) {
  17.591 -                start = idx;
  17.592 -            }
  17.593 -            
  17.594 -            idx = text.lastIndexOf('/');
  17.595 -            
  17.596 -            if (idx > start) {
  17.597 -                start = idx;
  17.598 -            }
  17.599 -            
  17.600 -            idx = text.lastIndexOf(':');
  17.601 -            
  17.602 -            if (idx > start) {
  17.603 -                start = idx;
  17.604 -            }
  17.605 -            
  17.606 -            for (int i = start, n = text.length(); i < n; i++) {
  17.607 -                char c = text.charAt(i);
  17.608 -                
  17.609 -                if (sb.length() == 0) {
  17.610 -                    if (Character.isJavaIdentifierStart(c)) {
  17.611 -                        sb.append(c);
  17.612 -                    }
  17.613 -                } else if ((c == '.') || Character.isJavaIdentifierPart(c)) {
  17.614 -                    sb.append(c);
  17.615 -                }
  17.616 -            }
  17.617 -            
  17.618 -            // Strip out the extension
  17.619 -            int dot = sb.indexOf(".");
  17.620 -            
  17.621 -            if (dot != -1) {
  17.622 -                sb.setLength(dot);
  17.623 -            }
  17.624 -            
  17.625 -            String name = sb.toString();
  17.626 -            pageNameField.setText(name);
  17.627 -            
  17.628 -            if (!checkFileName(text)) {
  17.629 -                return;
  17.630 -            }
  17.631 -            
  17.632 -            validateName(name);
  17.633 -        } catch (BadLocationException ex) {
  17.634 -            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
  17.635 -        }
  17.636 -    }
  17.637 -    
  17.638 -    // TODO - check to make sure that the file doesn't already exist in the project!
  17.639 -    private void validateName(String name) {
  17.640 -        if (name.length() == 0) {
  17.641 -            errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "NoEmptyName")); // NOI18N
  17.642 -            
  17.643 -            if (descriptor != null) {
  17.644 -                descriptor.setValid(false);
  17.645 -            }
  17.646 -            
  17.647 -            return;
  17.648 -        }
  17.649 -        
  17.650 -        if (!Character.isJavaIdentifierStart(name.charAt(0))) {
  17.651 -            errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "WrongFirstLetter")); // NOI18N
  17.652 -            
  17.653 -            if (descriptor != null) {
  17.654 -                descriptor.setValid(false);
  17.655 -            }
  17.656 -            
  17.657 -            return;
  17.658 -        }
  17.659 -        
  17.660 -        for (int i = 1, n = name.length(); i < n; i++) {
  17.661 -            char c = name.charAt(i);
  17.662 -            
  17.663 -            if (!Character.isJavaIdentifierPart(c)) {
  17.664 -                errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "WrongPageName")); // NOI18N
  17.665 -            if (descriptor != null) {
  17.666 -                descriptor.setValid(false);
  17.667 -            }
  17.668 -                
  17.669 -                return;
  17.670 -            }
  17.671 -        }
  17.672 -        
  17.673 -        if ((project != null) && isUsedName(name, project)) {
  17.674 -            errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "NameUsed", name)); // NOI18N
  17.675 -            if (descriptor != null) {
  17.676 -                descriptor.setValid(false);
  17.677 -            }
  17.678 -            
  17.679 -            return;
  17.680 -        }
  17.681 -        
  17.682 -        errorLabel.setText("   "); // not empty - that will shrink the height to 0
  17.683 -        
  17.684 -        if (descriptor != null) {
  17.685 -            descriptor.setValid(true);
  17.686 -        }
  17.687 -    }
  17.688 -    
  17.689 -    private File getCurrentFile() {
  17.690 -        String name = fileField.getText();
  17.691 -        
  17.692 -        if (name.startsWith("file:")) { // NOI18N
  17.693 -            // <markup_separation>
  17.694 -            //            name = MarkupUnit.fromURL(name);
  17.695 -            // ====
  17.696 -            name = InSyncService.getProvider().fromURL(name);
  17.697 -            // </markup_separation>
  17.698 -        }
  17.699 -        
  17.700 -        File f = new File(name);
  17.701 -        
  17.702 -        if (f.exists()) {
  17.703 -            return f;
  17.704 -        }
  17.705 -        
  17.706 -        return null;
  17.707 -    }
  17.708 -    
  17.709 -    private boolean checkFileName(String name) {
  17.710 -        try {
  17.711 -            URL url = new URL(name);
  17.712 -            
  17.713 -            if ((url.getProtocol() != null) && !url.getProtocol().equals("file")) {
  17.714 -                // XXX but I could try to validate the URL, e.g. look for spaces and such!
  17.715 -                return true; // we don't actually try to connect
  17.716 -            }
  17.717 -        } catch (MalformedURLException ex) {
  17.718 -            // We don't know if the String passed in is a URL or not!! It could be
  17.719 -            // a file ("C:\myfile.htm"), and it could be a URL ("http://www.sun.com").
  17.720 -            // We're doing a parse to see if it looks like a URL. A MalformedURLException
  17.721 -            // is NOT an error we should log; it just means that our test to see if it
  17.722 -            // was a URL has failed. (It would be better if there was a URL API to test
  17.723 -            // if a String will pass without relying on an exception to catch the case
  17.724 -            // where it is not, but alas there is no such method.)
  17.725 -        }
  17.726 -        
  17.727 -        int lastDot = name.lastIndexOf(".");
  17.728 -        if (lastDot != -1) {
  17.729 -            String suffix = name.substring(lastDot+1);
  17.730 -            if (!(suffix.equalsIgnoreCase("html") || suffix.equalsIgnoreCase("htm") ||
  17.731 -                    suffix.equalsIgnoreCase("jsp") || suffix.equalsIgnoreCase("jspx"))) {
  17.732 -                errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "WrongExtension")); // NOI18N
  17.733 -                descriptor.setValid(false);
  17.734 -                
  17.735 -                return false;
  17.736 -            }
  17.737 -        }
  17.738 -        
  17.739 -        if (name.startsWith("file:")) { // NOI18N
  17.740 -            // <markup_separation>
  17.741 -            //            name = MarkupUnit.fromURL(name);
  17.742 -            // ====
  17.743 -            name = InSyncService.getProvider().fromURL(name);
  17.744 -            // </markup_separation>
  17.745 -        }
  17.746 -        
  17.747 -        /* I -do- support URLs now
  17.748 -         * NoUrlsYet=URLs not supported yet
  17.749 -        if (name.indexOf("http:") != -1) {
  17.750 -            errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "NoUrlsYet"));
  17.751 -            descriptor.setValid(false);
  17.752 -            return false;
  17.753 -        }
  17.754 -         */
  17.755 -        File f = new File(name);
  17.756 -        
  17.757 -        if (f.exists()) {
  17.758 -            if (f.isDirectory()) {
  17.759 -                errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "IsDirectory")); // NOI18N
  17.760 -                descriptor.setValid(false);
  17.761 -                
  17.762 -                return false;
  17.763 -            }
  17.764 -            
  17.765 -            return true;
  17.766 -        }
  17.767 -        
  17.768 -        try {
  17.769 -            File f2 = f.getCanonicalFile();
  17.770 -            
  17.771 -            if (f2.exists()) {
  17.772 -                if (f2.isDirectory()) {
  17.773 -                    errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "IsDirectory")); // NOI18N
  17.774 -                    descriptor.setValid(false);
  17.775 -                    
  17.776 -                    return false;
  17.777 -                }
  17.778 -                
  17.779 -                return true;
  17.780 -            }
  17.781 -            
  17.782 -            errorLabel.setText(NbBundle.getMessage(ImportPagePanel.class, "NoSuchFile")); // NOI18N
  17.783 -            descriptor.setValid(false);
  17.784 -            
  17.785 -            return false;
  17.786 -        } catch (java.io.IOException ex) {
  17.787 -            String msg = ex.getLocalizedMessage();
  17.788 -            
  17.789 -            if (msg != null) {
  17.790 -                errorLabel.setText(msg);
  17.791 -            } else {
  17.792 -                errorLabel.setText(ex.toString());
  17.793 -            }
  17.794 -            
  17.795 -            descriptor.setValid(false);
  17.796 -            
  17.797 -            return false;
  17.798 -        }
  17.799 -    }
  17.800 -    
  17.801 -    
  17.802 -    private boolean isUsedName(String name, Project project) {
  17.803 -        FileObject webroot = JsfProjectUtils.getDocumentRoot(project);
  17.804 -        FileObject beanroot = JsfProjectUtils.getPageBeanRoot(project);
  17.805 -        
  17.806 -        // But what about other capitalizations of java and jsp?
  17.807 -        return (webroot.getFileObject(name, "jsp") != null) || // NOI18N
  17.808 -                (beanroot.getFileObject(name, "java") != null); // NOI18N
  17.809 -    }
  17.810 -    
  17.811 -    //    /**
  17.812 -    //     * Gets an array of urlStrings.
  17.813 -    //     * Adds the rules matching the element/pseudo-element of given style
  17.814 -    //     * declaration to the list
  17.815 -    //     */
  17.816 -    //    private static String[] getStyleResourcesFromStyleDeclaration(StyleDeclaration sd) {
  17.817 -    ////        Map rewrite = new HashMap();
  17.818 -    //        List urlStrings = new ArrayList();
  17.819 -    //        for (int j = 0, m = sd.size(); j < m; j++) {
  17.820 -    //            int idx = sd.getIndex(j);
  17.821 -    //
  17.822 -    //            if ((idx == XhtmlCss.BACKGROUND_IMAGE_INDEX) ||
  17.823 -    //                    (idx == XhtmlCss.LIST_STYLE_IMAGE_INDEX)) {
  17.824 -    //                // If I support audio: cue-before, cure-after,
  17.825 -    //                // play-during as well
  17.826 -    //                Value v = sd.getValue(j);
  17.827 -    //
  17.828 -    //                if (v instanceof URIValue) {
  17.829 -    //                    URIValue uv = (URIValue)v;
  17.830 -    //                    String urlString = uv.getRawCssText();
  17.831 -    //
  17.832 -    ////                    if (rewrite.get(urlString) == null) {
  17.833 -    ////                        // Import the image, as newUrl
  17.834 -    ////                        String projectUrl = copyResource(urlString);
  17.835 -    ////
  17.836 -    ////                        if (projectUrl != null) {
  17.837 -    ////                            rewrite.put(urlString, projectUrl);
  17.838 -    ////                        }
  17.839 -    ////                    }
  17.840 -    //                    if (urlStrings.contains(urlString)) {
  17.841 -    //                        continue;
  17.842 -    //                    }
  17.843 -    //
  17.844 -    //                    urlStrings.add(urlString);
  17.845 -    //                }
  17.846 -    //            }
  17.847 -    //        }
  17.848 -    //        return (String[])urlStrings.toArray(new String[urlStrings.size()]);
  17.849 -    //    }
  17.850 -    
  17.851 -    
  17.852 -    //    /** Gets map of urlString to relPath.
  17.853 -    //     * Adds the rules matching the element/pseudo-element of given style
  17.854 -    //     * sheet to the list.
  17.855 -    //     */
  17.856 -    //    private static ResourceData[] getStyleResourcesFromStyleSheet(Document doc, StyleSheet ss) {
  17.857 -    ////        Map rewrite = new HashMap();
  17.858 -    //        List resourceData = new ArrayList();
  17.859 -    //
  17.860 -    //        int len = ss.getSize();
  17.861 -    //
  17.862 -    //        for (int i = 0; i < len; i++) {
  17.863 -    //            Rule r = ss.getRule(i);
  17.864 -    //
  17.865 -    //            switch (r.getType()) {
  17.866 -    //            case StyleRule.TYPE:
  17.867 -    //
  17.868 -    //                StyleRule style = (StyleRule)r;
  17.869 -    //                StyleDeclaration sd = style.getStyleDeclaration();
  17.870 -    ////                rewrite.putAll(importStyleResourcesFromStyleDeclaration(depth, sd));
  17.871 -    //                String[] urlStrings = getStyleResourcesFromStyleDeclaration(sd);
  17.872 -    ////                rewrite.putAll(importStyleResources(urlStrings));
  17.873 -    //                resourceData.add(new UrlStringsResourceData(urlStrings));
  17.874 -    //                break;
  17.875 -    //
  17.876 -    //            /*case MediaRule.TYPE:*/
  17.877 -    //            case Impor87tRule.TYPE:
  17.878 -    //
  17.879 -    //                ImportRule mr = (ImportRule)r;
  17.880 -    //
  17.881 -    ////                XhtmlCssEngine ces = CssEngineServiceProvider.getDefault().getCssEngine(doc);
  17.882 -    ////                if (ces.mediaMatch(mr.getMediaList())) { // XXX todo
  17.883 -    //                if (CssProvider.getEngineService().isMediaMatchingForDocument(doc, mr.getMediaList())) {
  17.884 -    //
  17.885 -    //                    URL url = mr.getURI();
  17.886 -    ////                    String parent = new File(url.getPath()).getParent() + "/";
  17.887 -    ////                    URL oldBase = context.base;
  17.888 -    ////
  17.889 -    ////                    try {
  17.890 -    ////                        context.base =
  17.891 -    ////                            new URL(url.getProtocol(), url.getHost(), url.getPort(), parent);
  17.892 -    ////                    } catch (MalformedURLException mfu) {
  17.893 -    ////                        // XXX shouldn't happen
  17.894 -    ////                        ErrorManager.getDefault().notify(mfu);
  17.895 -    ////
  17.896 -    ////                        return rewrite;
  17.897 -    ////                    }
  17.898 -    ////
  17.899 -    ////                    String urlString = mr.getRelativeUri();
  17.900 -    ////                    String relPath = handleStyleSheet(depth + 1, urlString, url);
  17.901 -    ////                    context.base = oldBase;
  17.902 -    //                    String urlString = mr.getRelativeUri();
  17.903 -    ////                    String relPath;
  17.904 -    ////                    try {
  17.905 -    ////                        relPath = importStyleSheetResource(depth, url, urlString);
  17.906 -    ////                    } catch (MalformedURLException mfu) {
  17.907 -    ////                        // XXX shouldn't happen
  17.908 -    ////                        ErrorManager.getDefault().notify(mfu);
  17.909 -    ////                        return rewrite;
  17.910 -    ////                    }
  17.911 -    ////
  17.912 -    ////                    if (relPath != null) {
  17.913 -    ////                        rewrite.put(urlString, relPath);
  17.914 -    ////                    }
  17.915 -    //                    resourceData.add(new UrlResourceData(url, urlString));
  17.916 -    //                }
  17.917 -    //
  17.918 -    //                break;
  17.919 -    //            }
  17.920 -    //        }
  17.921 -    //
  17.922 -    //        return (ResourceData[])resourceData.toArray(new ResourceData[resourceData.size()]);
  17.923 -    //    }
  17.924 -    
  17.925 -    public void actionPerformed(java.awt.event.ActionEvent e) {
  17.926 -        if (e.getSource() == convertCheckBox) {
  17.927 -            //boolean enabled = convertCheckBox.isEnabled();
  17.928 -            //if (imageCheckBox.isEnabled() != enabled) {
  17.929 -            // We haven't seen the change yet, so just toggle our own state instead
  17.930 -            boolean enabled = !imageCheckBox.isEnabled();
  17.931 -            imageCheckBox.setEnabled(enabled);
  17.932 -            formCheckBox.setEnabled(enabled);
  17.933 -        }
  17.934 -    }
  17.935 -    
  17.936 -    
  17.937 -    // XXX Why is this here? Is it supposed to be API? Revise.
  17.938 -    // Grr... tidy uses input/output stream instead of input/output writer
  17.939 -    public static class StringBufferOutputStream extends OutputStream {
  17.940 -        private StringBuffer sb;
  17.941 -        
  17.942 -        public StringBufferOutputStream(StringBuffer sb) {
  17.943 -            this.sb = sb;
  17.944 -        }
  17.945 -        
  17.946 -        public void write(int b) {
  17.947 -            sb.append((char)b);
  17.948 -        }
  17.949 -    }
  17.950 -    
  17.951 -}
    18.1 --- a/visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/PageImport.java	Wed Feb 23 20:05:40 2011 -0500
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,137 +0,0 @@
    18.4 -/*
    18.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    18.6 - *
    18.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    18.8 - *
    18.9 - * The contents of this file are subject to the terms of either the GNU
   18.10 - * General Public License Version 2 only ("GPL") or the Common
   18.11 - * Development and Distribution License("CDDL") (collectively, the
   18.12 - * "License"). You may not use this file except in compliance with the
   18.13 - * License. You can obtain a copy of the License at
   18.14 - * http://www.netbeans.org/cddl-gplv2.html
   18.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   18.16 - * specific language governing permissions and limitations under the
   18.17 - * License.  When distributing the software, include this License Header
   18.18 - * Notice in each file and include the License file at
   18.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   18.20 - * particular file as subject to the "Classpath" exception as provided
   18.21 - * by Sun in the GPL Version 2 section of the License file that
   18.22 - * accompanied this code. If applicable, add the following below the
   18.23 - * License Header, with the fields enclosed by brackets [] replaced by
   18.24 - * your own identifying information:
   18.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   18.26 - *
   18.27 - * Contributor(s):
   18.28 - *
   18.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   18.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   18.31 - * Microsystems, Inc. All Rights Reserved.
   18.32 - *
   18.33 - * If you wish your version of this file to be governed by only the CDDL
   18.34 - * or only the GPL Version 2, indicate your decision by adding
   18.35 - * "[Contributor] elects to include this software in this distribution
   18.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   18.37 - * single choice of license, a recipient has the option to distribute
   18.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   18.39 - * to extend the choice of license to its licensees as provided above.
   18.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   18.41 - * Version 2 license, then the option applies only if the new code is
   18.42 - * made subject to such option by the copyright holder.
   18.43 - */
   18.44 -/*
   18.45 - * ImportPagePanel.java
   18.46 - *
   18.47 - * Created on March 26, 2004, 10:08 PM
   18.48 - */
   18.49 -package org.netbeans.modules.visualweb.project.importpage;
   18.50 -
   18.51 -import java.io.File;
   18.52 -import javax.swing.JPanel;
   18.53 -
   18.54 -import org.netbeans.api.project.Project;
   18.55 -import org.openide.ErrorManager;
   18.56 -import org.openide.util.NbBundle;
   18.57 -
   18.58 -import org.netbeans.modules.visualweb.project.jsf.api.JsfProjectUtils;
   18.59 -import org.netbeans.modules.visualweb.project.jsf.api.Importable;
   18.60 -
   18.61 -
   18.62 -/**
   18.63 - * XXX Originaly in desinger module
   18.64 - * (designer/src/org/netbeans/modules/visualweb/designer/PageImport), moved away from there.
   18.65 - *
   18.66 - * Provide the ability to import a web page
   18.67 - * @author  Tor Norbye
   18.68 - */
   18.69 -public class PageImport implements Importable, Importable.PageImportable {
   18.70 -    private ImportPagePanel dialog;
   18.71 -
   18.72 -    public PageImport() {
   18.73 -    }
   18.74 -
   18.75 -    // ----------- implements Importable ----------
   18.76 -    public String getDisplayName() {
   18.77 -        return NbBundle.getMessage(ImportPagePanel.class, "ImportWebPage"); // NOI18N
   18.78 -    }
   18.79 -
   18.80 -    public void perform(Project project) {
   18.81 -        perform(project, null);
   18.82 -    }
   18.83 -
   18.84 -    private void perform(Project project, File file) {
   18.85 -        if (dialog == null) {
   18.86 -            dialog = new ImportPagePanel();
   18.87 -        }
   18.88 -
   18.89 -        dialog.setProject(project);
   18.90 -
   18.91 -        dialog.showImportDialog(file);
   18.92 -    }
   18.93 -
   18.94 -    /** This import is only available into WebAppProjects */
   18.95 -    public boolean enable(Project project) {
   18.96 -        if (project == null) {
   18.97 -            return false;
   18.98 -        }
   18.99 -
  18.100 -        if (JsfProjectUtils.getDocumentRoot(project) == null) {
  18.101 -            // Probably not a JSF project
  18.102 -            return false;
  18.103 -        }
  18.104 -
  18.105 -        return true;
  18.106 -    }
  18.107 -
  18.108 -    // >> Implements Importable.PageImportable >>
  18.109 -    /**
  18.110 -     * If this looks like an importable file, do so and return the import panel used,
  18.111 -     * otherwise return null. (This is useful when you drop a number of pages on the
  18.112 -     * designer so the panel can be reused and so that it remembers user edits
  18.113 -     * for each of the files
  18.114 -     */
  18.115 -    public JPanel importRandomFile(Project project, File file, String extension,
  18.116 -    JPanel panel) {
  18.117 -        if (extension.equalsIgnoreCase("jsp") // NOI18N
  18.118 -        || extension.equalsIgnoreCase("jspx") // NOI18N
  18.119 -        || extension.equalsIgnoreCase("htm") // NOI18N
  18.120 -        || extension.equalsIgnoreCase("html")) { // NOI18N
  18.121 -            PageImport pageImport = new PageImport();
  18.122 -            if(panel instanceof ImportPagePanel) {
  18.123 -                pageImport.dialog = (ImportPagePanel)panel;
  18.124 -            } else {
  18.125 -                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL,
  18.126 -                        new IllegalArgumentException("The panel argument is not instance of " // NOI18N
  18.127 -                                                    + ImportPagePanel.class));
  18.128 -            }
  18.129 -
  18.130 -            if (pageImport.enable(project)) {
  18.131 -                pageImport.perform(project, file);
  18.132 -
  18.133 -                return pageImport.dialog;
  18.134 -            }
  18.135 -        }
  18.136 -
  18.137 -        return null;
  18.138 -    }
  18.139 -    // << Implements Importable.PageImportable <<
  18.140 -}
    19.1 --- a/visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/resources/Bundle.properties	Wed Feb 23 20:05:40 2011 -0500
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,47 +0,0 @@
    19.4 -#
    19.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    19.6 -#
    19.7 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    19.8 -#
    19.9 -# The contents of this file are subject to the terms of either the GNU
   19.10 -# General Public License Version 2 only ("GPL") or the Common
   19.11 -# Development and Distribution License("CDDL") (collectively, the
   19.12 -# "License"). You may not use this file except in compliance with the
   19.13 -# License. You can obtain a copy of the License at
   19.14 -# http://www.netbeans.org/cddl-gplv2.html
   19.15 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   19.16 -# specific language governing permissions and limitations under the
   19.17 -# License.  When distributing the software, include this License Header
   19.18 -# Notice in each file and include the License file at
   19.19 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   19.20 -# particular file as subject to the "Classpath" exception as provided
   19.21 -# by Sun in the GPL Version 2 section of the License file that
   19.22 -# accompanied this code. If applicable, add the following below the
   19.23 -# License Header, with the fields enclosed by brackets [] replaced by
   19.24 -# your own identifying information:
   19.25 -# "Portions Copyrighted [year] [name of copyright owner]"
   19.26 -#
   19.27 -# Contributor(s):
   19.28 -#
   19.29 -# The Original Software is NetBeans. The Initial Developer of the Original
   19.30 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   19.31 -# Microsystems, Inc. All Rights Reserved.
   19.32 -#
   19.33 -# If you wish your version of this file to be governed by only the CDDL
   19.34 -# or only the GPL Version 2, indicate your decision by adding
   19.35 -# "[Contributor] elects to include this software in this distribution
   19.36 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   19.37 -# single choice of license, a recipient has the option to distribute
   19.38 -# your version of this file under either the CDDL, the GPL Version 2 or
   19.39 -# to extend the choice of license to its licensees as provided above.
   19.40 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   19.41 -# Version 2 license, then the option applies only if the new code is
   19.42 -# made subject to such option by the copyright holder.
   19.43 -
   19.44 -#
   19.45 -
   19.46 -
   19.47 -OpenIDE-Module-Name=Project Import Page
   19.48 -OpenIDE-Module-Display-Category=Visual Web
   19.49 -OpenIDE-Module-Short-Description=Imports JSF/JSP/HTML pages.
   19.50 -OpenIDE-Module-Long-Description=Imports the JSF/JSP/HTML pages into current project.
    20.1 --- a/visualweb.project.importpage/src/org/netbeans/modules/visualweb/project/importpage/resources/layer.xml	Wed Feb 23 20:05:40 2011 -0500
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,57 +0,0 @@
    20.4 -<?xml version="1.0" encoding="UTF-8"?>
    20.5 -<!--
    20.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    20.7 -
    20.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    20.9 -
   20.10 -
   20.11 -The contents of this file are subject to the terms of either the GNU
   20.12 -General Public License Version 2 only ("GPL") or the Common
   20.13 -Development and Distribution License("CDDL") (collectively, the
   20.14 -"License"). You may not use this file except in compliance with the
   20.15 -License. You can obtain a copy of the License at
   20.16 -http://www.netbeans.org/cddl-gplv2.html
   20.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   20.18 -specific language governing permissions and limitations under the
   20.19 -License.  When distributing the software, include this License Header
   20.20 -Notice in each file and include the License file at
   20.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   20.22 -particular file as subject to the "Classpath" exception as provided
   20.23 -by Sun in the GPL Version 2 section of the License file that
   20.24 -accompanied this code. If applicable, add the following below the
   20.25 -License Header, with the fields enclosed by brackets [] replaced by
   20.26 -your own identifying information:
   20.27 -"Portions Copyrighted [year] [name of copyright owner]"
   20.28 -
   20.29 -Contributor(s):
   20.30 -
   20.31 -The Original Software is NetBeans. The Initial Developer of the Original
   20.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   20.33 -Microsystems, Inc. All Rights Reserved.
   20.34 -
   20.35 -If you wish your version of this file to be governed by only the CDDL
   20.36 -or only the GPL Version 2, indicate your decision by adding
   20.37 -"[Contributor] elects to include this software in this distribution
   20.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
   20.39 -single choice of license, a recipient has the option to distribute
   20.40 -your version of this file under either the CDDL, the GPL Version 2 or
   20.41 -to extend the choice of license to its licensees as provided above.
   20.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
   20.43 -Version 2 license, then the option applies only if the new code is
   20.44 -made subject to such option by the copyright holder.
   20.45 --->
   20.46 -
   20.47 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
   20.48 -<filesystem>
   20.49 -
   20.50 -    <folder name="Services">
   20.51 -       <folder name="ImportTypes">
   20.52 -          <file name="org-netbeans-modules-visualweb-project-importpage-PageImport.instance">
   20.53 -             <attr name="instanceOf" stringvalue="org.netbeans.modules.visualweb.project.jsf.api.Importable"/>
   20.54 -             <attr name="instanceClass" stringvalue="org.netbeans.modules.visualweb.project.importpage.PageImport"/>
   20.55 -          </file>
   20.56 -       </folder>
   20.57 -    </folder>
   20.58 -
   20.59 -</filesystem>
   20.60 -
    21.1 --- a/visualweb.removebindings/build.xml	Wed Feb 23 20:05:40 2011 -0500
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,5 +0,0 @@
    21.4 -<?xml version="1.0" encoding="UTF-8"?>
    21.5 -<project basedir="." default="netbeans" name="contrib/visualweb.removebindings">
    21.6 -    <description>Builds, tests, and runs the project org.netbeans.modules.visualweb.removebindings</description>
    21.7 -    <import file="../../nbbuild/templates/projectized.xml"/>
    21.8 -</project>
    22.1 --- a/visualweb.removebindings/manifest.mf	Wed Feb 23 20:05:40 2011 -0500
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,6 +0,0 @@
    22.4 -Manifest-Version: 1.0
    22.5 -OpenIDE-Module: org.netbeans.modules.visualweb.removebindings
    22.6 -OpenIDE-Module-Layer: org/netbeans/modules/visualweb/removebindings/layer.xml
    22.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visualweb/removebindings/Bundle.properties
    22.8 -OpenIDE-Module-Specification-Version: 1.1
    22.9 -
    23.1 --- a/visualweb.removebindings/nbproject/project.properties	Wed Feb 23 20:05:40 2011 -0500
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,4 +0,0 @@
    23.4 -javac.compilerargs=-Xlint -Xlint:-serial
    23.5 -javac.source=1.5
    23.6 -nbm.homepage=http://web.netbeans.org
    23.7 -nbm.module.author=Sandip V. Chitale (sandipchitale@netbeans.org)
    24.1 --- a/visualweb.removebindings/nbproject/project.xml	Wed Feb 23 20:05:40 2011 -0500
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,80 +0,0 @@
    24.4 -<?xml version="1.0" encoding="UTF-8"?>
    24.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
    24.6 -    <type>org.netbeans.modules.apisupport.project</type>
    24.7 -    <configuration>
    24.8 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
    24.9 -            <code-name-base>org.netbeans.modules.visualweb.removebindings</code-name-base>
   24.10 -            <module-dependencies>
   24.11 -                <dependency>
   24.12 -                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
   24.13 -                    <build-prerequisite/>
   24.14 -                    <compile-dependency/>
   24.15 -                    <run-dependency>
   24.16 -                        <release-version>1</release-version>
   24.17 -                        <specification-version>1.14</specification-version>
   24.18 -                    </run-dependency>
   24.19 -                </dependency>
   24.20 -                <dependency>
   24.21 -                    <code-name-base>org.netbeans.modules.visualweb.designtime</code-name-base>
   24.22 -                    <build-prerequisite/>
   24.23 -                    <compile-dependency/>
   24.24 -                    <run-dependency>
   24.25 -                        <release-version>1</release-version>
   24.26 -                        <specification-version>1.1</specification-version>
   24.27 -                    </run-dependency>
   24.28 -                </dependency>
   24.29 -                <dependency>
   24.30 -                    <code-name-base>org.netbeans.modules.visualweb.insync</code-name-base>
   24.31 -                    <build-prerequisite/>
   24.32 -                    <compile-dependency/>
   24.33 -                    <run-dependency>
   24.34 -                        <release-version>1</release-version>
   24.35 -                        <specification-version>2.2</specification-version>
   24.36 -                    </run-dependency>
   24.37 -                </dependency>
   24.38 -                <dependency>
   24.39 -                    <code-name-base>org.netbeans.modules.visualweb.project.jsf</code-name-base>
   24.40 -                    <build-prerequisite/>
   24.41 -                    <compile-dependency/>
   24.42 -                    <run-dependency>
   24.43 -                        <release-version>1</release-version>
   24.44 -                        <specification-version>2.2</specification-version>
   24.45 -                    </run-dependency>
   24.46 -                </dependency>
   24.47 -                <dependency>
   24.48 -                    <code-name-base>org.openide.dialogs</code-name-base>
   24.49 -                    <build-prerequisite/>
   24.50 -                    <compile-dependency/>
   24.51 -                    <run-dependency>
   24.52 -                        <specification-version>7.6</specification-version>
   24.53 -                    </run-dependency>
   24.54 -                </dependency>
   24.55 -                <dependency>
   24.56 -                    <code-name-base>org.openide.filesystems</code-name-base>
   24.57 -                    <build-prerequisite/>
   24.58 -                    <compile-dependency/>
   24.59 -                    <run-dependency>
   24.60 -                        <specification-version>7.6</specification-version>
   24.61 -                    </run-dependency>
   24.62 -                </dependency>
   24.63 -                <dependency>
   24.64 -                    <code-name-base>org.openide.io</code-name-base>
   24.65 -                    <build-prerequisite/>
   24.66 -                    <compile-dependency/>
   24.67 -                    <run-dependency>
   24.68 -                        <specification-version>1.12</specification-version>
   24.69 -                    </run-dependency>
   24.70 -                </dependency>
   24.71 -                <dependency>
   24.72 -                    <code-name-base>org.openide.util</code-name-base>
   24.73 -                    <build-prerequisite/>
   24.74 -                    <compile-dependency/>
   24.75 -                    <run-dependency>
   24.76 -                        <specification-version>7.12</specification-version>
   24.77 -                    </run-dependency>
   24.78 -                </dependency>
   24.79 -            </module-dependencies>
   24.80 -            <public-packages/>
   24.81 -        </data>
   24.82 -    </configuration>
   24.83 -</project>
    25.1 --- a/visualweb.removebindings/src/org/netbeans/modules/visualweb/removebindings/Bundle.properties	Wed Feb 23 20:05:40 2011 -0500
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,43 +0,0 @@
    25.4 -OpenIDE-Module-Display-Category=Visual Web
    25.5 -OpenIDE-Module-Long-Description=\
    25.6 -    Prior to NetBeans IDE 6.0 release VisualWeb Pages use to generate a binding attribute in the tag for every component in the page. \
    25.7 -    Some of these bindings are never used. \
    25.8 -    Therefore it is safe to remove such unused binding attributes (and the corresponding property field, getter and setter in the backing page bean). \
    25.9 -    In fact, starting with NetBeans IDE  6.1  (M1+) release the binding attribute is not generated by default. \
   25.10 -    Instead the user can add and remove the binding attribute by invoking the action in the component's pop up menu. \
   25.11 -    For details, see - http://wiki.netbeans.org/OnDemandBindingAttribute . \
   25.12 -    All this is well and good for projects developed using the NetBeans 6.1 IDE. \
   25.13 -    However the projects developed prior to NetBeanse IDE 6.1 IDE do not benefit from this feature. \
   25.14 -    That is where this module comes for the rescue. \
   25.15 -    This module installs the action - 'Remove unused binding attributes in the VisualWeb JSF Pages' in the projects' pop up menu. \
   25.16 -    When the action is invoked it shows a confirmation dialog. \
   25.17 -    Once the user confirms the action, the unused binding attributes (and the corresponding property field, getter and setter in the backing page bean) are removed from all the VisualWeb JSF pages in the VisualWeb project. \
   25.18 -    The output window shows the processing messages.
   25.19 -OpenIDE-Module-Name=Remove unused binding attributes in the VisualWeb JSF Pages
   25.20 -
   25.21 -CTL_RemoveUnusedBindingsAction=Remove unused binding attributes in the VisualWeb JSF Pages
   25.22 -
   25.23 -OpenIDE-Module-Short-Description=This module removes the unused binding attributes in VisualWeb JSF Pages.
   25.24 -TITLE_RemoveUnusedBindings= Confirm Removing binding attributes
   25.25 -MSG_RemoveUnusedBindingsWarning=<html><head></head><body>\
   25.26 -    <b>Removing binding attributes is an irreversible process.<br>\
   25.27 -    Make sure you have backed up your project.</b><br>\
   25.28 -    <br>\
   25.29 -    All modified files will be saved first. Unused binding attributes<br>\
   25.30 -    in the VisualWeb JSF Pages in this project will be removed. The files<br>\
   25.31 -    will be left in unsaved state. You may discard the changes<br>\
   25.32 -    by closing the project and discarding the changes. The process<br>\
   25.33 -    may take few minutes. Please check the output window for log messages.<br>\
   25.34 -    <br>\
   25.35 -    Do you want to proceed?</body></head>
   25.36 -
   25.37 -MSG_ProcessingProject=Removing unused binding attributes for components in the VisualWeb JSF Pages in the Project ''{0}''...
   25.38 -
   25.39 -MSG_Modeling=Modeling...
   25.40 -MSG_ModelingFailed=Modeling...Failed. Could not get FacesModelSet for the project ''{0}''.
   25.41 -
   25.42 -MSG_ProcessingFacesModel=Processing ''{0}''...
   25.43 -MSG_SkippingFacesModel=Model busted. Skipping ''{0}''
   25.44 -MSG_RemovedBindingsForBean=Removed unused binding attribute for the component ''{0}''.
   25.45 -
   25.46 -MSG_Done=Done
    26.1 --- a/visualweb.removebindings/src/org/netbeans/modules/visualweb/removebindings/RemoveUnusedBindingsAction.java	Wed Feb 23 20:05:40 2011 -0500
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,191 +0,0 @@
    26.4 -/*
    26.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    26.6 - *
    26.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    26.8 - *
    26.9 - * The contents of this file are subject to the terms of either the GNU
   26.10 - * General Public License Version 2 only ("GPL") or the Common
   26.11 - * Development and Distribution License("CDDL") (collectively, the
   26.12 - * "License"). You may not use this file except in compliance with the
   26.13 - * License. You can obtain a copy of the License at
   26.14 - * http://www.netbeans.org/cddl-gplv2.html
   26.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   26.16 - * specific language governing permissions and limitations under the
   26.17 - * License.  When distributing the software, include this License Header
   26.18 - * Notice in each file and include the License file at
   26.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   26.20 - * particular file as subject to the "Classpath" exception as provided
   26.21 - * by Sun in the GPL Version 2 section of the License file that
   26.22 - * accompanied this code. If applicable, add the following below the
   26.23 - * License Header, with the fields enclosed by brackets [] replaced by
   26.24 - * your own identifying information:
   26.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   26.26 - *
   26.27 - * If you wish your version of this file to be governed by only the CDDL
   26.28 - * or only the GPL Version 2, indicate your decision by adding
   26.29 - * "[Contributor] elects to include this software in this distribution
   26.30 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   26.31 - * single choice of license, a recipient has the option to distribute
   26.32 - * your version of this file under either the CDDL, the GPL Version 2 or
   26.33 - * to extend the choice of license to its licensees as provided above.
   26.34 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   26.35 - * Version 2 license, then the option applies only if the new code is
   26.36 - * made subject to such option by the copyright holder.
   26.37 - *
   26.38 - * Contributor(s):
   26.39 - *
   26.40 - * Portions Copyrighted 2008 Sun Microsystems, Inc.
   26.41 - */
   26.42 -
   26.43 -package org.netbeans.modules.visualweb.removebindings;
   26.44 -
   26.45 -import com.sun.rave.designtime.DesignBean;
   26.46 -import com.sun.rave.designtime.DesignContext;
   26.47 -import java.awt.event.ActionEvent;
   26.48 -import javax.swing.AbstractAction;
   26.49 -import javax.swing.Action;
   26.50 -import javax.swing.JEditorPane;
   26.51 -import javax.swing.JScrollPane;
   26.52 -import org.netbeans.api.project.Project;
   26.53 -import org.netbeans.modules.visualweb.insync.UndoEvent;
   26.54 -import org.netbeans.modules.visualweb.insync.beans.Bean;
   26.55 -import org.netbeans.modules.visualweb.insync.beans.BeansUnit;
   26.56 -import org.netbeans.modules.visualweb.insync.faces.FacesBean;
   26.57 -import org.netbeans.modules.visualweb.insync.faces.FacesPageUnit;
   26.58 -import org.netbeans.modules.visualweb.insync.java.JavaClass.UsageStatus;
   26.59 -import org.netbeans.modules.visualweb.insync.live.FacesDesignBean;
   26.60 -import org.netbeans.modules.visualweb.insync.live.LiveUnit;
   26.61 -import org.netbeans.modules.visualweb.insync.models.FacesModel;
   26.62 -import org.netbeans.modules.visualweb.insync.models.FacesModelSet;
   26.63 -import org.netbeans.modules.visualweb.project.jsf.api.JsfProjectUtils;
   26.64 -import org.openide.DialogDisplayer;
   26.65 -import org.openide.LifecycleManager;
   26.66 -import org.openide.NotifyDescriptor;
   26.67 -import org.openide.util.ContextAwareAction;
   26.68 -import org.openide.util.Lookup;
   26.69 -import org.openide.util.NbBundle;
   26.70 -import org.openide.util.RequestProcessor;
   26.71 -import org.openide.windows.IOProvider;
   26.72 -import org.openide.windows.OutputWriter;
   26.73 -
   26.74 -/**
   26.75 - *
   26.76 - * @author Sandip V. Chitale
   26.77 - */
   26.78 -public class RemoveUnusedBindingsAction extends AbstractAction implements ContextAwareAction {
   26.79 -
   26.80 -    public void actionPerformed(ActionEvent e) {
   26.81 -        assert false;
   26.82 -    }
   26.83 -
   26.84 -    public Action createContextAwareInstance(Lookup actionContext) {
   26.85 -        return new RemoveUnusedBindingsContextAwareAction(actionContext);
   26.86 -    }
   26.87 -
   26.88 -    private static class RemoveUnusedBindingsContextAwareAction extends AbstractAction {
   26.89 -        private Project project;
   26.90 -
   26.91 -        public RemoveUnusedBindingsContextAwareAction(Lookup actionContext) {
   26.92 -            super(NbBundle.getMessage(RemoveUnusedBindingsAction.class, "CTL_RemoveUnusedBindingsAction")); // NOI18N
   26.93 -            this.project = actionContext.lookup(Project.class);
   26.94 -            setEnabled(JsfProjectUtils.isJsfProject(project));
   26.95 -        }
   26.96 -
   26.97 -        public void actionPerformed(ActionEvent e) {
   26.98 -            JEditorPane editorPane = new JEditorPane();
   26.99 -            editorPane.setContentType("text/html");
  26.100 -            editorPane.setEditable(false);
  26.101 -            editorPane.setText(NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_RemoveUnusedBindingsWarning"));
  26.102 -
  26.103 -            NotifyDescriptor d =
  26.104 -                    new NotifyDescriptor.Confirmation(
  26.105 -                        new JScrollPane(editorPane),
  26.106 -                        NbBundle.getMessage(RemoveUnusedBindingsAction.class, "TITLE_RemoveUnusedBindings"),
  26.107 -                        NotifyDescriptor.OK_CANCEL_OPTION);
  26.108 -            if (DialogDisplayer.getDefault().notify(d) == NotifyDescriptor.OK_OPTION) {
  26.109 -                // Save all documents
  26.110 -                LifecycleManager.getDefault().saveAll();
  26.111 -
  26.112 -                RequestProcessor.getDefault().post(new Runnable() {
  26.113 -                    public void run() {
  26.114 -                        OutputWriter out = IOProvider.getDefault().getStdOut();
  26.115 -                        out.println(NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_ProcessingProject", project.getProjectDirectory()));
  26.116 -                        out.println(NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_Modeling"));
  26.117 -                        FacesModelSet facesModelSet = FacesModelSet.getInstance(project);
  26.118 -                        if (facesModelSet == null) {
  26.119 -                            out.println(NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_ModelingFailed", project.getProjectDirectory()));
  26.120 -                        } else {
  26.121 -                            out.println(
  26.122 -                                    NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_Modeling") +
  26.123 -                                    NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_Done"));                            
  26.124 -                            DesignContext[] designContexts = facesModelSet.getDesignContexts();
  26.125 -                            for (DesignContext designContext : designContexts) {
  26.126 -                                LiveUnit liveUnit = (LiveUnit) designContext;
  26.127 -                                BeansUnit beansUnit = liveUnit.getBeansUnit();
  26.128 -                                if (!(beansUnit instanceof FacesPageUnit)) {
  26.129 -                                    continue;
  26.130 -                                }
  26.131 -                                FacesModel facesModel = liveUnit.getModel();
  26.132 -                                if (facesModel == null) {
  26.133 -                                    continue;
  26.134 -                                }
  26.135 -                                out.println(NbBundle.getMessage(RemoveUnusedBindingsAction.class,
  26.136 -                                        "MSG_ProcessingFacesModel",  // NOI18N
  26.137 -                                        facesModel.getFile().getPath()));
  26.138 -                                if (facesModel.isBusted()) {
  26.139 -                                    out.println(NbBundle.getMessage(RemoveUnusedBindingsAction.class,
  26.140 -                                            "MSG_SkippingFacesModel",  // NOI18N
  26.141 -                                            facesModel.getFile().getPath()));
  26.142 -                                    continue;
  26.143 -                                }
  26.144 -                                UndoEvent undo = null;
  26.145 -                                try {
  26.146 -                                    undo = facesModel.writeLock(
  26.147 -                                            NbBundle.getMessage(RemoveUnusedBindingsAction.class,
  26.148 -                                            "CTL_RemoveUnusedBindingsAction"));  // NOI18N
  26.149 -                                    FacesPageUnit facesPageUnit = (FacesPageUnit) beansUnit;
  26.150 -                                    DesignBean[] beans = liveUnit.getBeans();
  26.151 -                                    for (DesignBean bean : beans) {
  26.152 -                                        if (bean instanceof FacesDesignBean) {
  26.153 -                                            FacesDesignBean facesDesignBean = (FacesDesignBean) bean;
  26.154 -                                            if (hasBindingAttribute(facesDesignBean)) {
  26.155 -                                                FacesBean.UsageInfo usageInfo = facesDesignBean.getUsageInfo();
  26.156 -                                                if (usageInfo.getUsageStatus() == UsageStatus.NOT_USED) {
  26.157 -                                                    facesDesignBean.removeBinding();
  26.158 -                                                    out.println(NbBundle.getMessage(RemoveUnusedBindingsAction.class,
  26.159 -                                                        "MSG_RemovedBindingsForBean",  // NOI18N
  26.160 -                                                        facesDesignBean.getInstanceName()));
  26.161 -                                                }
  26.162 -                                            }
  26.163 -                                        }
  26.164 -                                    }
  26.165 -                                } finally {
  26.166 -                                    facesModel.writeUnlock(undo);
  26.167 -                                }
  26.168 -                                out.println(
  26.169 -                                    NbBundle.getMessage(RemoveUnusedBindingsAction.class,
  26.170 -                                        "MSG_ProcessingFacesModel", // NOI18N
  26.171 -                                        facesModel.getFile().getPath()) +
  26.172 -                                    NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_Done"));
  26.173 -                            }
  26.174 -                        }
  26.175 -                        out.println(NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_ProcessingProject", project.getProjectDirectory()) +
  26.176 -                                    NbBundle.getMessage(RemoveUnusedBindingsAction.class, "MSG_Done"));
  26.177 -                    }
  26.178 -                });
  26.179 -            }
  26.180 -        }
  26.181 -    }
  26.182 -
  26.183 -    private static boolean hasBindingAttribute(DesignBean designBean) {
  26.184 -        if (designBean instanceof FacesDesignBean) {
  26.185 -            FacesDesignBean facesDesignBean = (FacesDesignBean) designBean;
  26.186 -            Bean bean = facesDesignBean.getBean();
  26.187 -            if (bean instanceof FacesBean) {
  26.188 -                FacesBean facesBean = (FacesBean) bean;
  26.189 -                return facesBean.getAttr(facesBean.BINDING_ATTR) != null;
  26.190 -            }
  26.191 -        }
  26.192 -        return false;
  26.193 -    }
  26.194 -}
    27.1 --- a/visualweb.removebindings/src/org/netbeans/modules/visualweb/removebindings/layer.xml	Wed Feb 23 20:05:40 2011 -0500
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,21 +0,0 @@
    27.4 -<?xml version="1.0" encoding="UTF-8"?>
    27.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
    27.6 -<filesystem>
    27.7 -    <folder name="Actions">
    27.8 -        <folder name="VisualWeb">
    27.9 -            <file name="org-netbeans-modules-visualweb-removebindings-RemoveUnusedBindingsAction.instance">
   27.10 -                <attr name="instanceClass" stringvalue="org.netbeans.modules.visualweb.removebindings.RemoveUnusedBindingsAction"/>
   27.11 -            </file>
   27.12 -        </folder>
   27.13 -    </folder>
   27.14 -    
   27.15 -    <!-- Projects -->
   27.16 -    <folder name="Projects">
   27.17 -        <folder name="Actions">
   27.18 -            <file name="org-netbeans-modules-visualweb-removebindings-RemoveUnusedBindingsAction.shadow">
   27.19 -                <attr name="originalFile" stringvalue="Actions/VisualWeb/org-netbeans-modules-visualweb-removebindings-RemoveUnusedBindingsAction.instance"/>
   27.20 -                <attr name="position" intvalue="10000"/>
   27.21 -            </file>
   27.22 -        </folder>
   27.23 -    </folder>
   27.24 -</filesystem>
    28.1 --- a/visualweb.samples.postrel/build.xml	Wed Feb 23 20:05:40 2011 -0500
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,76 +0,0 @@
    28.4 -<?xml version="1.0" encoding="UTF-8"?>
    28.5 -<!--
    28.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    28.7 -
    28.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    28.9 -
   28.10 -
   28.11 -The contents of this file are subject to the terms of either the GNU
   28.12 -General Public License Version 2 only ("GPL") or the Common
   28.13 -Development and Distribution License("CDDL") (collectively, the
   28.14 -"License"). You may not use this file except in compliance with the
   28.15 -License. You can obtain a copy of the License at
   28.16 -http://www.netbeans.org/cddl-gplv2.html
   28.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   28.18 -specific language governing permissions and limitations under the
   28.19 -License.  When distributing the software, include this License Header
   28.20 -Notice in each file and include the License file at
   28.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   28.22 -particular file as subject to the "Classpath" exception as provided
   28.23 -by Sun in the GPL Version 2 section of the License file that
   28.24 -accompanied this code. If applicable, add the following below the
   28.25 -License Header, with the fields enclosed by brackets [] replaced by
   28.26 -your own identifying information:
   28.27 -"Portions Copyrighted [year] [name of copyright owner]"
   28.28 -
   28.29 -Contributor(s):
   28.30 -
   28.31 -The Original Software is NetBeans. The Initial Developer of the Original
   28.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   28.33 -Microsystems, Inc. All Rights Reserved.
   28.34 -
   28.35 -If you wish your version of this file to be governed by only the CDDL
   28.36 -or only the GPL Version 2, indicate your decision by adding
   28.37 -"[Contributor] elects to include this software in this distribution
   28.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
   28.39 -single choice of license, a recipient has the option to distribute
   28.40 -your version of this file under either the CDDL, the GPL Version 2 or
   28.41 -to extend the choice of license to its licensees as provided above.
   28.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
   28.43 -Version 2 license, then the option applies only if the new code is
   28.44 -made subject to such option by the copyright holder.
   28.45 --->
   28.46 -<project basedir="." default="netbeans" name="contrib/visualweb.samples.postrel">
   28.47 -    <description>Builds, tests, and runs the project org.netbeans.modules.visualweb.samples.postrel</description>
   28.48 -    <import file="../../nbbuild/templates/projectized.xml"/>
   28.49 -
   28.50 -    <target name="jar" depends="gather-samples,projectized-common.jar"/>
   28.51 -    
   28.52 -    <target name="-init">
   28.53 -        <!-- properties -->
   28.54 -        <property name="webapps.dest"       location="${build.classes.dir}/org/netbeans/modules/visualweb/samples/postrel" />
   28.55 -        <property name="webapps.desc.dest"  location="${webapps.dest}/descriptions" />
   28.56 -        <property name="webapps.repos"      location="webapps" />
   28.57 -        <property name="webapps.desc"       location="${webapps.repos}/descriptions" />
   28.58 -        <property name="complibs.dest"      location="${cluster}/samples/complibs" />
   28.59 -        <property name="complibs.repos"     location="complibs" />
   28.60 -    </target>
   28.61 -
   28.62 -    <target name="gather-samples" depends="-init">
   28.63 -        <echo message="Zipping up and copying sample web app projects." />
   28.64 -        <!-- sample webapps -->
   28.65 -        <mkdir dir="${webapps.dest}" />
   28.66 -        <copy file="${webapps.desc}/CurrencyTrader.html" todir="${webapps.desc.dest}" />
   28.67 -        <zip basedir="${webapps.repos}/CurrencyTrader" excludes="CVS,private,.cvsignore" destfile="${webapps.dest}/CurrencyTrader.zip" />  
   28.68 -    </target>
   28.69 -    
   28.70 -    <target name="netbeans-extra" depends="-init">
   28.71 -        <!-- sample complibs -->
   28.72 -        <echo message="Copying sample complibs." />
   28.73 -        <mkdir dir="${complibs.dest}" /> <!-- Create the dir because complibs mgr looks there for complibs. -->
   28.74 -        <!-- Remove the BP components for now since they don't work -->
   28.75 -        <!-- copy file="${complibs.repos}/ui/ui.complib" todir="${complibs.dest}" flatten="true"/ -->
   28.76 -        <copy file="${complibs.repos}/dynamicfaces/dynamicfaces.complib" todir="${complibs.dest}" flatten="true"/>
   28.77 -    </target>
   28.78 -
   28.79 -</project>
    29.1 Binary file visualweb.samples.postrel/complibs/dynamicfaces/dynamicfaces.complib has changed
    30.1 Binary file visualweb.samples.postrel/complibs/ui/ui.complib has changed
    31.1 --- a/visualweb.samples.postrel/manifest.mf	Wed Feb 23 20:05:40 2011 -0500
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,8 +0,0 @@
    31.4 -Manifest-Version: 1.0
    31.5 -OpenIDE-Module: org.netbeans.modules.visualweb.samples.postrel
    31.6 -OpenIDE-Module-Layer: org/netbeans/modules/visualweb/samples/postrel/layer.xml
    31.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visualweb/samples/postrel/Bundle.properties
    31.8 -OpenIDE-Module-Specification-Version: 1.0
    31.9 -OpenIDE-Module-Install: org/netbeans/modules/visualweb/samples/postrel/PostReleaseModuleInstaller.class
   31.10 -AutoUpdate-Show-In-Client: true
   31.11 -
    32.1 --- a/visualweb.samples.postrel/nbproject/project.properties	Wed Feb 23 20:05:40 2011 -0500
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,43 +0,0 @@
    32.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    32.5 -#
    32.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    32.7 -#
    32.8 -# The contents of this file are subject to the terms of either the GNU
    32.9 -# General Public License Version 2 only ("GPL") or the Common
   32.10 -# Development and Distribution License("CDDL") (collectively, the
   32.11 -# "License"). You may not use this file except in compliance with the
   32.12 -# License. You can obtain a copy of the License at
   32.13 -# http://www.netbeans.org/cddl-gplv2.html
   32.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   32.15 -# specific language governing permissions and limitations under the
   32.16 -# License.  When distributing the software, include this License Header
   32.17 -# Notice in each file and include the License file at
   32.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   32.19 -# particular file as subject to the "Classpath" exception as provided
   32.20 -# by Sun in the GPL Version 2 section of the License file that
   32.21 -# accompanied this code. If applicable, add the following below the
   32.22 -# License Header, with the fields enclosed by brackets [] replaced by
   32.23 -# your own identifying information:
   32.24 -# "Portions Copyrighted [year] [name of copyright owner]"
   32.25 -#
   32.26 -# Contributor(s):
   32.27 -#
   32.28 -# The Original Software is NetBeans. The Initial Developer of the Original
   32.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   32.30 -# Microsystems, Inc. All Rights Reserved.
   32.31 -#
   32.32 -# If you wish your version of this file to be governed by only the CDDL
   32.33 -# or only the GPL Version 2, indicate your decision by adding
   32.34 -# "[Contributor] elects to include this software in this distribution
   32.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   32.36 -# single choice of license, a recipient has the option to distribute
   32.37 -# your version of this file under either the CDDL, the GPL Version 2 or
   32.38 -# to extend the choice of license to its licensees as provided above.
   32.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   32.40 -# Version 2 license, then the option applies only if the new code is
   32.41 -# made subject to such option by the copyright holder.
   32.42 -
   32.43 -javac.compilerargs=-Xlint:unchecked
   32.44 -javac.source=1.5
   32.45 -extra.module.files=samples/complibs/dynamicfaces.complib
   32.46 -
    33.1 --- a/visualweb.samples.postrel/nbproject/project.xml	Wed Feb 23 20:05:40 2011 -0500
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,97 +0,0 @@
    33.4 -<?xml version="1.0" encoding="UTF-8"?>
    33.5 -<!--
    33.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    33.7 -
    33.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    33.9 -
   33.10 -
   33.11 -The contents of this file are subject to the terms of either the GNU
   33.12 -General Public License Version 2 only ("GPL") or the Common
   33.13 -Development and Distribution License("CDDL") (collectively, the
   33.14 -"License"). You may not use this file except in compliance with the
   33.15 -License. You can obtain a copy of the License at
   33.16 -http://www.netbeans.org/cddl-gplv2.html
   33.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   33.18 -specific language governing permissions and limitations under the
   33.19 -License.  When distributing the software, include this License Header
   33.20 -Notice in each file and include the License file at
   33.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   33.22 -particular file as subject to the "Classpath" exception as provided
   33.23 -by Sun in the GPL Version 2 section of the License file that
   33.24 -accompanied this code. If applicable, add the following below the
   33.25 -License Header, with the fields enclosed by brackets [] replaced by
   33.26 -your own identifying information:
   33.27 -"Portions Copyrighted [year] [name of copyright owner]"
   33.28 -
   33.29 -Contributor(s):
   33.30 -
   33.31 -The Original Software is NetBeans. The Initial Developer of the Original
   33.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   33.33 -Microsystems, Inc. All Rights Reserved.
   33.34 -
   33.35 -If you wish your version of this file to be governed by only the CDDL
   33.36 -or only the GPL Version 2, indicate your decision by adding
   33.37 -"[Contributor] elects to include this software in this distribution
   33.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
   33.39 -single choice of license, a recipient has the option to distribute
   33.40 -your version of this file under either the CDDL, the GPL Version 2 or
   33.41 -to extend the choice of license to its licensees as provided above.
   33.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
   33.43 -Version 2 license, then the option applies only if the new code is
   33.44 -made subject to such option by the copyright holder.
   33.45 --->
   33.46 -<project xmlns="http://www.netbeans.org/ns/project/1">
   33.47 -    <type>org.netbeans.modules.apisupport.project</type>
   33.48 -    <configuration>
   33.49 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
   33.50 -            <code-name-base>org.netbeans.modules.visualweb.samples.postrel</code-name-base>
   33.51 -            <module-dependencies>
   33.52 -                <dependency>
   33.53 -                    <code-name-base>org.netbeans.modules.visualweb.complib</code-name-base>
   33.54 -                    <run-dependency>
   33.55 -                        <specification-version>2.1</specification-version>
   33.56 -                    </run-dependency>
   33.57 -                </dependency>
   33.58 -                <dependency>
   33.59 -                    <code-name-base>org.netbeans.modules.visualweb.complib.api</code-name-base>
   33.60 -                    <build-prerequisite/>
   33.61 -                    <compile-dependency/>
   33.62 -                    <run-dependency>
   33.63 -                        <specification-version>1.0</specification-version>
   33.64 -                    </run-dependency>
   33.65 -                </dependency>
   33.66 -                <dependency>
   33.67 -                    <code-name-base>org.netbeans.modules.visualweb.kit</code-name-base>
   33.68 -                    <run-dependency>
   33.69 -                        <specification-version>1.1</specification-version>
   33.70 -                    </run-dependency>
   33.71 -                </dependency>
   33.72 -                <dependency>
   33.73 -                    <code-name-base>org.netbeans.modules.visualweb.samples.bundled</code-name-base>
   33.74 -                    <build-prerequisite/>
   33.75 -                    <compile-dependency/>
   33.76 -                    <run-dependency>
   33.77 -                        <specification-version>1.0</specification-version>
   33.78 -                    </run-dependency>
   33.79 -                </dependency>
   33.80 -                <dependency>
   33.81 -                    <code-name-base>org.openide.modules</code-name-base>
   33.82 -                    <build-prerequisite/>
   33.83 -                    <compile-dependency/>
   33.84 -                    <run-dependency>
   33.85 -                        <specification-version>6.4.1</specification-version>
   33.86 -                    </run-dependency>
   33.87 -                </dependency>
   33.88 -                <dependency>
   33.89 -                    <code-name-base>org.openide.util</code-name-base>
   33.90 -                    <build-prerequisite/>
   33.91 -                    <compile-dependency/>
   33.92 -                    <run-dependency>
   33.93 -                        <specification-version>7.4.1</specification-version>
   33.94 -                    </run-dependency>
   33.95 -                </dependency>
   33.96 -            </module-dependencies>
   33.97 -            <public-packages/>
   33.98 -        </data>
   33.99 -    </configuration>
  33.100 -</project>
    34.1 --- a/visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/Bundle.properties	Wed Feb 23 20:05:40 2011 -0500
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,47 +0,0 @@
    34.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    34.5 -#
    34.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    34.7 -#
    34.8 -# The contents of this file are subject to the terms of either the GNU
    34.9 -# General Public License Version 2 only ("GPL") or the Common
   34.10 -# Development and Distribution License("CDDL") (collectively, the
   34.11 -# "License"). You may not use this file except in compliance with the
   34.12 -# License. You can obtain a copy of the License at
   34.13 -# http://www.netbeans.org/cddl-gplv2.html
   34.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   34.15 -# specific language governing permissions and limitations under the
   34.16 -# License.  When distributing the software, include this License Header
   34.17 -# Notice in each file and include the License file at
   34.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   34.19 -# particular file as subject to the "Classpath" exception as provided
   34.20 -# by Sun in the GPL Version 2 section of the License file that
   34.21 -# accompanied this code. If applicable, add the following below the
   34.22 -# License Header, with the fields enclosed by brackets [] replaced by
   34.23 -# your own identifying information:
   34.24 -# "Portions Copyrighted [year] [name of copyright owner]"
   34.25 -#
   34.26 -# Contributor(s):
   34.27 -#
   34.28 -# The Original Software is NetBeans. The Initial Developer of the Original
   34.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   34.30 -# Microsystems, Inc. All Rights Reserved.
   34.31 -#
   34.32 -# If you wish your version of this file to be governed by only the CDDL
   34.33 -# or only the GPL Version 2, indicate your decision by adding
   34.34 -# "[Contributor] elects to include this software in this distribution
   34.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   34.36 -# single choice of license, a recipient has the option to distribute
   34.37 -# your version of this file under either the CDDL, the GPL Version 2 or
   34.38 -# to extend the choice of license to its licensees as provided above.
   34.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   34.40 -# Version 2 license, then the option applies only if the new code is
   34.41 -# made subject to such option by the copyright holder.
   34.42 -
   34.43 -OpenIDE-Module-Name=Project Dynamic Faces Ajax Components and Samples
   34.44 -OpenIDE-Module-Display-Category=Java Web and EE
   34.45 -OpenIDE-Module-Short-Description=This module contains samples that demonstrate how to build Ajax enabled web applications using NetBeans
   34.46 -OpenIDE-Module-Long-Description=This plugin enables WYSIWYG development of Ajax enabled JavaServer Faces applications using the Visual JSF framework and Project Dynamic Faces. This module also includes a sample application (Currency Trader) that shows how to develop real world Ajax enabled applications.
   34.47 -
   34.48 -Templates/Project/Samples/Web/VisualJsf=Visual JSF
   34.49 -Templates/Project/Samples/Web/VisualJsf/CurrencyTrader=Currency Trader
   34.50 -
    35.1 --- a/visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/PostReleaseModuleInstaller.java	Wed Feb 23 20:05:40 2011 -0500
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,114 +0,0 @@
    35.4 -/*
    35.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    35.6 - *
    35.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    35.8 - *
    35.9 - * The contents of this file are subject to the terms of either the GNU
   35.10 - * General Public License Version 2 only ("GPL") or the Common
   35.11 - * Development and Distribution License("CDDL") (collectively, the
   35.12 - * "License"). You may not use this file except in compliance with the
   35.13 - * License. You can obtain a copy of the License at
   35.14 - * http://www.netbeans.org/cddl-gplv2.html
   35.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   35.16 - * specific language governing permissions and limitations under the
   35.17 - * License.  When distributing the software, include this License Header
   35.18 - * Notice in each file and include the License file at
   35.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   35.20 - * particular file as subject to the "Classpath" exception as provided
   35.21 - * by Sun in the GPL Version 2 section of the License file that
   35.22 - * accompanied this code. If applicable, add the following below the
   35.23 - * License Header, with the fields enclosed by brackets [] replaced by
   35.24 - * your own identifying information:
   35.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   35.26 - *
   35.27 - * Contributor(s):
   35.28 - *
   35.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   35.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   35.31 - * Microsystems, Inc. All Rights Reserved.
   35.32 - *
   35.33 - * If you wish your version of this file to be governed by only the CDDL
   35.34 - * or only the GPL Version 2, indicate your decision by adding
   35.35 - * "[Contributor] elects to include this software in this distribution
   35.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   35.37 - * single choice of license, a recipient has the option to distribute
   35.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   35.39 - * to extend the choice of license to its licensees as provided above.
   35.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   35.41 - * Version 2 license, then the option applies only if the new code is
   35.42 - * made subject to such option by the copyright holder.
   35.43 - */
   35.44 -package org.netbeans.modules.visualweb.samples.postrel;
   35.45 -
   35.46 -import java.io.File;
   35.47 -import java.util.logging.Level;
   35.48 -import java.util.logging.Logger;
   35.49 -import java.util.prefs.Preferences;
   35.50 -
   35.51 -import org.netbeans.modules.visualweb.complib.api.ComplibException;
   35.52 -import org.netbeans.modules.visualweb.complib.api.ComplibService;
   35.53 -
   35.54 -import org.openide.modules.ModuleInstall;
   35.55 -import org.openide.modules.InstalledFileLocator;
   35.56 -import org.openide.util.Lookup;
   35.57 -import org.openide.util.NbPreferences;
   35.58 -
   35.59 -/**
   35.60 - * Module that packages sample web apps, complibs, and code clips
   35.61 - * that are delivered post-release of the IDE via the update center.
   35.62 - */
   35.63 -public class PostReleaseModuleInstaller extends ModuleInstall {
   35.64 -
   35.65 -    private static final String SAMPLES_POSTREL_COMPLIBS = "samples.postrel.complibs";
   35.66 -    private static final String INSTALLED = "installed";
   35.67 -    private static final String UNINSTALLED = "uninstalled";
   35.68 -
   35.69 -    public void restored() {
   35.70 -        Logger.getLogger("org.netbeans.modules.visualweb.samples.postrel").log(Level.INFO, "In restored()...");
   35.71 -        Preferences preferences = NbPreferences.forModule(PostReleaseModuleInstaller.class);
   35.72 -
   35.73 -        String pref = preferences.get(SAMPLES_POSTREL_COMPLIBS, null);
   35.74 -
   35.75 -        if (pref == null || pref.equals(UNINSTALLED)) {
   35.76 -            Logger.getLogger("org.netbeans.modules.visualweb.samples.postrel").log(Level.INFO, "pref = " + pref);
   35.77 -
   35.78 -            File samplesComplibsDir = InstalledFileLocator.getDefault().locate("samples/complibs", null, false); // NOI18N
   35.79 -            Logger.getLogger("org.netbeans.modules.visualweb.samples.postrel").log(Level.INFO, "installing & registering the new complib");
   35.80 -
   35.81 -            if (samplesComplibsDir == null) {
   35.82 -                // Nothing to do here
   35.83 -                Logger.getLogger("org.netbeans.modules.visualweb.samples.postrel").log(Level.WARNING, "samples/complibs directory is null!");
   35.84 -                return;
   35.85 -            }
   35.86 -
   35.87 -            ComplibService complibService = (ComplibService) Lookup.getDefault().lookup(ComplibService.class);
   35.88 -
   35.89 -            // If cannot get the complibService, just return
   35.90 -            if (complibService == null) {
   35.91 -                Logger.getLogger("org.netbeans.modules.visualweb.samples.postrel").log(Level.WARNING, "complibService is null!");
   35.92 -                return;
   35.93 -            }
   35.94 -
   35.95 -            for (File complibFile : samplesComplibsDir.listFiles()) {
   35.96 -                try {
   35.97 -                    complibService.installComplibFile(complibFile, false);
   35.98 -                } catch (ComplibException ce) {
   35.99 -                    Logger.getLogger("org.netbeans.modules.visualweb.samples.postrel").log(Level.WARNING, ce.getMessage());
  35.100 -                }
  35.101 -            }
  35.102 -            preferences.put(SAMPLES_POSTREL_COMPLIBS, INSTALLED);
  35.103 -        }
  35.104 -    }
  35.105 -
  35.106 -    public void close() {
  35.107 -        Logger.getLogger("org.netbeans.modules.visualweb.samples.postrel").log(Level.INFO, "In close() do nothing here...");
  35.108 -
  35.109 -    }
  35.110 -
  35.111 -    public void uninstalled() {
  35.112 -        Logger.getLogger("org.netbeans.modules.visualweb.samples.postrel").log(Level.INFO, "In uninstalled()...");
  35.113 -        Preferences preferences = NbPreferences.forModule(PostReleaseModuleInstaller.class);
  35.114 -        preferences.put(SAMPLES_POSTREL_COMPLIBS, UNINSTALLED);
  35.115 -    }
  35.116 -}
  35.117 -
    36.1 --- a/visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/descriptions/webSamplesCategory.html	Wed Feb 23 20:05:40 2011 -0500
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,10 +0,0 @@
    36.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.1 Transitional//EN">
    36.5 -<html>
    36.6 -<head>
    36.7 -   <title>Web Samples Category</title>
    36.8 -</head>
    36.9 -
   36.10 -<body>
   36.11 -Explain the sample.
   36.12 -</body>
   36.13 -</html>
    37.1 --- a/visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/layer.xml	Wed Feb 23 20:05:40 2011 -0500
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,67 +0,0 @@
    37.4 -<?xml version="1.0" encoding="UTF-8"?>
    37.5 -<!--
    37.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    37.7 -
    37.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    37.9 -
   37.10 -
   37.11 -The contents of this file are subject to the terms of either the GNU
   37.12 -General Public License Version 2 only ("GPL") or the Common
   37.13 -Development and Distribution License("CDDL") (collectively, the
   37.14 -"License"). You may not use this file except in compliance with the
   37.15 -License. You can obtain a copy of the License at
   37.16 -http://www.netbeans.org/cddl-gplv2.html
   37.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   37.18 -specific language governing permissions and limitations under the
   37.19 -License.  When distributing the software, include this License Header
   37.20 -Notice in each file and include the License file at
   37.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   37.22 -particular file as subject to the "Classpath" exception as provided
   37.23 -by Sun in the GPL Version 2 section of the License file that
   37.24 -accompanied this code. If applicable, add the following below the
   37.25 -License Header, with the fields enclosed by brackets [] replaced by
   37.26 -your own identifying information:
   37.27 -"Portions Copyrighted [year] [name of copyright owner]"
   37.28 -
   37.29 -Contributor(s):
   37.30 -
   37.31 -The Original Software is NetBeans. The Initial Developer of the Original
   37.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   37.33 -Microsystems, Inc. All Rights Reserved.
   37.34 -
   37.35 -If you wish your version of this file to be governed by only the CDDL
   37.36 -or only the GPL Version 2, indicate your decision by adding
   37.37 -"[Contributor] elects to include this software in this distribution
   37.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
   37.39 -single choice of license, a recipient has the option to distribute
   37.40 -your version of this file under either the CDDL, the GPL Version 2 or
   37.41 -to extend the choice of license to its licensees as provided above.
   37.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
   37.43 -Version 2 license, then the option applies only if the new code is
   37.44 -made subject to such option by the copyright holder.
   37.45 --->
   37.46 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
   37.47 -<filesystem>
   37.48 -    <folder name="Templates">
   37.49 -        <folder name="Project">
   37.50 -            <folder name="Samples">
   37.51 -                <folder name="Web">
   37.52 -                    <folder name="VisualJsf">
   37.53 -                        <attr name="position" intvalue="500" />
   37.54 -                        <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.samples.postrel.Bundle"/>
   37.55 -                        <file name="CurrencyTrader" url="CurrencyTrader.zip">
   37.56 -                           <attr name="template" boolvalue="true"/>
   37.57 -                           <attr name="templateCategory" stringvalue="web-types"/>
   37.58 -                           <attr name="position" intvalue="1100"/>
   37.59 -                           <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/netbeans/modules/visualweb/samples/postrel/descriptions/CurrencyTrader.html"/>
   37.60 -                           <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.samples.postrel.Bundle"/>
   37.61 -                           <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/samples/postrel/ui/resources/webProjectIcon.gif"/>
   37.62 -                           <attr name="instantiatingIterator" methodvalue="org.netbeans.modules.visualweb.samples.bundled.wizard.SamplesWebWizardIterator.createIterator"/>
   37.63 -                        </file>
   37.64 -                    </folder>
   37.65 -                </folder>
   37.66 -            </folder>
   37.67 -        </folder>
   37.68 -    </folder>
   37.69 -</filesystem>
   37.70 -
    38.1 Binary file visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/ui/resources/webProjectIcon.gif has changed
    39.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/build.xml	Wed Feb 23 20:05:40 2011 -0500
    39.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.3 @@ -1,108 +0,0 @@
    39.4 -<?xml version="1.0" encoding="UTF-8"?>
    39.5 -<!--
    39.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    39.7 -
    39.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    39.9 -
   39.10 -
   39.11 -The contents of this file are subject to the terms of either the GNU
   39.12 -General Public License Version 2 only ("GPL") or the Common
   39.13 -Development and Distribution License("CDDL") (collectively, the
   39.14 -"License"). You may not use this file except in compliance with the
   39.15 -License. You can obtain a copy of the License at
   39.16 -http://www.netbeans.org/cddl-gplv2.html
   39.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   39.18 -specific language governing permissions and limitations under the
   39.19 -License.  When distributing the software, include this License Header
   39.20 -Notice in each file and include the License file at
   39.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   39.22 -particular file as subject to the "Classpath" exception as provided
   39.23 -by Sun in the GPL Version 2 section of the License file that
   39.24 -accompanied this code. If applicable, add the following below the
   39.25 -License Header, with the fields enclosed by brackets [] replaced by
   39.26 -your own identifying information:
   39.27 -"Portions Copyrighted [year] [name of copyright owner]"
   39.28 -
   39.29 -Contributor(s):
   39.30 -
   39.31 -The Original Software is NetBeans. The Initial Developer of the Original
   39.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   39.33 -Microsystems, Inc. All Rights Reserved.
   39.34 -
   39.35 -If you wish your version of this file to be governed by only the CDDL
   39.36 -or only the GPL Version 2, indicate your decision by adding
   39.37 -"[Contributor] elects to include this software in this distribution
   39.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
   39.39 -single choice of license, a recipient has the option to distribute
   39.40 -your version of this file under either the CDDL, the GPL Version 2 or
   39.41 -to extend the choice of license to its licensees as provided above.
   39.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
   39.43 -Version 2 license, then the option applies only if the new code is
   39.44 -made subject to such option by the copyright holder.
   39.45 --->
   39.46 -
   39.47 -<!-- You may freely edit this file. See commented blocks below for -->
   39.48 -<!-- some examples of how to customize the build. -->
   39.49 -<!-- (If you delete it and reopen the project it will be recreated.) -->
   39.50 -<project name="CurrencyTrader" default="default" basedir=".">
   39.51 -    <description>Builds, tests, and runs the project CurrencyTrader.</description>
   39.52 -    <import file="nbproject/build-impl.xml"/>
   39.53 -    <!--
   39.54 -
   39.55 -    There exist several targets which are by default empty and which can be 
   39.56 -    used for execution of your tasks. These targets are usually executed 
   39.57 -    before and after some main targets. They are: 
   39.58 -
   39.59 -      -pre-init:                 called before initialization of project properties 
   39.60 -      -post-init:                called after initialization of project properties 
   39.61 -      -pre-compile:              called before javac compilation 
   39.62 -      -post-compile:             called after javac compilation 
   39.63 -      -pre-compile-single:       called before javac compilation of single file
   39.64 -      -post-compile-single:      called after javac compilation of single file
   39.65 -      -pre-compile-test:         called before javac compilation of JUnit tests
   39.66 -      -post-compile-test:        called after javac compilation of JUnit tests
   39.67 -      -pre-compile-test-single:  called before javac compilation of single JUnit test
   39.68 -      -post-compile-test-single: called after javac compilation of single JUunit test
   39.69 -      -pre-dist:                 called before jar building 
   39.70 -      -post-dist:                called after jar building 
   39.71 -      -post-clean:               called after cleaning build products 
   39.72 -      -pre-run-deploy:           called before deploying
   39.73 -      -post-run-deploy:          called after deploying
   39.74 -
   39.75 -    Example of pluging an obfuscator after the compilation could look like 
   39.76 -
   39.77 -        <target name="-post-compile">
   39.78 -            <obfuscate>
   39.79 -                <fileset dir="${build.classes.dir}"/>
   39.80 -            </obfuscate>
   39.81 -        </target>
   39.82 -
   39.83 -    For list of available properties check the imported 
   39.84 -    nbproject/build-impl.xml file. 
   39.85 -
   39.86 -
   39.87 -    Other way how to customize the build is by overriding existing main targets.
   39.88 -    The target of interest are: 
   39.89 -
   39.90 -      init-macrodef-javac:    defines macro for javac compilation
   39.91 -      init-macrodef-junit:   defines macro for junit execution
   39.92 -      init-macrodef-debug:    defines macro for class debugging
   39.93 -      do-dist:                jar archive building
   39.94 -      run:                    execution of project 
   39.95 -      javadoc-build:          javadoc generation 
   39.96 -
   39.97 -    Example of overriding the target for project execution could look like 
   39.98 -
   39.99 -        <target name="run" depends="<PROJNAME>-impl.jar">
  39.100 -            <exec dir="bin" executable="launcher.exe">
  39.101 -                <arg file="${dist.jar}"/>
  39.102 -            </exec>
  39.103 -        </target>
  39.104 -
  39.105 -    Notice that overridden target depends on jar target and not only on 
  39.106 -    compile target as regular run target does. Again, for list of available 
  39.107 -    properties which you can use check the target you are overriding in 
  39.108 -    nbproject/build-impl.xml file. 
  39.109 -
  39.110 -    -->
  39.111 -</project>
    40.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/lib/complibs/index.xml	Wed Feb 23 20:05:40 2011 -0500
    40.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.3 @@ -1,3 +0,0 @@
    40.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    40.5 -<!-- Directory list containing valid component libraries which is a workaround for Win32 file deletion problems.-->
    40.6 -<valid-directory-list/>
    41.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/ant-deploy.xml	Wed Feb 23 20:05:40 2011 -0500
    41.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.3 @@ -1,97 +0,0 @@
    41.4 -<?xml version="1.0" encoding="UTF-8"?>
    41.5 -<project default="-deploy-ant" basedir=".">
    41.6 -    <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
    41.7 -        <property file="${deploy.ant.properties.file}" />
    41.8 -        <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
    41.9 -        <available file="${deploy.ant.resource.dir}" property="has.setup"/>
   41.10 -        <tempfile prefix="sjsas" property="sjsas.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
   41.11 -        <echo message="AS_ADMIN_PASSWORD=${sjsas.password}" file="${sjsas.password.file}"/>
   41.12 -    </target>
   41.13 -    
   41.14 -    <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
   41.15 -        <tempfile prefix="sjsas" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
   41.16 -        <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
   41.17 -        <!-- The doctype triggers resolution which can fail -->
   41.18 -        <replace file="${temp.sun.web}">
   41.19 -            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
   41.20 -            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
   41.21 -        </replace>
   41.22 -        <replace file="${temp.sun.web}">
   41.23 -            <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
   41.24 -            <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
   41.25 -        </replace>
   41.26 -        <xmlproperty file="${temp.sun.web}" validate="false">
   41.27 -        </xmlproperty>    
   41.28 -        <delete file="${temp.sun.web}"/>
   41.29 -        <property name="deploy.ant.client.url" value="${sjsas.url}${sun-web-app.context-root}"/>
   41.30 -    </target>
   41.31 -    <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
   41.32 -        <tempfile prefix="sjsas" property="sjsas.resources.dir" destdir="${java.io.tmpdir}"/>
   41.33 -        <mkdir dir="${sjsas.resources.dir}"/>
   41.34 -        <mkdir dir="${sjsas.resources.dir}/META-INF"/>
   41.35 -        <property name="sjsas.resources.file" value="${sjsas.resources.dir}/META-INF/sun-resources.xml"/>
   41.36 -        <property name="lefty" value="&lt;"/>
   41.37 -         
   41.38 -        <property name="righty" value="&gt;"/>
   41.39 -        <concat destfile="${sjsas.resources.file}">${lefty}?xml version="1.0" encoding="UTF-8"?${righty}
   41.40 -${lefty}!DOCTYPE resources PUBLIC 
   41.41 -   "-//Sun Microsystems Inc.//DTD Application Server 9.0 Resource Definitions //EN" 
   41.42 -   "${sjsas.root}/lib/dtds/sun-resources_1_2.dtd"${righty}
   41.43 -${lefty}resources${righty}
   41.44 -${lefty}/resources${righty}
   41.45 -        </concat>
   41.46 -        <concat append="true" destfile="${sjsas.resources.file}">
   41.47 -            <fileset dir="${deploy.ant.resource.dir}"/>
   41.48 -        </concat>
   41.49 -        <replace file="${sjsas.resources.file}" value="">
   41.50 -            <replacetoken><![CDATA[</resources>
   41.51 -<?xml version="1.0" encoding="UTF-8"?>
   41.52 -<resources>]]></replacetoken>
   41.53 -        </replace>
   41.54 -        <replace file="${sjsas.resources.file}" value="">
   41.55 -            <replacetoken><![CDATA[</resources>
   41.56 -        <?xml version="1.0" encoding="UTF-8"?>
   41.57 -<resources>]]></replacetoken>
   41.58 -        </replace>
   41.59 -        <replace file="${sjsas.resources.file}" value="">
   41.60 -            <replacetoken><![CDATA[transaction-isolation-level="JDBC Driver Default"]]></replacetoken>
   41.61 -        </replace>
   41.62 -        <!-- work-around 434 and its variants -->
   41.63 -        <replace file="${sjsas.resources.file}" value="">
   41.64 -            <replacetoken><![CDATA[<description/>]]></replacetoken>
   41.65 -        </replace>
   41.66 -        <!-- do the right thing for Topics and Queues.
   41.67 -            Need fix for TopicConnectionFactory and QueueConnectionfactory -->
   41.68 -        <replace file="${sjsas.resources.file}">
   41.69 -            <replacetoken><![CDATA[<jms-resource ]]></replacetoken>
   41.70 -            <replacevalue><![CDATA[<admin-object-resource res-adapter="jmsra" ]]></replacevalue>
   41.71 -        </replace>
   41.72 -        <replace file="${sjsas.resources.file}">
   41.73 -            <replacetoken><![CDATA[</jms-resource>]]></replacetoken>
   41.74 -            <replacevalue><![CDATA[</admin-object-resource>]]></replacevalue>
   41.75 -        </replace>
   41.76 -        <jar destfile="${deploy.ant.archive}" update="true">
   41.77 -            <fileset dir="${sjsas.resources.dir}"/>
   41.78 -        </jar>
   41.79 -        <delete dir="${sjsas.resources.dir}"/>
   41.80 -    </target>
   41.81 -    <target name="-deploy-ant" depends="-parse-sun-web,-add-resources" if="deploy.ant.enabled">
   41.82 -        <echo message="Deploying ${deploy.ant.archive}"/>
   41.83 -        <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"
   41.84 -                 classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
   41.85 -        <sun-appserv-deploy user="${sjsas.username}"
   41.86 -                passwordfile="${sjsas.password.file}"
   41.87 -                host="${sjsas.host}" port="${sjsas.port}"
   41.88 -                file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
   41.89 -        <delete file="${sjsas.password.file}"/>
   41.90 -    </target>
   41.91 -    <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
   41.92 -        <taskdef name="sun-appserv-undeploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask"
   41.93 -                 classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
   41.94 -        <sun-appserv-undeploy user="${sjsas.username}"
   41.95 -                passwordfile="${sjsas.password.file}"
   41.96 -                host="${sjsas.host}" port="${sjsas.port}"
   41.97 -                file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
   41.98 -        <delete file="${sjsas.password.file}"/>
   41.99 -    </target>
  41.100 -</project>
    42.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/build-impl.xml	Wed Feb 23 20:05:40 2011 -0500
    42.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.3 @@ -1,810 +0,0 @@
    42.4 -<?xml version="1.0" encoding="UTF-8"?>
    42.5 -<!--
    42.6 -        *** GENERATED FROM project.xml - DO NOT EDIT  ***
    42.7 -        ***         EDIT ../build.xml INSTEAD         ***
    42.8 -
    42.9 -        For the purpose of easier reading the script
   42.10 -        is divided into following sections:
   42.11 -        - initialization
   42.12 -        - compilation
   42.13 -        - dist
   42.14 -        - execution
   42.15 -        - debugging
   42.16 -        - javadoc
   42.17 -        - junit compilation
   42.18 -        - junit execution
   42.19 -        - junit debugging
   42.20 -        - cleanup
   42.21 -
   42.22 -        -->
   42.23 -<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="build" name="CurrencyTrader-impl">
   42.24 -    <import file="ant-deploy.xml"/>
   42.25 -    <target depends="dist,javadoc" description="Build whole project." name="default"/>
   42.26 -    <!--
   42.27 -                INITIALIZATION SECTION
   42.28 -            -->
   42.29 -    <target name="-pre-init">
   42.30 -        <!-- Empty placeholder for easier customization. -->
   42.31 -        <!-- You can override this target in the ../build.xml file. -->
   42.32 -    </target>
   42.33 -    <target depends="-pre-init" name="-init-private">
   42.34 -        <property file="nbproject/private/private.properties"/>
   42.35 -    </target>
   42.36 -    <target depends="-pre-init,-init-private" name="-init-user">
   42.37 -        <property file="${user.properties.file}"/>
   42.38 -        <!-- The two properties below are usually overridden -->
   42.39 -        <!-- by the active platform. Just a fallback. -->
   42.40 -        <property name="default.javac.source" value="1.4"/>
   42.41 -        <property name="default.javac.target" value="1.4"/>
   42.42 -    </target>
   42.43 -    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
   42.44 -        <property file="nbproject/project.properties"/>
   42.45 -    </target>
   42.46 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init">
   42.47 -        <property name="build.meta.inf.dir" value="${build.ear.web.dir}/META-INF"/>
   42.48 -        <property name="build.classes.dir.real" value="${build.ear.classes.dir}"/>
   42.49 -        <property name="build.web.dir.real" value="${build.ear.web.dir}"/>
   42.50 -    </target>
   42.51 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-do-ear-init" name="-do-init">
   42.52 -        <condition property="have.tests">
   42.53 -            <or>
   42.54 -                <available file="${test.src.dir}"/>
   42.55 -            </or>
   42.56 -        </condition>
   42.57 -        <condition property="have.sources">
   42.58 -            <or>
   42.59 -                <available file="${src.dir}"/>
   42.60 -            </or>
   42.61 -        </condition>
   42.62 -        <condition property="netbeans.home+have.tests">
   42.63 -            <and>
   42.64 -                <isset property="netbeans.home"/>
   42.65 -                <isset property="have.tests"/>
   42.66 -            </and>
   42.67 -        </condition>
   42.68 -        <condition property="no.javadoc.preview">
   42.69 -            <isfalse value="${javadoc.preview}"/>
   42.70 -        </condition>
   42.71 -        <property name="javac.compilerargs" value=""/>
   42.72 -        <condition property="no.deps">
   42.73 -            <and>
   42.74 -                <istrue value="${no.dependencies}"/>
   42.75 -            </and>
   42.76 -        </condition>
   42.77 -        <condition property="no.dist.ear.dir">
   42.78 -            <not>
   42.79 -                <isset property="dist.ear.dir"/>
   42.80 -            </not>
   42.81 -        </condition>
   42.82 -        <property name="build.web.excludes" value="${build.classes.excludes}"/>
   42.83 -        <condition property="do.compile.jsps">
   42.84 -            <istrue value="${compile.jsps}"/>
   42.85 -        </condition>
   42.86 -        <condition property="do.display.browser">
   42.87 -            <istrue value="${display.browser}"/>
   42.88 -        </condition>
   42.89 -        <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
   42.90 -        <available file="${conf.dir}/persistence.xml" property="has.persistence.xml"/>
   42.91 -        <condition property="do.war.package.with.custom.manifest">
   42.92 -            <isset property="has.custom.manifest"/>
   42.93 -        </condition>
   42.94 -        <condition property="do.war.package.without.custom.manifest">
   42.95 -            <not>
   42.96 -                <isset property="has.custom.manifest"/>
   42.97 -            </not>
   42.98 -        </condition>
   42.99 -        <condition property="do.tmp.war.package.with.custom.manifest">
  42.100 -            <and>
  42.101 -                <isset property="has.custom.manifest"/>
  42.102 -                <isfalse value="${directory.deployment.supported}"/>
  42.103 -            </and>
  42.104 -        </condition>
  42.105 -        <condition property="do.tmp.war.package.without.custom.manifest">
  42.106 -            <and>
  42.107 -                <not>
  42.108 -                    <isset property="has.custom.manifest"/>
  42.109 -                </not>
  42.110 -                <isfalse value="${directory.deployment.supported}"/>
  42.111 -            </and>
  42.112 -        </condition>
  42.113 -        <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
  42.114 -        <property name="build.classes.dir.real" value="${build.classes.dir}"/>
  42.115 -        <property name="build.web.dir.real" value="${build.web.dir}"/>
  42.116 -        <condition else="" property="application.args.param" value="${application.args}">
  42.117 -            <and>
  42.118 -                <isset property="application.args"/>
  42.119 -                <not>
  42.120 -                    <equals arg1="${application.args}" arg2="" trim="true"/>
  42.121 -                </not>
  42.122 -            </and>
  42.123 -        </condition>
  42.124 -        <property name="source.encoding" value="${file.encoding}"/>
  42.125 -        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  42.126 -            <and>
  42.127 -                <isset property="javadoc.encoding"/>
  42.128 -                <not>
  42.129 -                    <equals arg1="${javadoc.encoding}" arg2=""/>
  42.130 -                </not>
  42.131 -            </and>
  42.132 -        </condition>
  42.133 -        <property name="javadoc.encoding.used" value="${source.encoding}"/>
  42.134 -    </target>
  42.135 -    <target name="-post-init">
  42.136 -        <!-- Empty placeholder for easier customization. -->
  42.137 -        <!-- You can override this target in the ../build.xml file. -->
  42.138 -    </target>
  42.139 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
  42.140 -        <fail unless="src.dir">Must set src.dir</fail>
  42.141 -        <fail unless="test.src.dir">Must set test.src.dir</fail>
  42.142 -        <fail unless="build.dir">Must set build.dir</fail>
  42.143 -        <fail unless="build.web.dir">Must set build.web.dir</fail>
  42.144 -        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
  42.145 -        <fail unless="dist.dir">Must set dist.dir</fail>
  42.146 -        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  42.147 -        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  42.148 -        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  42.149 -        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  42.150 -        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  42.151 -        <fail unless="dist.war">Must set dist.war</fail>
  42.152 -    </target>
  42.153 -    <target name="-init-macrodef-property">
  42.154 -        <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
  42.155 -            <attribute name="name"/>
  42.156 -            <attribute name="value"/>
  42.157 -            <sequential>
  42.158 -                <property name="@{name}" value="${@{value}}"/>
  42.159 -            </sequential>
  42.160 -        </macrodef>
  42.161 -    </target>
  42.162 -    <target name="-init-macrodef-javac">
  42.163 -        <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
  42.164 -            <attribute default="${src.dir}" name="srcdir"/>
  42.165 -            <attribute default="${build.classes.dir.real}" name="destdir"/>
  42.166 -            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
  42.167 -            <attribute default="${javac.debug}" name="debug"/>
  42.168 -            <attribute default="" name="javac.compilerargs.jaxws"/>
  42.169 -            <element name="customize" optional="true"/>
  42.170 -            <sequential>
  42.171 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" includeantruntime="false" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
  42.172 -                    <classpath>
  42.173 -                        <path path="@{classpath}"/>
  42.174 -                    </classpath>
  42.175 -                    <compilerarg line="${javac.compilerargs} @{javac.compilerargs.jaxws}"/>
  42.176 -                    <customize/>
  42.177 -                </javac>
  42.178 -            </sequential>
  42.179 -        </macrodef>
  42.180 -    </target>
  42.181 -    <target name="-init-macrodef-junit">
  42.182 -        <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
  42.183 -            <attribute default="**/*Test.java" name="includes"/>
  42.184 -            <sequential>
  42.185 -                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
  42.186 -                    <batchtest todir="${build.test.results.dir}">
  42.187 -                        <fileset dir="${test.src.dir}" includes="@{includes}"/>
  42.188 -                    </batchtest>
  42.189 -                    <classpath>
  42.190 -                        <path path="${run.test.classpath}"/>
  42.191 -                    </classpath>
  42.192 -                    <syspropertyset>
  42.193 -                        <propertyref prefix="test-sys-prop."/>
  42.194 -                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
  42.195 -                    </syspropertyset>
  42.196 -                    <formatter type="brief" usefile="false"/>
  42.197 -                    <formatter type="xml"/>
  42.198 -                </junit>
  42.199 -            </sequential>
  42.200 -        </macrodef>
  42.201 -    </target>
  42.202 -    <target name="-init-macrodef-java">
  42.203 -        <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
  42.204 -            <attribute default="${main.class}" name="classname"/>
  42.205 -            <element name="customize" optional="true"/>
  42.206 -            <sequential>
  42.207 -                <java classname="@{classname}" fork="true">
  42.208 -                    <jvmarg line="${runmain.jvmargs}"/>
  42.209 -                    <classpath>
  42.210 -                        <path path="${build.classes.dir.real}:${javac.classpath}:${j2ee.platform.classpath}"/>
  42.211 -                    </classpath>
  42.212 -                    <syspropertyset>
  42.213 -                        <propertyref prefix="run-sys-prop."/>
  42.214 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
  42.215 -                    </syspropertyset>
  42.216 -                    <customize/>
  42.217 -                </java>
  42.218 -            </sequential>
  42.219 -        </macrodef>
  42.220 -    </target>
  42.221 -    <target name="-init-macrodef-nbjpda">
  42.222 -        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
  42.223 -            <attribute default="${main.class}" name="name"/>
  42.224 -            <attribute default="${debug.classpath}" name="classpath"/>
  42.225 -            <sequential>
  42.226 -                <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="dt_socket">
  42.227 -                    <classpath>
  42.228 -                        <path path="@{classpath}"/>
  42.229 -                    </classpath>
  42.230 -                </nbjpdastart>
  42.231 -            </sequential>
  42.232 -        </macrodef>
  42.233 -        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
  42.234 -            <attribute default="${build.classes.dir.real}" name="dir"/>
  42.235 -            <sequential>
  42.236 -                <nbjpdareload>
  42.237 -                    <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
  42.238 -                </nbjpdareload>
  42.239 -            </sequential>
  42.240 -        </macrodef>
  42.241 -    </target>
  42.242 -    <target name="-init-debug-args">
  42.243 -        <property name="version-output" value="java version &quot;${ant.java.version}"/>
  42.244 -        <condition property="have-jdk-older-than-1.4">
  42.245 -            <or>
  42.246 -                <contains string="${version-output}" substring="java version &quot;1.0"/>
  42.247 -                <contains string="${version-output}" substring="java version &quot;1.1"/>
  42.248 -                <contains string="${version-output}" substring="java version &quot;1.2"/>
  42.249 -                <contains string="${version-output}" substring="java version &quot;1.3"/>
  42.250 -            </or>
  42.251 -        </condition>
  42.252 -        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  42.253 -            <istrue value="${have-jdk-older-than-1.4}"/>
  42.254 -        </condition>
  42.255 -    </target>
  42.256 -    <target depends="-init-debug-args" name="-init-macrodef-debug">
  42.257 -        <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
  42.258 -            <attribute default="${main.class}" name="classname"/>
  42.259 -            <attribute default="${debug.classpath}" name="classpath"/>
  42.260 -            <attribute default="${application.args.param}" name="args"/>
  42.261 -            <element name="customize" optional="true"/>
  42.262 -            <sequential>
  42.263 -                <java classname="@{classname}" fork="true">
  42.264 -                    <jvmarg line="${debug-args-line}"/>
  42.265 -                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
  42.266 -                    <jvmarg line="${runmain.jvmargs}"/>
  42.267 -                    <classpath>
  42.268 -                        <path path="@{classpath}"/>
  42.269 -                    </classpath>
  42.270 -                    <syspropertyset>
  42.271 -                        <propertyref prefix="run-sys-prop."/>
  42.272 -                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
  42.273 -                    </syspropertyset>
  42.274 -                    <arg line="@{args}"/>
  42.275 -                    <customize/>
  42.276 -                </java>
  42.277 -            </sequential>
  42.278 -        </macrodef>
  42.279 -    </target>
  42.280 -    <target name="-init-macrodef-copy-ear-war">
  42.281 -        <macrodef name="copy-ear-war">
  42.282 -            <attribute name="file"/>
  42.283 -            <attribute name="propname"/>
  42.284 -            <sequential>
  42.285 -                <basename file="@{file}" property="base_@{propname}"/>
  42.286 -                <zipfileset id="tld.files_@{propname}" includes="META-INF/*.tld META-INF/tlds/*.tld" src="@{file}"/>
  42.287 -                <pathconvert property="tld.files.path_@{propname}" refid="tld.files_@{propname}"/>
  42.288 -                <condition property="hastlds_@{propname}" value="yes">
  42.289 -                    <contains casesensitive="false" string="${tld.files.path_@{propname}}" substring=".tld"/>
  42.290 -                </condition>
  42.291 -                <condition property="copy.to.dir_@{propname}" value="${build.web.dir.real}/WEB-INF/lib">
  42.292 -                    <isset property="hastlds_@{propname}"/>
  42.293 -                </condition>
  42.294 -                <condition property="copy.to.dir_@{propname}" value="${dist.ear.dir}">
  42.295 -                    <not>
  42.296 -                        <isset property="hastlds_@{propname}"/>
  42.297 -                    </not>
  42.298 -                </condition>
  42.299 -                <copy file="@{file}" todir="${copy.to.dir_@{propname}}"/>
  42.300 -                <condition property="@{propname}" value="${base_@{propname}}">
  42.301 -                    <not>
  42.302 -                        <isset property="hastlds_@{propname}"/>
  42.303 -                    </not>
  42.304 -                </condition>
  42.305 -                <condition property="@{propname}" value="">
  42.306 -                    <isset property="hastlds_@{propname}"/>
  42.307 -                </condition>
  42.308 -            </sequential>
  42.309 -        </macrodef>
  42.310 -    </target>
  42.311 -    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-copy-ear-war" name="init"/>
  42.312 -    <!--
  42.313 -                COMPILATION SECTION
  42.314 -            -->
  42.315 -    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
  42.316 -    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
  42.317 -    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
  42.318 -    <target depends="init,deps-jar" name="-pre-pre-compile">
  42.319 -        <mkdir dir="${build.classes.dir.real}"/>
  42.320 -    </target>
  42.321 -    <target name="-pre-compile">
  42.322 -        <!-- Empty placeholder for easier customization. -->
  42.323 -        <!-- You can override this target in the ../build.xml file. -->
  42.324 -    </target>
  42.325 -    <target name="-copy-webdir">
  42.326 -        <copy todir="${build.web.dir.real}">
  42.327 -            <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes}"/>
  42.328 -        </copy>
  42.329 -        <copy todir="${build.web.dir.real}/WEB-INF">
  42.330 -            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
  42.331 -        </copy>
  42.332 -    </target>
  42.333 -    <target if="rest.support.on" name="-init-rest">
  42.334 -        <condition property="platform.restlib.classpath" value="${j2ee.platform.classpath}">
  42.335 -            <and>
  42.336 -                <isset property="restlib.ignore.platform"/>
  42.337 -                <isfalse value="${restlib.ignore.platform}"/>
  42.338 -            </and>
  42.339 -        </condition>
  42.340 -        <taskdef classname="com.sun.ws.rest.tools.ant.WebResourcesProcessorTask" name="restapt">
  42.341 -            <classpath>
  42.342 -                <path path="${platform.restlib.classpath}"/>
  42.343 -                <path path="${libs.restlib.classpath}"/>
  42.344 -            </classpath>
  42.345 -        </taskdef>
  42.346 -    </target>
  42.347 -    <target depends="-init-rest" if="rest.support.on" name="-rest-post-compile">
  42.348 -        <mkdir dir="${build.generated.dir}/rest-gen"/>
  42.349 -        <restapt destdir="${build.generated.dir}/rest-gen" fork="true" nocompile="true" sourcePath="${src.dir}" sourcedestdir="${build.generated.dir}/rest-gen" xEndorsed="true">
  42.350 -            <classpath>
  42.351 -                <path path="${javac.classpath}"/>
  42.352 -                <path path="${libs.jaxws21.classpath}"/>
  42.353 -                <path path="${j2ee.platform.classpath}"/>
  42.354 -                <pathelement location="${build.web.dir}/WEB-INF/classes"/>
  42.355 -            </classpath>
  42.356 -            <source dir="${src.dir}">
  42.357 -                <include name="**/*.java"/>
  42.358 -            </source>
  42.359 -        </restapt>
  42.360 -        <webproject2:javac destdir="${build.classes.dir.real}" srcdir="${build.generated.dir}/rest-gen"/>
  42.361 -        <copy todir="${build.classes.dir.real}">
  42.362 -            <fileset dir="${build.generated.dir}/rest-gen" includes="**/*.wadl"/>
  42.363 -        </copy>
  42.364 -    </target>
  42.365 -    <target name="-do-ws-compile"/>
  42.366 -    <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest,-do-ws-compile" if="have.sources" name="-do-compile">
  42.367 -        <webproject2:javac destdir="${build.classes.dir.real}"/>
  42.368 -        <copy todir="${build.classes.dir.real}">
  42.369 -            <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
  42.370 -        </copy>
  42.371 -    </target>
  42.372 -    <target if="has.custom.manifest" name="-copy-manifest">
  42.373 -        <mkdir dir="${build.meta.inf.dir}"/>
  42.374 -        <copy todir="${build.meta.inf.dir}">
  42.375 -            <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
  42.376 -        </copy>
  42.377 -    </target>
  42.378 -    <target if="has.persistence.xml" name="-copy-persistence-xml">
  42.379 -        <mkdir dir="${build.web.dir.real}/WEB-INF/classes/META-INF"/>
  42.380 -        <copy todir="${build.web.dir.real}/WEB-INF/classes/META-INF">
  42.381 -            <fileset dir="${conf.dir}" includes="persistence.xml"/>
  42.382 -        </copy>
  42.383 -    </target>
  42.384 -    <target name="-post-compile">
  42.385 -        <!-- Empty placeholder for easier customization. -->
  42.386 -        <!-- You can override this target in the ../build.xml file. -->
  42.387 -    </target>
  42.388 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-rest-post-compile,-post-compile" description="Compile project." name="compile"/>
  42.389 -    <target name="-pre-compile-single">
  42.390 -        <!-- Empty placeholder for easier customization. -->
  42.391 -        <!-- You can override this target in the ../build.xml file. -->
  42.392 -    </target>
  42.393 -    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  42.394 -        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  42.395 -        <webproject2:javac>
  42.396 -            <customize>
  42.397 -                <patternset includes="${javac.includes}"/>
  42.398 -            </customize>
  42.399 -        </webproject2:javac>
  42.400 -        <copy todir="${build.classes.dir.real}">
  42.401 -            <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
  42.402 -        </copy>
  42.403 -    </target>
  42.404 -    <target name="-post-compile-single">
  42.405 -        <!-- Empty placeholder for easier customization. -->
  42.406 -        <!-- You can override this target in the ../build.xml file. -->
  42.407 -    </target>
  42.408 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  42.409 -    <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
  42.410 -        <mkdir dir="${build.generated.dir}/src"/>
  42.411 -        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
  42.412 -            <arg value="-uriroot"/>
  42.413 -            <arg file="${basedir}/${build.web.dir.real}"/>
  42.414 -            <arg value="-d"/>
  42.415 -            <arg file="${basedir}/${build.generated.dir}/src"/>
  42.416 -            <arg value="-die1"/>
  42.417 -            <classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/>
  42.418 -        </java>
  42.419 -        <mkdir dir="${build.generated.dir}/classes"/>
  42.420 -        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir.real}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
  42.421 -    </target>
  42.422 -    <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
  42.423 -        <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
  42.424 -        <mkdir dir="${build.generated.dir}/src"/>
  42.425 -        <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
  42.426 -            <arg value="-uriroot"/>
  42.427 -            <arg file="${basedir}/${build.web.dir.real}"/>
  42.428 -            <arg value="-d"/>
  42.429 -            <arg file="${basedir}/${build.generated.dir}/src"/>
  42.430 -            <arg value="-die1"/>
  42.431 -            <arg value="-jspc.files"/>
  42.432 -            <arg path="${jsp.includes}"/>
  42.433 -            <classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/>
  42.434 -        </java>
  42.435 -        <mkdir dir="${build.generated.dir}/classes"/>
  42.436 -        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir.real}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
  42.437 -            <customize>
  42.438 -                <patternset includes="${javac.jsp.includes}"/>
  42.439 -            </customize>
  42.440 -        </webproject2:javac>
  42.441 -    </target>
  42.442 -    <target name="compile-single-jsp">
  42.443 -        <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
  42.444 -        <antcall target="-do-compile-single-jsp"/>
  42.445 -    </target>
  42.446 -    <!--
  42.447 -                DIST BUILDING SECTION
  42.448 -            -->
  42.449 -    <target name="-pre-dist">
  42.450 -        <!-- Empty placeholder for easier customization. -->
  42.451 -        <!-- You can override this target in the ../build.xml file. -->
  42.452 -    </target>
  42.453 -    <target depends="init,compile,compile-jsps,-pre-dist" name="-dist-without-custom-manifest" unless="has.custom.manifest">
  42.454 -        <dirname file="${dist.war}" property="dist.jar.dir"/>
  42.455 -        <mkdir dir="${dist.jar.dir}"/>
  42.456 -        <jar compress="${jar.compress}" jarfile="${dist.war}">
  42.457 -            <fileset dir="${build.web.dir.real}"/>
  42.458 -        </jar>
  42.459 -    </target>
  42.460 -    <target depends="init,compile,compile-jsps,-pre-dist" if="has.custom.manifest" name="-dist-with-custom-manifest">
  42.461 -        <dirname file="${dist.war}" property="dist.jar.dir"/>
  42.462 -        <mkdir dir="${dist.jar.dir}"/>
  42.463 -        <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
  42.464 -            <fileset dir="${build.web.dir.real}"/>
  42.465 -        </jar>
  42.466 -    </target>
  42.467 -    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
  42.468 -        <antcall target="-dist-without-custom-manifest"/>
  42.469 -    </target>
  42.470 -    <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
  42.471 -        <antcall target="-dist-with-custom-manifest"/>
  42.472 -    </target>
  42.473 -    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
  42.474 -        <antcall target="-dist-with-custom-manifest"/>
  42.475 -    </target>
  42.476 -    <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
  42.477 -        <antcall target="-dist-without-custom-manifest"/>
  42.478 -    </target>
  42.479 -    <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
  42.480 -    <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
  42.481 -        <basename file="${libs.theme-default.classpath}" property="included.lib.libs.theme-default.classpath"/>
  42.482 -        <copy-ear-war file="${libs.theme-default.classpath}" propname="included.lib.libs.theme-default.classpath.X"/>
  42.483 -        <basename file="${libs.rowset-ri.classpath}" property="included.lib.libs.rowset-ri.classpath"/>
  42.484 -        <copy-ear-war file="${libs.rowset-ri.classpath}" propname="included.lib.libs.rowset-ri.classpath.X"/>
  42.485 -        <copy file="${libs.jsfsupport-runtime.classpath.libfile.4}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.486 -        <copy file="${libs.jsfsupport-runtime.classpath.libfile.3}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.487 -        <copy file="${libs.jsfsupport-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.488 -        <copy file="${libs.jsfsupport-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.489 -        <copy file="${libs.webui-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.490 -        <copy file="${libs.webui-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.491 -        <copy file="${libs.jdbcsupport-runtime.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.492 -        <copy file="${libs.exceptionhandler-runtime.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.493 -        <mkdir dir="${build.web.dir.real}/META-INF"/>
  42.494 -        <manifest file="${build.web.dir.real}/META-INF/MANIFEST.MF" mode="update">
  42.495 -            <attribute name="Class-Path" value="${included.lib.libs.theme-default.classpath} ${included.lib.libs.rowset-ri.classpath} "/>
  42.496 -        </manifest>
  42.497 -        <delete dir="${dist.ear.dir}/temp"/>
  42.498 -    </target>
  42.499 -    <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
  42.500 -        <copy file="${libs.theme-default.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.501 -        <copy file="${libs.rowset-ri.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.502 -        <copy file="${libs.jsfsupport-runtime.classpath.libfile.4}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.503 -        <copy file="${libs.jsfsupport-runtime.classpath.libfile.3}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.504 -        <copy file="${libs.jsfsupport-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.505 -        <copy file="${libs.jsfsupport-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.506 -        <copy file="${libs.webui-runtime.classpath.libfile.2}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.507 -        <copy file="${libs.webui-runtime.classpath.libfile.1}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.508 -        <copy file="${libs.jdbcsupport-runtime.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.509 -        <copy file="${libs.exceptionhandler-runtime.classpath}" todir="${build.web.dir.real}/WEB-INF/lib"/>
  42.510 -    </target>
  42.511 -    <target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" name="do-ear-dist">
  42.512 -        <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
  42.513 -        <mkdir dir="${dist.jar.dir}"/>
  42.514 -        <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir.real}/META-INF/MANIFEST.MF">
  42.515 -            <fileset dir="${build.web.dir.real}"/>
  42.516 -        </jar>
  42.517 -    </target>
  42.518 -    <target name="-post-dist">
  42.519 -        <!-- Empty placeholder for easier customization. -->
  42.520 -        <!-- You can override this target in the ../build.xml file. -->
  42.521 -    </target>
  42.522 -    <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
  42.523 -    <target depends="init,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
  42.524 -    <!--
  42.525 -                EXECUTION SECTION
  42.526 -            -->
  42.527 -    <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
  42.528 -    <target name="-pre-run-deploy">
  42.529 -        <!-- Empty placeholder for easier customization. -->
  42.530 -        <!-- You can override this target in the ../build.xml file. -->
  42.531 -    </target>
  42.532 -    <target name="-post-run-deploy">
  42.533 -        <!-- Empty placeholder for easier customization. -->
  42.534 -        <!-- You can override this target in the ../build.xml file. -->
  42.535 -    </target>
  42.536 -    <target name="-pre-nbmodule-run-deploy">
  42.537 -        <!-- Empty placeholder for easier customization. -->
  42.538 -        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
  42.539 -    </target>
  42.540 -    <target name="-post-nbmodule-run-deploy">
  42.541 -        <!-- Empty placeholder for easier customization. -->
  42.542 -        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
  42.543 -    </target>
  42.544 -    <target name="-run-deploy-am">
  42.545 -        <!-- Task to deploy to the Access Manager runtime. -->
  42.546 -    </target>
  42.547 -    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy" name="run-deploy"/>
  42.548 -    <target if="netbeans.home" name="-run-deploy-nb">
  42.549 -        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
  42.550 -    </target>
  42.551 -    <target name="-init-deploy-ant" unless="netbeans.home">
  42.552 -        <property name="deploy.ant.archive" value="${dist.war}"/>
  42.553 -        <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
  42.554 -        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
  42.555 -        <property name="deploy.ant.enabled" value="true"/>
  42.556 -    </target>
  42.557 -    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
  42.558 -    <target if="netbeans.home" name="-run-undeploy-nb">
  42.559 -        <fail message="Undeploy is not supported from within the IDE"/>
  42.560 -    </target>
  42.561 -    <target depends="init,-pre-dist,dist,-post-dist" name="verify">
  42.562 -        <nbverify file="${dist.war}"/>
  42.563 -    </target>
  42.564 -    <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
  42.565 -    <target if="do.display.browser" name="-init-display-browser">
  42.566 -        <condition property="do.display.browser.nb">
  42.567 -            <isset property="netbeans.home"/>
  42.568 -        </condition>
  42.569 -        <condition property="do.display.browser.cl">
  42.570 -            <isset property="deploy.ant.enabled"/>
  42.571 -        </condition>
  42.572 -    </target>
  42.573 -    <target if="do.display.browser.nb" name="-display-browser-nb">
  42.574 -        <nbbrowse url="${client.url}"/>
  42.575 -    </target>
  42.576 -    <target if="do.display.browser.cl" name="-get-browser" unless="browser">
  42.577 -        <condition property="browser" value="rundll32">
  42.578 -            <os family="windows"/>
  42.579 -        </condition>
  42.580 -        <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
  42.581 -            <os family="windows"/>
  42.582 -        </condition>
  42.583 -        <condition property="browser" value="/usr/bin/open">
  42.584 -            <os family="mac"/>
  42.585 -        </condition>
  42.586 -        <property environment="env"/>
  42.587 -        <condition property="browser" value="${env.BROWSER}">
  42.588 -            <isset property="env.BROWSER"/>
  42.589 -        </condition>
  42.590 -        <condition property="browser" value="/usr/bin/firefox">
  42.591 -            <available file="/usr/bin/firefox"/>
  42.592 -        </condition>
  42.593 -        <condition property="browser" value="/usr/local/firefox/firefox">
  42.594 -            <available file="/usr/local/firefox/firefox"/>
  42.595 -        </condition>
  42.596 -        <condition property="browser" value="/usr/bin/mozilla">
  42.597 -            <available file="/usr/bin/mozilla"/>
  42.598 -        </condition>
  42.599 -        <condition property="browser" value="/usr/local/mozilla/mozilla">
  42.600 -            <available file="/usr/local/mozilla/mozilla"/>
  42.601 -        </condition>
  42.602 -        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
  42.603 -            <available file="/usr/sfw/lib/firefox/firefox"/>
  42.604 -        </condition>
  42.605 -        <condition property="browser" value="/opt/csw/bin/firefox">
  42.606 -            <available file="/opt/csw/bin/firefox"/>
  42.607 -        </condition>
  42.608 -        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
  42.609 -            <available file="/usr/sfw/lib/mozilla/mozilla"/>
  42.610 -        </condition>
  42.611 -        <condition property="browser" value="/opt/csw/bin/mozilla">
  42.612 -            <available file="/opt/csw/bin/mozilla"/>
  42.613 -        </condition>
  42.614 -    </target>
  42.615 -    <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
  42.616 -        <fail unless="browser">
  42.617 -                    Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
  42.618 -                </fail>
  42.619 -        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
  42.620 -        <echo>Launching ${browse.url}</echo>
  42.621 -        <exec executable="${browser}" spawn="true">
  42.622 -            <arg line="${browser.args} ${browse.url}"/>
  42.623 -        </exec>
  42.624 -    </target>
  42.625 -    <target depends="init,compile-single" name="run-main">
  42.626 -        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  42.627 -        <webproject1:java classname="${run.class}"/>
  42.628 -    </target>
  42.629 -    <target depends="run-deploy,-init-display-browser" name="test-restbeans">
  42.630 -        <replace file="${restbeans.test.file}" token="${base.url.token}" value="${client.url}"/>
  42.631 -        <nbbrowse url="${restbeans.test.url}"/>
  42.632 -    </target>
  42.633 -    <!--
  42.634 -                DEBUGGING SECTION
  42.635 -            -->
  42.636 -    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
  42.637 -        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true"/>
  42.638 -        <antcall target="connect-debugger"/>
  42.639 -        <antcall target="debug-display-browser"/>
  42.640 -    </target>
  42.641 -    <target name="connect-debugger" unless="is.debugged">
  42.642 -        <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
  42.643 -            <classpath>
  42.644 -                <path path="${debug.classpath}:${ws.debug.classpaths}"/>
  42.645 -            </classpath>
  42.646 -            <sourcepath>
  42.647 -                <path path="${web.docbase.dir}:${ws.web.docbase.dirs}"/>
  42.648 -            </sourcepath>
  42.649 -        </nbjpdaconnect>
  42.650 -    </target>
  42.651 -    <target if="do.display.browser" name="debug-display-browser">
  42.652 -        <nbbrowse url="${client.url}"/>
  42.653 -    </target>
  42.654 -    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
  42.655 -    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  42.656 -        <webproject1:nbjpdastart name="${debug.class}"/>
  42.657 -    </target>
  42.658 -    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  42.659 -        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  42.660 -        <webproject1:debug classname="${debug.class}"/>
  42.661 -    </target>
  42.662 -    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
  42.663 -    <target depends="init" name="-pre-debug-fix">
  42.664 -        <fail unless="fix.includes">Must set fix.includes</fail>
  42.665 -        <property name="javac.includes" value="${fix.includes}.java"/>
  42.666 -    </target>
  42.667 -    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  42.668 -        <webproject1:nbjpdareload/>
  42.669 -    </target>
  42.670 -    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  42.671 -    <!--
  42.672 -                JAVADOC SECTION
  42.673 -            -->
  42.674 -    <target depends="init" name="javadoc-build">
  42.675 -        <mkdir dir="${dist.javadoc.dir}"/>
  42.676 -        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" destdir="${dist.javadoc.dir}" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
  42.677 -            <classpath>
  42.678 -                <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
  42.679 -            </classpath>
  42.680 -            <sourcepath>
  42.681 -                <pathelement location="${src.dir}"/>
  42.682 -            </sourcepath>
  42.683 -            <packageset dir="${src.dir}" includes="*/**"/>
  42.684 -            <fileset dir="${src.dir}" includes="*.java"/>
  42.685 -        </javadoc>
  42.686 -    </target>
  42.687 -    <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
  42.688 -        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  42.689 -    </target>
  42.690 -    <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
  42.691 -    <!--
  42.692 -                
  42.693 -                JUNIT COMPILATION SECTION
  42.694 -            -->
  42.695 -    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  42.696 -        <mkdir dir="${build.test.classes.dir}"/>
  42.697 -    </target>
  42.698 -    <target name="-pre-compile-test">
  42.699 -        <!-- Empty placeholder for easier customization. -->
  42.700 -        <!-- You can override this target in the ../build.xml file. -->
  42.701 -    </target>
  42.702 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
  42.703 -        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  42.704 -        <copy todir="${build.test.classes.dir}">
  42.705 -            <fileset dir="${test.src.dir}" excludes="**/*.java"/>
  42.706 -        </copy>
  42.707 -    </target>
  42.708 -    <target name="-post-compile-test">
  42.709 -        <!-- Empty placeholder for easier customization. -->
  42.710 -        <!-- You can override this target in the ../build.xml file. -->
  42.711 -    </target>
  42.712 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  42.713 -    <target name="-pre-compile-test-single">
  42.714 -        <!-- Empty placeholder for easier customization. -->
  42.715 -        <!-- You can override this target in the ../build.xml file. -->
  42.716 -    </target>
  42.717 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  42.718 -        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  42.719 -        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}">
  42.720 -            <customize>
  42.721 -                <patternset includes="${javac.includes}"/>
  42.722 -            </customize>
  42.723 -        </webproject2:javac>
  42.724 -        <copy todir="${build.test.classes.dir}">
  42.725 -            <fileset dir="${test.src.dir}" excludes="**/*.java"/>
  42.726 -        </copy>
  42.727 -    </target>
  42.728 -    <target name="-post-compile-test-single">
  42.729 -        <!-- Empty placeholder for easier customization. -->
  42.730 -        <!-- You can override this target in the ../build.xml file. -->
  42.731 -    </target>
  42.732 -    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  42.733 -    <!--
  42.734 -                
  42.735 -                JUNIT EXECUTION SECTION
  42.736 -            -->
  42.737 -    <target depends="init" if="have.tests" name="-pre-test-run">
  42.738 -        <mkdir dir="${build.test.results.dir}"/>
  42.739 -    </target>
  42.740 -    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  42.741 -        <webproject2:junit/>
  42.742 -    </target>
  42.743 -    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  42.744 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
  42.745 -    </target>
  42.746 -    <target depends="init" if="have.tests" name="test-report"/>
  42.747 -    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  42.748 -    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  42.749 -    <target depends="init" if="have.tests" name="-pre-test-run-single">
  42.750 -        <mkdir dir="${build.test.results.dir}"/>
  42.751 -    </target>
  42.752 -    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  42.753 -        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  42.754 -        <webproject2:junit includes="${test.includes}"/>
  42.755 -    </target>
  42.756 -    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  42.757 -        <fail if="tests.failed">Some tests failed; see details above.</fail>
  42.758 -    </target>
  42.759 -    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  42.760 -    <!--
  42.761 -                
  42.762 -                JUNIT DEBUGGING SECTION
  42.763 -            -->
  42.764 -    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  42.765 -        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  42.766 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  42.767 -        <delete file="${test.report.file}"/>
  42.768 -        <!-- must exist, otherwise the XML formatter would fail -->
  42.769 -        <mkdir dir="${build.test.results.dir}"/>
  42.770 -        <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
  42.771 -            <customize>
  42.772 -                <arg value="showoutput=true"/>
  42.773 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  42.774 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  42.775 -            </customize>
  42.776 -        </webproject1:debug>
  42.777 -    </target>
  42.778 -    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  42.779 -        <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  42.780 -    </target>
  42.781 -    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  42.782 -    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  42.783 -        <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  42.784 -    </target>
  42.785 -    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  42.786 -    <!--
  42.787 -                
  42.788 -                CLEANUP SECTION
  42.789 -            -->
  42.790 -    <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
  42.791 -    <target depends="init" name="do-clean">
  42.792 -        <condition property="build.dir.to.clean" value="${build.web.dir.real}">
  42.793 -            <isset property="dist.ear.dir"/>
  42.794 -        </condition>
  42.795 -        <property name="build.dir.to.clean" value="${build.web.dir.real}"/>
  42.796 -        <delete includeEmptyDirs="true" quiet="true">
  42.797 -            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
  42.798 -        </delete>
  42.799 -        <delete dir="${build.dir}"/>
  42.800 -        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
  42.801 -        <delete dir="${dist.dir}"/>
  42.802 -    </target>
  42.803 -    <target depends="do-clean" if="status.clean-failed" name="check-clean">
  42.804 -        <echo message="Warning: unable to delete some files in ${build.web.dir.real}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
  42.805 -        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
  42.806 -    </target>
  42.807 -    <target name="-post-clean">
  42.808 -        <!-- Empty placeholder for easier customization. -->
  42.809 -        <!-- You can override this target in the ../build.xml file. -->
  42.810 -    </target>
  42.811 -    <target depends="init,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
  42.812 -    <target depends="clean" description="Clean build products." name="clean-ear"/>
  42.813 -</project>
    43.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/genfiles.properties	Wed Feb 23 20:05:40 2011 -0500
    43.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.3 @@ -1,8 +0,0 @@
    43.4 -build.xml.data.CRC32=1a0c4559
    43.5 -build.xml.script.CRC32=dd2a4d1b
    43.6 -build.xml.stylesheet.CRC32=e92cbef9
    43.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    43.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    43.9 -nbproject/build-impl.xml.data.CRC32=1a0c4559
   43.10 -nbproject/build-impl.xml.script.CRC32=4e235d18
   43.11 -nbproject/build-impl.xml.stylesheet.CRC32=566db6ea
    44.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/project.properties	Wed Feb 23 20:05:40 2011 -0500
    44.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.3 @@ -1,116 +0,0 @@
    44.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    44.5 -#
    44.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    44.7 -#
    44.8 -# The contents of this file are subject to the terms of either the GNU
    44.9 -# General Public License Version 2 only ("GPL") or the Common
   44.10 -# Development and Distribution License("CDDL") (collectively, the
   44.11 -# "License"). You may not use this file except in compliance with the
   44.12 -# License. You can obtain a copy of the License at
   44.13 -# http://www.netbeans.org/cddl-gplv2.html
   44.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   44.15 -# specific language governing permissions and limitations under the
   44.16 -# License.  When distributing the software, include this License Header
   44.17 -# Notice in each file and include the License file at
   44.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   44.19 -# particular file as subject to the "Classpath" exception as provided
   44.20 -# by Sun in the GPL Version 2 section of the License file that
   44.21 -# accompanied this code. If applicable, add the following below the
   44.22 -# License Header, with the fields enclosed by brackets [] replaced by
   44.23 -# your own identifying information:
   44.24 -# "Portions Copyrighted [year] [name of copyright owner]"
   44.25 -#
   44.26 -# Contributor(s):
   44.27 -#
   44.28 -# The Original Software is NetBeans. The Initial Developer of the Original
   44.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   44.30 -# Microsystems, Inc. All Rights Reserved.
   44.31 -#
   44.32 -# If you wish your version of this file to be governed by only the CDDL
   44.33 -# or only the GPL Version 2, indicate your decision by adding
   44.34 -# "[Contributor] elects to include this software in this distribution
   44.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   44.36 -# single choice of license, a recipient has the option to distribute
   44.37 -# your version of this file under either the CDDL, the GPL Version 2 or
   44.38 -# to extend the choice of license to its licensees as provided above.
   44.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   44.40 -# Version 2 license, then the option applies only if the new code is
   44.41 -# made subject to such option by the copyright holder.
   44.42 -
   44.43 -build.classes.dir=${build.web.dir}/WEB-INF/classes
   44.44 -build.classes.excludes=**/*.java,**/*.form
   44.45 -build.dir=build
   44.46 -build.ear.classes.dir=${build.ear.web.dir}/WEB-INF/classes
   44.47 -build.ear.web.dir=${build.dir}/web
   44.48 -build.generated.dir=${build.dir}/generated
   44.49 -build.test.classes.dir=${build.dir}/test/classes
   44.50 -build.test.results.dir=${build.dir}/test/results
   44.51 -build.web.dir=${build.dir}/web
   44.52 -build.web.excludes=${build.classes.excludes}
   44.53 -client.urlPart=
   44.54 -compile.jsps=false
   44.55 -conf.dir=${source.root}/conf
   44.56 -debug.classpath=${javac.classpath}:${build.classes.dir}:${build.ear.classes.dir}
   44.57 -debug.test.classpath=\
   44.58 -    ${run.test.classpath}
   44.59 -display.browser=true
   44.60 -dist.dir=dist
   44.61 -dist.ear.war=${dist.dir}/${war.ear.name}
   44.62 -dist.javadoc.dir=${dist.dir}/javadoc
   44.63 -dist.war=${dist.dir}/${war.name}
   44.64 -file.reference.currencytrader.jar=../../../../../../../../../../../../temporary/jartemp/currencytrader.jar
   44.65 -file.reference.currencytrader.jar-1=../../../../jars/jartemp/currencytrader.jar
   44.66 -j2ee.platform=1.4
   44.67 -j2ee.server.type=J2EE
   44.68 -jar.compress=false
   44.69 -javac.classpath=\
   44.70 -    ${libs.theme-default.classpath}:\
   44.71 -    ${libs.jsfsupport-designtime.classpath}:\
   44.72 -    ${libs.webui-designtime.classpath}:\
   44.73 -    ${libs.jdbcsupport-designtime.classpath}:\
   44.74 -    ${libs.rowset-ri.classpath}
   44.75 -# Space-separated list of extra javac options
   44.76 -javac.compilerargs=
   44.77 -javac.debug=true
   44.78 -javac.deprecation=false
   44.79 -javac.source=1.4
   44.80 -javac.target=1.4
   44.81 -javac.test.classpath=\
   44.82 -    ${javac.classpath}:\
   44.83 -    ${build.classes.dir}:\
   44.84 -    ${libs.junit.classpath}
   44.85 -javadoc.additionalparam=
   44.86 -javadoc.author=false
   44.87 -javadoc.encoding=
   44.88 -javadoc.noindex=false
   44.89 -javadoc.nonavbar=false
   44.90 -javadoc.notree=false
   44.91 -javadoc.preview=true
   44.92 -javadoc.private=false
   44.93 -javadoc.splitindex=true
   44.94 -javadoc.use=true
   44.95 -javadoc.version=false
   44.96 -javadoc.windowtitle=
   44.97 -jspcompilation.classpath=${jspc.classpath}:${javac.classpath}
   44.98 -lib.dir=${web.docbase.dir}/WEB-INF/lib
   44.99 -platform.active=default_platform
  44.100 -resource.dir=setup
  44.101 -run.test.classpath=\
  44.102 -    ${javac.test.classpath}:\
  44.103 -    ${build.test.classes.dir}
  44.104 -# Space-separated list of JVM arguments used when running class with main method
  44.105 -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
  44.106 -runmain.jvmargs=
  44.107 -source.root=src
  44.108 -src.dir=${source.root}/java
  44.109 -test.src.dir=test
  44.110 -war.content.additional=\
  44.111 -    ${libs.jsfsupport-runtime.classpath}:\
  44.112 -    ${libs.webui-runtime.classpath}:\
  44.113 -    ${libs.jdbcsupport-runtime.classpath}:\
  44.114 -    ${libs.exceptionhandler-runtime.classpath}
  44.115 -war.ear.name=CurrencyTrader.war
  44.116 -war.name=CurrencyTrader.war
  44.117 -war.package=true
  44.118 -web.docbase.dir=web
  44.119 -webinf.dir=${web.docbase.dir}/WEB-INF
    45.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/nbproject/project.xml	Wed Feb 23 20:05:40 2011 -0500
    45.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.3 @@ -1,97 +0,0 @@
    45.4 -<?xml version="1.0" encoding="UTF-8"?>
    45.5 -<!--
    45.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    45.7 -
    45.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    45.9 -
   45.10 -
   45.11 -The contents of this file are subject to the terms of either the GNU
   45.12 -General Public License Version 2 only ("GPL") or the Common
   45.13 -Development and Distribution License("CDDL") (collectively, the
   45.14 -"License"). You may not use this file except in compliance with the
   45.15 -License. You can obtain a copy of the License at
   45.16 -http://www.netbeans.org/cddl-gplv2.html
   45.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   45.18 -specific language governing permissions and limitations under the
   45.19 -License.  When distributing the software, include this License Header
   45.20 -Notice in each file and include the License file at
   45.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   45.22 -particular file as subject to the "Classpath" exception as provided
   45.23 -by Sun in the GPL Version 2 section of the License file that
   45.24 -accompanied this code. If applicable, add the following below the
   45.25 -License Header, with the fields enclosed by brackets [] replaced by
   45.26 -your own identifying information:
   45.27 -"Portions Copyrighted [year] [name of copyright owner]"
   45.28 -
   45.29 -Contributor(s):
   45.30 -
   45.31 -The Original Software is NetBeans. The Initial Developer of the Original
   45.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   45.33 -Microsystems, Inc. All Rights Reserved.
   45.34 -
   45.35 -If you wish your version of this file to be governed by only the CDDL
   45.36 -or only the GPL Version 2, indicate your decision by adding
   45.37 -"[Contributor] elects to include this software in this distribution
   45.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
   45.39 -single choice of license, a recipient has the option to distribute
   45.40 -your version of this file under either the CDDL, the GPL Version 2 or
   45.41 -to extend the choice of license to its licensees as provided above.
   45.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
   45.43 -Version 2 license, then the option applies only if the new code is
   45.44 -made subject to such option by the copyright holder.
   45.45 --->
   45.46 -
   45.47 -<project xmlns="http://www.netbeans.org/ns/project/1">
   45.48 -    <type>org.netbeans.modules.web.project</type>
   45.49 -    <configuration>
   45.50 -        <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1"/>
   45.51 -        <creator-data xmlns="http://www.sun.com/creator/ns" jsf.current.theme="theme-default" jsf.pagebean.package="currencytrader" jsf.project.libraries.dir="lib" jsf.project.version="4.0" jsf.startPage="Page1.jsp"/>
   45.52 -        <data xmlns="http://www.netbeans.org/ns/web-project/3">
   45.53 -            <name>CurrencyTrader</name>
   45.54 -            <minimum-ant-version>1.6</minimum-ant-version>
   45.55 -            <web-module-libraries>
   45.56 -                <library files="1">
   45.57 -                    <file>${libs.theme-default.classpath}</file>
   45.58 -                    <path-in-war>WEB-INF/lib</path-in-war>
   45.59 -                </library>
   45.60 -                <library files="4">
   45.61 -                    <file>${libs.jsfsupport-designtime.classpath}</file>
   45.62 -                </library>
   45.63 -                <library files="2">
   45.64 -                    <file>${libs.webui-designtime.classpath}</file>
   45.65 -                </library>
   45.66 -                <library files="1">
   45.67 -                    <file>${libs.jdbcsupport-designtime.classpath}</file>
   45.68 -                </library>
   45.69 -                <library files="1">
   45.70 -                    <file>${libs.rowset-ri.classpath}</file>
   45.71 -                    <path-in-war>WEB-INF/lib</path-in-war>
   45.72 -                </library>
   45.73 -            </web-module-libraries>
   45.74 -            <web-module-additional-libraries>
   45.75 -                <library files="4">
   45.76 -                    <file>${libs.jsfsupport-runtime.classpath}</file>
   45.77 -                    <path-in-war>WEB-INF/lib</path-in-war>
   45.78 -                </library>
   45.79 -                <library files="2">
   45.80 -                    <file>${libs.webui-runtime.classpath}</file>
   45.81 -                    <path-in-war>WEB-INF/lib</path-in-war>
   45.82 -                </library>
   45.83 -                <library files="1">
   45.84 -                    <file>${libs.jdbcsupport-runtime.classpath}</file>
   45.85 -                    <path-in-war>WEB-INF/lib</path-in-war>
   45.86 -                </library>
   45.87 -                <library files="1">
   45.88 -                    <file>${libs.exceptionhandler-runtime.classpath}</file>
   45.89 -                    <path-in-war>WEB-INF/lib</path-in-war>
   45.90 -                </library>
   45.91 -            </web-module-additional-libraries>
   45.92 -            <source-roots>
   45.93 -                <root id="src.dir"/>
   45.94 -            </source-roots>
   45.95 -            <test-roots>
   45.96 -                <root id="test.src.dir"/>
   45.97 -            </test-roots>
   45.98 -        </data>
   45.99 -    </configuration>
  45.100 -</project>
    46.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/conf/MANIFEST.MF	Wed Feb 23 20:05:40 2011 -0500
    46.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.3 @@ -1,2 +0,0 @@
    46.4 -Manifest-Version: 1.0
    46.5 -
    47.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencyservice/AuthoratativeCurrencyPair.java	Wed Feb 23 20:05:40 2011 -0500
    47.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.3 @@ -1,385 +0,0 @@
    47.4 -/*
    47.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    47.6 - *
    47.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    47.8 - *
    47.9 - * The contents of this file are subject to the terms of either the GNU
   47.10 - * General Public License Version 2 only ("GPL") or the Common
   47.11 - * Development and Distribution License("CDDL") (collectively, the
   47.12 - * "License"). You may not use this file except in compliance with the
   47.13 - * License. You can obtain a copy of the License at
   47.14 - * http://www.netbeans.org/cddl-gplv2.html
   47.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   47.16 - * specific language governing permissions and limitations under the
   47.17 - * License.  When distributing the software, include this License Header
   47.18 - * Notice in each file and include the License file at
   47.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   47.20 - * particular file as subject to the "Classpath" exception as provided
   47.21 - * by Sun in the GPL Version 2 section of the License file that
   47.22 - * accompanied this code. If applicable, add the following below the
   47.23 - * License Header, with the fields enclosed by brackets [] replaced by
   47.24 - * your own identifying information:
   47.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   47.26 - *
   47.27 - * Contributor(s):
   47.28 - *
   47.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   47.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   47.31 - * Microsystems, Inc. All Rights Reserved.
   47.32 - *
   47.33 - * If you wish your version of this file to be governed by only the CDDL
   47.34 - * or only the GPL Version 2, indicate your decision by adding
   47.35 - * "[Contributor] elects to include this software in this distribution
   47.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   47.37 - * single choice of license, a recipient has the option to distribute
   47.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   47.39 - * to extend the choice of license to its licensees as provided above.
   47.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   47.41 - * Version 2 license, then the option applies only if the new code is
   47.42 - * made subject to such option by the copyright holder.
   47.43 - */
   47.44 -
   47.45 -
   47.46 -package currencyservice;
   47.47 -
   47.48 -import java.text.NumberFormat;
   47.49 -import java.util.Random;
   47.50 -
   47.51 -/**
   47.52 - * <p>This class is used internally by the <code>CurrencyService</code> class to hold the current
   47.53 - * prices of a currency pair. A currency pair represents a pair of currencies, 
   47.54 - * such as "EUR/USD". This class should not be confused with the 
   47.55 - * <code>CurrencyPair</code> class in the <code>currencytrader</code> package.
   47.56 - * Two separate classes are used because this one internally helps
   47.57 - * <code>CurrencyService</code> implement its public API, while 
   47.58 - * <code>CurrencyPair</code> is used by the web application itself to hold 
   47.59 - * pricing information for its purposes.</p>
   47.60 - * @author mbohm
   47.61 - */
   47.62 -class AuthoratativeCurrencyPair {
   47.63 -    
   47.64 -    /**
   47.65 -     *  <p>Generates random numbers and booleans for modulating prices.</p>
   47.66 -     */
   47.67 -    private static Random random = new Random();
   47.68 -    
   47.69 -    /**
   47.70 -     * <p>Formats prices to have no more than four fractional digits.</p>
   47.71 -     */
   47.72 -    private static NumberFormat currencyPairFormat = NumberFormat.getInstance();
   47.73 -    
   47.74 -    /**
   47.75 -     * <p>An array of length <code>2</code> containing the sell and buy 
   47.76 -     * prices, respectively.</p>
   47.77 -     */
   47.78 -    private double[] prices;
   47.79 -    
   47.80 -    /**
   47.81 -     * <p>The name of the pair, such as "EUR/USD".</p>
   47.82 -     */
   47.83 -    private String name;
   47.84 -    
   47.85 -    /** 
   47.86 -     * <p>The percentage chance we will choose to change the prices, provided 
   47.87 -     * they did not change on the previous invocation of the 
   47.88 -     * <code>modulate</code> method.
   47.89 -     * </p>
   47.90 -     */
   47.91 -    private int percentChanceOfChange = 30;
   47.92 -    
   47.93 -    /**
   47.94 -     * <p>The maximum amount by which the sell price is permitted to change 
   47.95 -     * during a price modulation.</p>
   47.96 -     */
   47.97 -    private double maxDelta = 0.01;
   47.98 -    
   47.99 -    /**
  47.100 -     * <p>The maximum amount by which the sell and buy price are permitted to 
  47.101 -     * differ.</p>
  47.102 -     */
  47.103 -    private double maxSpread = 0.001;
  47.104 -    
  47.105 -    /**
  47.106 -     * <p>Whether the sell price visibly changed on the previous invocation of 
  47.107 -     * the <code>modulate</code> method.</p>
  47.108 -     */
  47.109 -    private boolean sellPriceVisiblyChanged;
  47.110 -            
  47.111 -    /**
  47.112 -     * <p>Whether the buy price visibly changed on the previous invocation of 
  47.113 -     * the <code>modulate</code> method.</p>
  47.114 -     */
  47.115 -    private boolean buyPriceVisiblyChanged;
  47.116 -    
  47.117 -    static {
  47.118 -        currencyPairFormat.setMaximumFractionDigits(4);
  47.119 -    }
  47.120 -    
  47.121 -    /**
  47.122 -     * <p>Construct an <code>AuthoratativeCurrencyPair</code> instance.</p>
  47.123 -     * @param name The name of the pair.
  47.124 -     * @param sellPrice The initial sell price.
  47.125 -     * @param buyPrice The initial buy price.
  47.126 -     */
  47.127 -    public AuthoratativeCurrencyPair(String name, double sellPrice, double buyPrice) {
  47.128 -        this.name = name;
  47.129 -        this.prices = new double[2];
  47.130 -        this.prices[0] = sellPrice;
  47.131 -        this.prices[1] = buyPrice;
  47.132 -    }
  47.133 -    
  47.134 -    /**
  47.135 -     * <p>Construct an <code>AuthoratativeCurrencyPair</code> instance.</p>
  47.136 -     * @param name The name of the pair.
  47.137 -     * @param sellPrice The initial sell price.
  47.138 -     * @param buyPrice The initial buy price.
  47.139 -     * @param maxDelta The maximum amount by which the sell price is permitted to change 
  47.140 -     * during a price modulation.
  47.141 -     * @param maxSpread The maximum amount by which the sell and buy price are permitted to 
  47.142 -     * differ.
  47.143 -     */
  47.144 -    public AuthoratativeCurrencyPair(String name, double sellPrice, double buyPrice, double maxDelta, double maxSpread) {
  47.145 -        this(name, sellPrice, buyPrice);
  47.146 -        this.maxDelta = maxDelta;
  47.147 -        this.maxSpread = maxSpread;
  47.148 -    }
  47.149 -    
  47.150 -    /**
  47.151 -     * <p>Construct an <code>AuthoratativeCurrencyPair</code> instance.</p>
  47.152 -     * @param name The name of the pair.
  47.153 -     * @param sellPrice The initial sell price.
  47.154 -     * @param buyPrice The initial buy price.
  47.155 -     * @param maxDelta The maximum amount by which the sell price is permitted to change 
  47.156 -     * during a price modulation.
  47.157 -     * @param maxSpread The maximum amount by which the sell and buy price are permitted to 
  47.158 -     * differ.
  47.159 -     * @param percentChanceOfChange The percentage chance we will choose to change the prices, provided 
  47.160 -     * they did not change on the previous invocation of the <code>modulate</code> method.
  47.161 -     * @throws IllegalArgumentException If percentChanceOfChange is less than <code>0</code> or more than <code>100</code>.
  47.162 -     */
  47.163 -    public AuthoratativeCurrencyPair(String name, double sellPrice, double buyPrice, double maxDelta, double maxSpread, int percentChanceOfChange) {
  47.164 -        this(name, sellPrice, buyPrice, maxDelta, maxSpread);
  47.165 -        if (percentChanceOfChange < 0 || percentChanceOfChange > 100) {
  47.166 -            throw new IllegalArgumentException("percentChanceOfChange must be between 0 and 100. value supplied was " + percentChanceOfChange);
  47.167 -        }
  47.168 -        this.percentChanceOfChange = percentChanceOfChange;
  47.169 -    }
  47.170 -    
  47.171 -    /**
  47.172 -     * <p>Get the name of the pair, such as "EUR/USD".</p>
  47.173 -     * @return The currency pair name.
  47.174 -     */
  47.175 -    public String getName() {
  47.176 -        return this.name;
  47.177 -    }
  47.178 -    
  47.179 -    /**
  47.180 -     * <p>Get an array of length <code>2</code> containing the sell and buy 
  47.181 -     * prices, respectively. This method contains
  47.182 -     * synchronization logic to prevent a caller from getting the prices 
  47.183 -     * while they are changing.</p>
  47.184 -     * @return The sell and buy prices, respectively.
  47.185 -     */
  47.186 -    public double[] getPrices() {
  47.187 -        synchronized(this) {
  47.188 -            return this.prices;
  47.189 -        }
  47.190 -    }
  47.191 -    
  47.192 -    /**
  47.193 -     * <p>If the sell price or buy price did not change visibly on the previous call to this method,
  47.194 -     * then choose a number between <code>1</code> and <code>100</code> and compare it to 
  47.195 -     * <code>this.percentChanceOfChange</code> to determine whether we should change 
  47.196 -     * the sell and buy prices.</p>
  47.197 -     */
  47.198 -    public void modulate() {
  47.199 -        if (this.sellPriceVisiblyChanged || this.buyPriceVisiblyChanged || this.percentChanceOfChange == 0) {
  47.200 -            //just return without changing the prices.
  47.201 -            //mark the sell and buy prices not visibly changed,
  47.202 -            //as these will be examined on the next invocation of this method.
  47.203 -            this.sellPriceVisiblyChanged = false;
  47.204 -            this.buyPriceVisiblyChanged = false;
  47.205 -            return;
  47.206 -        }
  47.207 -        if (this.percentChanceOfChange == 100) {
  47.208 -            changePrices();
  47.209 -            return;
  47.210 -        }
  47.211 -        int between1And100 = random.nextInt(100) + 1;
  47.212 -        if (between1And100 <= this.percentChanceOfChange) {
  47.213 -            changePrices();
  47.214 -            return;
  47.215 -        }
  47.216 -        //we did not change the prices.
  47.217 -        //mark the sell and buy prices not visibly changed,
  47.218 -        //as these will be examined on the next invocation of this method.
  47.219 -        this.sellPriceVisiblyChanged = false;
  47.220 -        this.buyPriceVisiblyChanged = false;
  47.221 -    }
  47.222 -    
  47.223 -    /**
  47.224 -     * <p>Change the sell and buy prices. This method contains
  47.225 -     * synchronization logic to prevent a caller from getting the prices 
  47.226 -     * while they are changing.</p>
  47.227 -     * <p>First, randomly determine whether to increase or decrease the sell 
  47.228 -     * price. Then make several attempts to randomly generate visibly changed 
  47.229 -     * sell and buy prices, taking care not to let the prices go below zero.
  47.230 -     * Then set the members of <code>this.prices</code>, and also set <code>this.sellPriceVisiblyChanged</code> and 
  47.231 -     * <code>this.buyPriceVisiblyChanged</code> according to whether we've  
  47.232 -     * changed the prices visibly.</p>
  47.233 -     */
  47.234 -    private void changePrices() {
  47.235 -        synchronized (this) {
  47.236 -            boolean increase = random.nextBoolean();
  47.237 -            double newSellPrice = this.prices[0];
  47.238 -            boolean visibleSellChange = false;
  47.239 -            //make up to three attempts to generate a visibly changed sell price
  47.240 -            for (int i = 0; i < 3; i++) {
  47.241 -                newSellPrice = getNewSellPrice(this.prices[0], increase);
  47.242 -                if (!getTextForPrice(this.prices[0]).equals(getTextForPrice(newSellPrice))) {
  47.243 -                    visibleSellChange = true;
  47.244 -                    break;
  47.245 -                }
  47.246 -            }
  47.247 -            
  47.248 -            //reevaluate increase, in case we had to switch it to avoid going negative
  47.249 -            increase = newSellPrice > this.prices[0];
  47.250 -            
  47.251 -            double newBuyPrice = this.prices[1];
  47.252 -            boolean visibleBuyChange = false;
  47.253 -            //make up to three attempts to generate a visibly changed buy price
  47.254 -            for (int i = 0; i < 3; i++) {
  47.255 -                newBuyPrice = getNewBuyPrice(this.prices[1], newSellPrice, increase);
  47.256 -                if (!getTextForPrice(this.prices[1]).equals(getTextForPrice(newBuyPrice))) {
  47.257 -                    visibleBuyChange = true;
  47.258 -                    break;
  47.259 -                }
  47.260 -            }
  47.261 -            
  47.262 -            //set members accordingly
  47.263 -            this.prices[0] = newSellPrice;
  47.264 -            this.sellPriceVisiblyChanged = visibleSellChange;
  47.265 -            this.prices[1] = newBuyPrice;
  47.266 -            this.buyPriceVisiblyChanged = visibleBuyChange;
  47.267 -        }
  47.268 -    }
  47.269 -    
  47.270 -    /**
  47.271 -     * <p>Generate a new sell price. First, randomly generate the delta
  47.272 -     * based on <code>this.maxDelta</code>. If the delta is zero, reset it to a very 
  47.273 -     * small figure to ensure the sell price does change. If <code>increase</code>
  47.274 -     * is true or if decreasing by the delta would generate
  47.275 -     * a new sell price at or below zero, then return a new sell price by increasing
  47.276 -     * <code>oldSellPrice</code> by the delta. Otherwise, return a new sell price by decreasing
  47.277 -     * <code>oldSellPrice</code> by the delta.</p>
  47.278 -     * @param oldSellPrice The old sell price.
  47.279 -     * @param increase Whether we intend to increase the sell price.
  47.280 -     * @return The new sell price.
  47.281 -     */
  47.282 -    private double getNewSellPrice(double oldSellPrice, boolean increase) {
  47.283 -        double delta = random.nextDouble() * this.maxDelta;
  47.284 -        if (delta == 0.0) {
  47.285 -            delta = 0.00000000000001;
  47.286 -        }
  47.287 -        if (increase) {
  47.288 -            return oldSellPrice + delta;
  47.289 -        }
  47.290 -        else {
  47.291 -            double diminishedSellPrice = oldSellPrice - delta;
  47.292 -            //if dimishedSellPrice is at or below zero, then do an increase instead of a decrease
  47.293 -            if (diminishedSellPrice <= 0.0) {
  47.294 -                return oldSellPrice + delta;
  47.295 -            }
  47.296 -            return diminishedSellPrice;
  47.297 -        }
  47.298 -    }
  47.299 -    
  47.300 -    /**
  47.301 -     * <p>Generate a new buy price. The new buy price must meet the following conditions:</p>
  47.302 -     * <ul>
  47.303 -     *  <li>The new buy price must be greater than or equal to the new sell price.</li>
  47.304 -     *  <li>The difference between the new buy price and the new sell price must 
  47.305 -     *  not exceed <code>this.maxSpread</code>.</li>
  47.306 -     *  <li>If the sell price has increased (so that the <code>increase</code> parameter is <code>true</code>),
  47.307 -     *  then the buy price must not decrease; that is, the new buy price must be greater than or equal
  47.308 -     *  to the old buy price.</li>
  47.309 -     *  <li>If the sell price has decreased (so that the <code>increase</code> parameter is <code>false</code>),
  47.310 -     *  then the buy price must not increase; that is, the new buy price must be less than or equal
  47.311 -     *  to the old buy price.</li>
  47.312 -     * </ul>
  47.313 -     * @param oldBuyPrice The old buy price.
  47.314 -     * @param newSellPrice The new sell price.
  47.315 -     * @param increase <code>true</code> if the sell price has increased, <code>false</code> otherwise.
  47.316 -     * @return The new buy price.
  47.317 -     */
  47.318 -    private double getNewBuyPrice(double oldBuyPrice, double newSellPrice, boolean increase) {
  47.319 -        if (!increase) {
  47.320 -            //the sell price has decreased. the buy price must decrease or remain the same.
  47.321 -            //the buy price must not increase.
  47.322 -            //add the actual spread (based on the maxSpread) to the newSellPrice to calculate the newBuyPrice
  47.323 -            //but first, make sure the maxSpread is not so great that the newBuyPrice can end up greater than the oldBuyPrice
  47.324 -            
  47.325 -            //establish a saneMaxSpread variable
  47.326 -            double saneMaxSpread = this.maxSpread;
  47.327 -            
  47.328 -            //the "superSpread" is the absolute maximum saneMaxSpread we want to tolerate. 
  47.329 -            //if saneMaxSpread is greater than the superSpread, then the newBuyPrice can end up greater than the oldBuyPrice
  47.330 -            double superSpread = oldBuyPrice - newSellPrice;
  47.331 -            if (saneMaxSpread > superSpread) {
  47.332 -                saneMaxSpread = superSpread;
  47.333 -            }
  47.334 -            
  47.335 -            //pick a number between zero and saneMaxSpread.
  47.336 -            //this will be the actualSpread.
  47.337 -            double actualSpread = random.nextDouble() * saneMaxSpread;
  47.338 -            
  47.339 -            //add the actualSpread to the newSellPrice to calculate the newBuyPrice.
  47.340 -            return newSellPrice + actualSpread;
  47.341 -        }
  47.342 -        else {
  47.343 -            //the sell price has increased. the buy price must increase or remain the same.
  47.344 -            //the buy price must not decrease.
  47.345 -            
  47.346 -            if (newSellPrice < oldBuyPrice) {
  47.347 -                //newSellPrice is less than oldBuyPrice, 
  47.348 -                //so we cannot simply add a spread to newSellPrice to calculate newBuyPrice,
  47.349 -                //because that algorithm could yield a newBuyPrice that's less than the oldBuyPrice.
  47.350 -                //instead, we must calculate newBuyPrice by finding an appropriate maxBuyDelta and
  47.351 -                //adding it to the oldBuyPrice. the maxBuyDelta must not be so great that 
  47.352 -                //the difference between the newBuyPrice and newSellPrice can exceed the maxSpread.
  47.353 -                
  47.354 -                //the oldBuyPrice is greater than the newSellPrice and less than the maximum allowable newBuyPrice.
  47.355 -                //the maxSpread is the difference between the maximum allowable newBuyPrice and the newSellPrice.
  47.356 -                //the maxBuyDelta is the maxSpread minus the difference between the oldBuyPrice and the newSellPrice.
  47.357 -                double maxBuyDelta = this.maxSpread - oldBuyPrice + newSellPrice;   //+ newSellPrice is due to algebra. this is intentional!
  47.358 -                
  47.359 -                //pick a number between zero and maxBuyDelta.
  47.360 -                //this will be the actualBuyDelta.
  47.361 -                double actualBuyDelta = random.nextDouble() * maxBuyDelta;
  47.362 -                
  47.363 -                //add the actualBuyDelta to the oldBuyPrice to calculate the newBuyPrice.
  47.364 -                return oldBuyPrice + actualBuyDelta;
  47.365 -            }
  47.366 -            else {
  47.367 -                //newSellPrice is greater than or equal to the oldBuyPrice
  47.368 -                //so we can just add add a spread to the newSellPrice to calculate the newBuyPrice.
  47.369 -                
  47.370 -                //pick a number between zero and maxSpread.
  47.371 -                //this will be the actualSpread.
  47.372 -                double actualSpread = random.nextDouble() * this.maxSpread;
  47.373 -                
  47.374 -                //add the actualSpread to the newSellPrice to calculate the newBuyPrice.
  47.375 -                return newSellPrice + actualSpread;
  47.376 -            }
  47.377 -        }
  47.378 -    }    
  47.379 -    
  47.380 -    /**
  47.381 -     * <p>Get formatted text representing the supplied price.</p>
  47.382 -     * @param price The price for which we want formatted text.
  47.383 -     * @return Formatted text representing the supplied price.
  47.384 -     */
  47.385 -    private String getTextForPrice(double price) {
  47.386 -        return currencyPairFormat.format(price);
  47.387 -    }
  47.388 -}
    48.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencyservice/CurrencyService.java	Wed Feb 23 20:05:40 2011 -0500
    48.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.3 @@ -1,246 +0,0 @@
    48.4 -/*
    48.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    48.6 - *
    48.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    48.8 - *
    48.9 - * The contents of this file are subject to the terms of either the GNU
   48.10 - * General Public License Version 2 only ("GPL") or the Common
   48.11 - * Development and Distribution License("CDDL") (collectively, the
   48.12 - * "License"). You may not use this file except in compliance with the
   48.13 - * License. You can obtain a copy of the License at
   48.14 - * http://www.netbeans.org/cddl-gplv2.html
   48.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   48.16 - * specific language governing permissions and limitations under the
   48.17 - * License.  When distributing the software, include this License Header
   48.18 - * Notice in each file and include the License file at
   48.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   48.20 - * particular file as subject to the "Classpath" exception as provided
   48.21 - * by Sun in the GPL Version 2 section of the License file that
   48.22 - * accompanied this code. If applicable, add the following below the
   48.23 - * License Header, with the fields enclosed by brackets [] replaced by
   48.24 - * your own identifying information:
   48.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   48.26 - *
   48.27 - * Contributor(s):
   48.28 - *
   48.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   48.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   48.31 - * Microsystems, Inc. All Rights Reserved.
   48.32 - *
   48.33 - * If you wish your version of this file to be governed by only the CDDL
   48.34 - * or only the GPL Version 2, indicate your decision by adding
   48.35 - * "[Contributor] elects to include this software in this distribution
   48.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   48.37 - * single choice of license, a recipient has the option to distribute
   48.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   48.39 - * to extend the choice of license to its licensees as provided above.
   48.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   48.41 - * Version 2 license, then the option applies only if the new code is
   48.42 - * made subject to such option by the copyright holder.
   48.43 - */
   48.44 -
   48.45 -package currencyservice;
   48.46 -
   48.47 -import java.util.HashMap;
   48.48 -import java.util.Map;
   48.49 -
   48.50 -/**
   48.51 - * <p>This class simulates a client stub for an external currency service on the network.
   48.52 - * The service exposes a very simple public API that provides the currency pair names
   48.53 - * and prices.</p>
   48.54 - * @author mbohm
   48.55 - */
   48.56 -public class CurrencyService {
   48.57 -    
   48.58 -    /**
   48.59 -     * <p>A <code>java.util.Map</code> whose keys are currency pair names and whose values
   48.60 -     * are <code>AuthoritativeCurrencyPair</code> instances.</p>
   48.61 -     */
   48.62 -    private Map pairMap;
   48.63 -    
   48.64 -    /**
   48.65 -     * <p>An array of the currency pair names.</p>
   48.66 -     */
   48.67 -    private String[] pairNames;
   48.68 -    
   48.69 -    /**
   48.70 -     * <p>A timestamp (in milliseconds) corresponding to the most recent invocation 
   48.71 -     * of the <code>getPrices</code> method.</p>
   48.72 -     */
   48.73 -    private long lastAccess;
   48.74 -    
   48.75 -    /**
   48.76 -     * <p>A <code>CurrencyService.CurrencyModulator</code> instance we use
   48.77 -     * to modulate the prices.</p>
   48.78 -     */
   48.79 -    private CurrencyModulator modulator;
   48.80 -    
   48.81 -    /**
   48.82 -     * <p>A separate thread we use to modulate the prices.</p>
   48.83 -     */
   48.84 -    private Thread modulationThread;
   48.85 -    
   48.86 -    /**
   48.87 -     * <p>Construct a <code>CurrencyService</code> instance. Here we generate the
   48.88 -     * <code>AuthoratativeCurrencyPair</code> instances and use them to populate
   48.89 -     * <code>this.pairMap</code> and <code>this.pairNames</code>. We also 
   48.90 -     * construct and maintain a new instance of 
   48.91 -     * <code>CurrencyService.CurrencyModulator</code>, which implements
   48.92 -     * <code>Runnable</code>, but we do not yet run it.</p>
   48.93 -     * @param modulationInterval The interval in milliseconds to let elapse between 
   48.94 -     * price modulations.
   48.95 -     * @param stopModulationWithoutAccess If this interval in milliseconds 
   48.96 -     * elapses without an invocation of <code>getPrices</code>, then stop modulating the prices.
   48.97 -     */
   48.98 -    public CurrencyService(long modulationInterval, long stopModulationWithoutAccess) {
   48.99 -        AuthoratativeCurrencyPair[] pairs = generateAuthoratativeCurrencyPairs();
  48.100 -        this.pairMap = new HashMap();
  48.101 -        this.pairNames = new String[pairs.length];
  48.102 -        for (int i = 0; i < pairs.length; i++) {
  48.103 -            this.pairNames[i] = pairs[i].getName();
  48.104 -            this.pairMap.put(this.pairNames[i], pairs[i]);
  48.105 -        }
  48.106 -        this.modulator = new CurrencyModulator(pairs, modulationInterval, stopModulationWithoutAccess);
  48.107 -    }
  48.108 -    
  48.109 -    /**
  48.110 -     * <p>Get an array of length <code>2</code> containing the sell and buy 
  48.111 -     * prices, respectively.</p>
  48.112 -     * @return The sell and buy prices, respectively.
  48.113 -     */
  48.114 -    public double[] getPrices(String pairName) {
  48.115 -        registerAccess();
  48.116 -        return ((AuthoratativeCurrencyPair)pairMap.get(pairName)).getPrices();
  48.117 -    }
  48.118 -    
  48.119 -    /**
  48.120 -     * <p>Get an array of all the currency pair names, such as "EUR/USD".</p>
  48.121 -     * @return An array of all the currency pair names.
  48.122 -     */
  48.123 -    public String[] getPairNames() {
  48.124 -        return this.pairNames;
  48.125 -    }
  48.126 -    
  48.127 -    /**
  48.128 -     * <p>Set <code>this.lastAccess</code> to the current time in 
  48.129 -     * milliseconds. Also, if <code>this.modulationThread</code> is not started, 
  48.130 -     * start it; this will cause the prices to modulate continuously.</p>
  48.131 -     */
  48.132 -    private void registerAccess() {
  48.133 -        this.lastAccess = System.currentTimeMillis();
  48.134 -        if (this.modulationThread == null) {
  48.135 -            startModulation();
  48.136 -        }
  48.137 -    }
  48.138 -    
  48.139 -    /**
  48.140 -     * <p>Start <code>this.modulationThread</code>; this will cause the prices 
  48.141 -     * to modulate continuously. This method contains logic to synchronize on
  48.142 -     * <code>this.modulator</code>, to ensure that only one thread for 
  48.143 -     * price modulation purposes runs at a time.</p>
  48.144 -     */
  48.145 -    private void startModulation() {
  48.146 -        synchronized (this.modulator) {
  48.147 -            if (this.modulationThread != null) {
  48.148 -                return;
  48.149 -            }
  48.150 -            this.modulationThread = new Thread(this.modulator);
  48.151 -            this.modulationThread.start();
  48.152 -        }
  48.153 -    }
  48.154 -    
  48.155 -    /**
  48.156 -     * <p>Generate a new array of <code>AuthoratativeCurrencyPair</code> 
  48.157 -     * instances.</p>
  48.158 -     * @return A new array of <code>AuthoratativeCurrencyPair</code> 
  48.159 -     * instances.
  48.160 -     */
  48.161 -    private AuthoratativeCurrencyPair[] generateAuthoratativeCurrencyPairs() {
  48.162 -        AuthoratativeCurrencyPair[] pairs = new AuthoratativeCurrencyPair[] {
  48.163 -            new AuthoratativeCurrencyPair("EUR/USD", 1.2752, 1.2755),
  48.164 -            new AuthoratativeCurrencyPair("USD/JPY", 112.31, 112.35, 1.0, 0.1),
  48.165 -            new AuthoratativeCurrencyPair("GBP/USD", 1.8601, 1.8606),
  48.166 -            new AuthoratativeCurrencyPair("USD/CHF", 1.2242, 1.2247),
  48.167 -            new AuthoratativeCurrencyPair("AUD/USD", 0.7583, 0.7587),
  48.168 -            new AuthoratativeCurrencyPair("USD/CAD", 1.1054, 1.1059),
  48.169 -            new AuthoratativeCurrencyPair("NZD/USD", 0.6340, 0.6344),
  48.170 -        };
  48.171 -        return pairs;
  48.172 -    }
  48.173 -    
  48.174 -    /**
  48.175 -     * <p>Private class used to modulate the prices of the 
  48.176 -     * <code>AuthoratativeCurrencyPair</code> instances. Contains the 
  48.177 -     * <code>Runnable</code> logic that runs in 
  48.178 -     * <code>this.modulationThread</code>.</p>
  48.179 -     */
  48.180 -    private class CurrencyModulator implements Runnable {
  48.181 -        
  48.182 -        /**
  48.183 -         * <p>An array of the <code>AuthoratativeCurrencyPair</code> instances.</p>
  48.184 -         */
  48.185 -        private AuthoratativeCurrencyPair[] pairs;
  48.186 -        
  48.187 -        /**
  48.188 -         * <p>The interval in milliseconds to let elapse between 
  48.189 -         * price modulations.</p>
  48.190 -         */
  48.191 -        private long modulationInterval;
  48.192 -     
  48.193 -        /**
  48.194 -         * <p>If this interval in milliseconds elapses without an invocation 
  48.195 -         * of <code>CurrencyService.this.getPrices</code>, then stop modulating the prices.</p>
  48.196 -         */
  48.197 -        private long stopModulationWithoutAccess;
  48.198 -        
  48.199 -        /**
  48.200 -         * <p>Construct a <code>CurrencyModulator</code> instance.</p>
  48.201 -         * @param pairs An array of the <code>AuthoratativeCurrencyPair</code> instances.
  48.202 -         * @param modulationInterval The interval in milliseconds to let elapse between 
  48.203 -         * price modulations.
  48.204 -         * @param stopModulationWithoutAccess If this interval in milliseconds 
  48.205 -         * elapses without an invocation of <code>CurrencyService.this.getPrices</code>, then stop modulating the prices.
  48.206 -         */
  48.207 -        CurrencyModulator(AuthoratativeCurrencyPair[] pairs, long modulationInterval, long stopModulationWithoutAccess) {
  48.208 -            this.pairs = pairs;
  48.209 -            this.modulationInterval = modulationInterval;
  48.210 -            this.stopModulationWithoutAccess = stopModulationWithoutAccess;
  48.211 -        }
  48.212 -        
  48.213 -        /**
  48.214 -         * <p>The <code>Runnable</code> logic that runs in 
  48.215 -         * <code>CurrencyService.this.modulationThread</code>. This method contains logic to synchronize on
  48.216 -         * the <code>this</code> instance, so that only one thread for 
  48.217 -         * modulation purposes runs at a time. First we check if the
  48.218 -         * <code>this.stopModulationWithoutAccess</code> interval has elapsed since the
  48.219 -         * last time the <code>CurrencyService.this.getPrices</code> method was invoked, and, if so, we set 
  48.220 -         * <code>CurrencyService.this.modulationThread</code> to <code>null</code> and exit the 
  48.221 -         * method. Otherwise, we invoke the <code>modulate</code> method on each 
  48.222 -         * <code>AuthoratativeCurrencyPair</code> instance and then sleep for
  48.223 -         * the duration determined by <code>this.modulationInterval</code>. This sequence
  48.224 -         * of operations repeats inside a <code>while</code> loop so that the
  48.225 -         * prices modulate continuously.</p>
  48.226 -         */
  48.227 -        public void run() {
  48.228 -            synchronized (this) {
  48.229 -                while (true) {
  48.230 -                    long millisSinceLastLookup = System.currentTimeMillis() - CurrencyService.this.lastAccess;
  48.231 -                    if (millisSinceLastLookup > this.stopModulationWithoutAccess) {
  48.232 -                        break;
  48.233 -                    }
  48.234 -                    for (int i = 0; i < this.pairs.length; i++) {
  48.235 -                        this.pairs[i].modulate();
  48.236 -                    }
  48.237 -                    try {
  48.238 -                        Thread.sleep(this.modulationInterval);
  48.239 -                    }
  48.240 -                    catch (InterruptedException ie) {
  48.241 -                        ie.printStackTrace();
  48.242 -                        break;
  48.243 -                    }
  48.244 -                }
  48.245 -                CurrencyService.this.modulationThread = null;
  48.246 -            }
  48.247 -        }
  48.248 -    }
  48.249 -}
    49.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/ApplicationBean1.java	Wed Feb 23 20:05:40 2011 -0500
    49.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.3 @@ -1,242 +0,0 @@
    49.4 -/*
    49.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    49.6 - *
    49.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    49.8 - *
    49.9 - * The contents of this file are subject to the terms of either the GNU
   49.10 - * General Public License Version 2 only ("GPL") or the Common
   49.11 - * Development and Distribution License("CDDL") (collectively, the
   49.12 - * "License"). You may not use this file except in compliance with the
   49.13 - * License. You can obtain a copy of the License at
   49.14 - * http://www.netbeans.org/cddl-gplv2.html
   49.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   49.16 - * specific language governing permissions and limitations under the
   49.17 - * License.  When distributing the software, include this License Header
   49.18 - * Notice in each file and include the License file at
   49.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   49.20 - * particular file as subject to the "Classpath" exception as provided
   49.21 - * by Sun in the GPL Version 2 section of the License file that
   49.22 - * accompanied this code. If applicable, add the following below the
   49.23 - * License Header, with the fields enclosed by brackets [] replaced by
   49.24 - * your own identifying information:
   49.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   49.26 - *
   49.27 - * Contributor(s):
   49.28 - *
   49.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   49.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   49.31 - * Microsystems, Inc. All Rights Reserved.
   49.32 - *
   49.33 - * If you wish your version of this file to be governed by only the CDDL
   49.34 - * or only the GPL Version 2, indicate your decision by adding
   49.35 - * "[Contributor] elects to include this software in this distribution
   49.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   49.37 - * single choice of license, a recipient has the option to distribute
   49.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   49.39 - * to extend the choice of license to its licensees as provided above.
   49.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   49.41 - * Version 2 license, then the option applies only if the new code is
   49.42 - * made subject to such option by the copyright holder.
   49.43 - */
   49.44 -
   49.45 -package currencytrader;
   49.46 -
   49.47 -import com.sun.rave.web.ui.appbase.AbstractApplicationBean;
   49.48 -import com.sun.rave.web.ui.model.Option;
   49.49 -import currencyservice.CurrencyService;
   49.50 -import javax.faces.FacesException;
   49.51 -
   49.52 -/**
   49.53 - * <p>Application scope data bean for your application.  Create properties
   49.54 - *  here to represent cached data that should be made available to all users
   49.55 - *  and pages in the application.</p>
   49.56 - *
   49.57 - * <p>An instance of this class will be created for you automatically,
   49.58 - * the first time your application evaluates a value binding expression
   49.59 - * or method binding expression that references a managed bean using
   49.60 - * this class.</p>
   49.61 - * @author mbohm
   49.62 - */
   49.63 -public class ApplicationBean1 extends AbstractApplicationBean {
   49.64 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   49.65 -    private int __placeholder;
   49.66 -    
   49.67 -    /**
   49.68 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   49.69 -     * This method is automatically generated, so any user-specified code inserted
   49.70 -     * here is subject to being replaced.</p>
   49.71 -     */
   49.72 -    private void _init() throws Exception {
   49.73 -    }
   49.74 -    // </editor-fold>
   49.75 -    
   49.76 -    /**
   49.77 -     * <p>Construct a new application data bean instance.</p>
   49.78 -     */
   49.79 -    public ApplicationBean1() {
   49.80 -    }
   49.81 -    
   49.82 -    /**
   49.83 -     * <p>This method is called when this bean is initially added to
   49.84 -     * application scope.  Typically, this occurs as a result of evaluating
   49.85 -     * a value binding or method binding expression, which utilizes the
   49.86 -     * managed bean facility to instantiate this bean and store it into
   49.87 -     * application scope.</p>
   49.88 -     *
   49.89 -     * <p>You may customize this method to initialize and cache application wide
   49.90 -     * data values (such as the lists of valid options for dropdown list
   49.91 -     * components), or to allocate resources that are required for the
   49.92 -     * lifetime of the application.</p>
   49.93 -     */
   49.94 -    public void init() {
   49.95 -        // Perform initializations inherited from our superclass
   49.96 -        super.init();
   49.97 -        // Perform application initialization that must complete
   49.98 -        // *before* managed components are initialized
   49.99 -        // TODO - add your own initialiation code here
  49.100 -        
  49.101 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  49.102 -        // Initialize automatically managed components
  49.103 -        // *Note* - this logic should NOT be modified
  49.104 -        try {
  49.105 -            _init();
  49.106 -        } catch (Exception e) {
  49.107 -            log("ApplicationBean1 Initialization Failure", e);
  49.108 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  49.109 -        }
  49.110 -        
  49.111 -        // </editor-fold>
  49.112 -        // Perform application initialization that must complete
  49.113 -        // *after* managed components are initialized
  49.114 -        // TODO - add your own initialization code here
  49.115 -        
  49.116 -        //instantiate the CurrencyService and get the currency pair names
  49.117 -        this.service = new CurrencyService(5000L, 15000L);
  49.118 -        String[] pairNames = service.getPairNames();
  49.119 -        
  49.120 -        //populate pairNameOptions
  49.121 -        this.pairNameOptions = new Option[pairNames.length];
  49.122 -        for (int i = 0; i < pairNames.length; i++) {
  49.123 -            pairNameOptions[i] = new Option(pairNames[i], pairNames[i]);
  49.124 -        }
  49.125 -        
  49.126 -        //populate typeOptions
  49.127 -        this.typeOptions = new Option[] {
  49.128 -            new Option("Sell", "Sell"),
  49.129 -            new Option("Buy", "Buy")
  49.130 -        };
  49.131 -        
  49.132 -        //populate amountOptions
  49.133 -        this.amountOptions = new Option[10];
  49.134 -        for (int i = 0; i < amountOptions.length; i++) {
  49.135 -            int amount = 100 * (i + 1);
  49.136 -            amountOptions[i] = new Option(new Integer(amount), String.valueOf(amount));
  49.137 -        }
  49.138 -    }
  49.139 -    
  49.140 -    /**
  49.141 -     * <p>This method is called when this bean is removed from
  49.142 -     * application scope.  Typically, this occurs as a result of
  49.143 -     * the application being shut down by its owning container.</p>
  49.144 -     *
  49.145 -     * <p>You may customize this method to clean up resources allocated
  49.146 -     * during the execution of the <code>init()</code> method, or
  49.147 -     * at any later time during the lifetime of the application.</p>
  49.148 -     */
  49.149 -    public void destroy() {
  49.150 -    }
  49.151 -    
  49.152 -    /**
  49.153 -     * <p>Return an appropriate character encoding based on the
  49.154 -     * <code>Locale</code> defined for the current JavaServer Faces
  49.155 -     * view.  If no more suitable encoding can be found, return
  49.156 -     * "UTF-8" as a general purpose default.</p>
  49.157 -     *
  49.158 -     * <p>The default implementation uses the implementation from
  49.159 -     * our superclass, <code>AbstractApplicationBean</code>.</p>
  49.160 -     */
  49.161 -    public String getLocaleCharacterEncoding() {
  49.162 -        return super.getLocaleCharacterEncoding();
  49.163 -    }
  49.164 -    
  49.165 -    /**
  49.166 -     * <p>The currency service, which simulates a client stub for an external 
  49.167 -     * currency service on the network.</p>
  49.168 -     */
  49.169 -    private CurrencyService service;
  49.170 -    
  49.171 -    /**
  49.172 -     * <p>An <code>Option</code> array of the currency pair names.</p>
  49.173 -     */
  49.174 -    private Option[] pairNameOptions;
  49.175 -    
  49.176 -    /**
  49.177 -     * <p>An <code>Option</code> array of the position types ("Sell" or 
  49.178 -     * "Buy").</p>
  49.179 -     */
  49.180 -    private Option[] typeOptions;
  49.181 -    
  49.182 -    /**
  49.183 -     * <p>An <code>Option</code> array of the amounts available when opening
  49.184 -     * a position.</p>
  49.185 -     */
  49.186 -    private Option[] amountOptions;
  49.187 -    
  49.188 -    /**
  49.189 -     * <p>A <code>java.util.Map</code> whose keys are <code>String</code> constants in the
  49.190 -     * <code>CurrencyPair</code> class and whose values are the
  49.191 -     * URLs of the up and down arrow images and the blank image. The 
  49.192 -     * <code>url</code> property of the image components on Page1 are bound to 
  49.193 -     * expressions referencing this map.</p>
  49.194 -     */
  49.195 -    private VisibleChangeMap visibleChangeImageSrcMap = new VisibleChangeMap();
  49.196 -
  49.197 -    /**
  49.198 -     * Get the currency service, which simulates a client stub for an external 
  49.199 -     * currency service on the network.
  49.200 -     * @return The currency service.
  49.201 -     */
  49.202 -    public CurrencyService getService() {
  49.203 -        return this.service;
  49.204 -    }
  49.205 -    
  49.206 -    /**
  49.207 -     * <p>Get an <code>Option</code> array of the currency pair names.</p>
  49.208 -     * @return An <code>Option</code> array of the currency pair names.
  49.209 -     */
  49.210 -    public Option[] getPairNameOptions() {
  49.211 -        return this.pairNameOptions;
  49.212 -    }
  49.213 -    
  49.214 -    /**
  49.215 -     * <p>Get an <code>Option</code> array of the position types ("Sell" or 
  49.216 -     * "Buy").</p>
  49.217 -     * @return An <code>Option</code> array of the position types.
  49.218 -     */
  49.219 -    public Option[] getTypeOptions() {
  49.220 -        return this.typeOptions;
  49.221 -    }
  49.222 -    
  49.223 -    /**
  49.224 -     * <p>Get an <code>Option</code> array of the amounts available when opening
  49.225 -     * a position.</p>
  49.226 -     * @return An <code>Option</code> array of the amounts available.
  49.227 -     */
  49.228 -    public Option[] getAmountOptions() {
  49.229 -        return this.amountOptions;
  49.230 -    }
  49.231 -    
  49.232 -    /**
  49.233 -     * <p>Get a <code>java.util.Map</code> whose keys are <code>String</code> constants in the
  49.234 -     * <code>CurrencyPair</code> class and whose values are the
  49.235 -     * URLs of the up and down arrow images and the blank image. The 
  49.236 -     * <code>url</code> property of the image components on Page1 are bound to 
  49.237 -     * expressions referencing this map.</p>
  49.238 -     * @return A <code>java.util.Map</code> whose values are the
  49.239 -     * URLs of the up and down arrow images and the blank image.
  49.240 -     */
  49.241 -    public VisibleChangeMap getVisibleChangeImageSrcMap() {
  49.242 -        return this.visibleChangeImageSrcMap;
  49.243 -    }
  49.244 -
  49.245 -}
    50.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/Bundle.properties	Wed Feb 23 20:05:40 2011 -0500
    50.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.3 @@ -1,40 +0,0 @@
    50.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    50.5 -#
    50.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    50.7 -#
    50.8 -# The contents of this file are subject to the terms of either the GNU
    50.9 -# General Public License Version 2 only ("GPL") or the Common
   50.10 -# Development and Distribution License("CDDL") (collectively, the
   50.11 -# "License"). You may not use this file except in compliance with the
   50.12 -# License. You can obtain a copy of the License at
   50.13 -# http://www.netbeans.org/cddl-gplv2.html
   50.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   50.15 -# specific language governing permissions and limitations under the
   50.16 -# License.  When distributing the software, include this License Header
   50.17 -# Notice in each file and include the License file at
   50.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   50.19 -# particular file as subject to the "Classpath" exception as provided
   50.20 -# by Sun in the GPL Version 2 section of the License file that
   50.21 -# accompanied this code. If applicable, add the following below the
   50.22 -# License Header, with the fields enclosed by brackets [] replaced by
   50.23 -# your own identifying information:
   50.24 -# "Portions Copyrighted [year] [name of copyright owner]"
   50.25 -#
   50.26 -# Contributor(s):
   50.27 -#
   50.28 -# The Original Software is NetBeans. The Initial Developer of the Original
   50.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   50.30 -# Microsystems, Inc. All Rights Reserved.
   50.31 -#
   50.32 -# If you wish your version of this file to be governed by only the CDDL
   50.33 -# or only the GPL Version 2, indicate your decision by adding
   50.34 -# "[Contributor] elects to include this software in this distribution
   50.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   50.36 -# single choice of license, a recipient has the option to distribute
   50.37 -# your version of this file under either the CDDL, the GPL Version 2 or
   50.38 -# to extend the choice of license to its licensees as provided above.
   50.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   50.40 -# Version 2 license, then the option applies only if the new code is
   50.41 -# made subject to such option by the copyright holder.
   50.42 -
   50.43 -# Sample ResourceBundle properties file
    51.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/CurrencyPair.java	Wed Feb 23 20:05:40 2011 -0500
    51.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.3 @@ -1,218 +0,0 @@
    51.4 -/*
    51.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    51.6 - *
    51.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    51.8 - *
    51.9 - * The contents of this file are subject to the terms of either the GNU
   51.10 - * General Public License Version 2 only ("GPL") or the Common
   51.11 - * Development and Distribution License("CDDL") (collectively, the
   51.12 - * "License"). You may not use this file except in compliance with the
   51.13 - * License. You can obtain a copy of the License at
   51.14 - * http://www.netbeans.org/cddl-gplv2.html
   51.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   51.16 - * specific language governing permissions and limitations under the
   51.17 - * License.  When distributing the software, include this License Header
   51.18 - * Notice in each file and include the License file at
   51.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   51.20 - * particular file as subject to the "Classpath" exception as provided
   51.21 - * by Sun in the GPL Version 2 section of the License file that
   51.22 - * accompanied this code. If applicable, add the following below the
   51.23 - * License Header, with the fields enclosed by brackets [] replaced by
   51.24 - * your own identifying information:
   51.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   51.26 - *
   51.27 - * Contributor(s):
   51.28 - *
   51.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   51.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   51.31 - * Microsystems, Inc. All Rights Reserved.
   51.32 - *
   51.33 - * If you wish your version of this file to be governed by only the CDDL
   51.34 - * or only the GPL Version 2, indicate your decision by adding
   51.35 - * "[Contributor] elects to include this software in this distribution
   51.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   51.37 - * single choice of license, a recipient has the option to distribute
   51.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   51.39 - * to extend the choice of license to its licensees as provided above.
   51.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   51.41 - * Version 2 license, then the option applies only if the new code is
   51.42 - * made subject to such option by the copyright holder.
   51.43 - */
   51.44 -
   51.45 -
   51.46 -package currencytrader;
   51.47 -
   51.48 -import java.io.Serializable;
   51.49 -import java.text.NumberFormat;
   51.50 -import java.util.Random;
   51.51 -
   51.52 -/**
   51.53 - * <p>This class is used by the web application to represent a pair of 
   51.54 - * currencies, such as "EUR/USD". This class should not be confused with the 
   51.55 - * <code>AuthoratativeCurrencyPair</code> class in the 
   51.56 - * <code>currencyservice</code> package. Two separate classes are used because 
   51.57 - * this one is used by the web application itself for its purposes--namely, 
   51.58 - * to hold pricing and visible change information for a currency pair 
   51.59 - * displayed in a particular rendered page--while the
   51.60 - * <code>AuthoratativeCurrencyPair</code> class internally helps 
   51.61 - * <code>CurrencyService</code> implement its public API.</p>
   51.62 - * @author mbohm
   51.63 - */
   51.64 -public class CurrencyPair implements Serializable {
   51.65 -    
   51.66 -    /**
   51.67 -     * <p>Denotes a price has not changed since the previous poll request.</p>
   51.68 -     */
   51.69 -    public static final String VISIBLY_UNCHANGED = "VISIBLY_UNCHANGED";
   51.70 -    
   51.71 -    /**
   51.72 -     * <p>Denotes a price has visibly increased since the previous poll
   51.73 -     * request.</p>
   51.74 -     */
   51.75 -    public static final String VISIBLE_INCREASE = "VISIBLE_INCREASE";
   51.76 -    
   51.77 -    /**
   51.78 -     * <p>Denotes a price has visibly decreased since the previous poll
   51.79 -     * request.</p>
   51.80 -     */
   51.81 -    public static final String VISIBLE_DECREASE = "VISIBLE_DECREASE";
   51.82 -    
   51.83 -    /**
   51.84 -     * <p>Formats prices to have no more than four fractional digits.</p>
   51.85 -     */
   51.86 -    private static NumberFormat currencyPairFormat = NumberFormat.getInstance();
   51.87 -    
   51.88 -    /**
   51.89 -     * <p>The name of the pair, such as "EUR/USD".</p>
   51.90 -     */
   51.91 -    private String name;
   51.92 -    
   51.93 -    /**
   51.94 -     * <p>The current sell price.</p>
   51.95 -     */
   51.96 -    private double sellPrice;
   51.97 -    
   51.98 -    /**
   51.99 -     * <p>The current buy price.</p>
  51.100 -     */
  51.101 -    private double buyPrice;
  51.102 -    
  51.103 -    /**
  51.104 -     * <p>Denotes whether the sell price has visibly increased, decreased,
  51.105 -     * or remained unchanged since the previous poll request.</p>
  51.106 -     */
  51.107 -    private String sellPriceVisibleChange = VISIBLY_UNCHANGED;
  51.108 -    
  51.109 -    /**
  51.110 -     * <p>Denotes whether the buy price has visibly increased, decreased,
  51.111 -     * or remained unchanged since the previous poll request.</p>
  51.112 -     */
  51.113 -    private String buyPriceVisibleChange = VISIBLY_UNCHANGED;
  51.114 -    
  51.115 -    static {
  51.116 -        currencyPairFormat.setMaximumFractionDigits(4);
  51.117 -    }
  51.118 -    
  51.119 -    /**
  51.120 -     * <p>Get formatted text representing the supplied price.</p>
  51.121 -     * @param price The price for which we want formatted text.
  51.122 -     * @return Formatted text representing the supplied price.
  51.123 -     */
  51.124 -    public static String getTextForPrice(double price) {
  51.125 -        return currencyPairFormat.format(price);
  51.126 -    }
  51.127 -    
  51.128 -    /**
  51.129 -     * <p>Construct a <code>CurrencyPair</code> instance.</p>
  51.130 -     * @param name The name of the pair, such as "EUR/USD".
  51.131 -     * @param sellPrice The sell price.
  51.132 -     * @param buyPrice The buy price. 
  51.133 -     */
  51.134 -    public CurrencyPair(String name, double sellPrice, double buyPrice) {
  51.135 -        this.name = name;
  51.136 -        this.sellPrice = sellPrice;
  51.137 -        this.buyPrice = buyPrice;
  51.138 -    }
  51.139 -    
  51.140 -    /**
  51.141 -     * The name of the currency pair. For example, "EUR/USD."
  51.142 -     * @return The name of the currency pair.
  51.143 -     */
  51.144 -    public String getName() {
  51.145 -        return this.name;
  51.146 -    }
  51.147 -    
  51.148 -    /**
  51.149 -     * <p>Get the current sell price.</p>
  51.150 -     * @return The current sell price.
  51.151 -     */
  51.152 -    public double getSellPrice() {
  51.153 -        return this.sellPrice;
  51.154 -    }
  51.155 -
  51.156 -    /**
  51.157 -     * <p>Get the current buy price.</p>
  51.158 -     * @return The current buy price.
  51.159 -     */
  51.160 -    public double getBuyPrice() {
  51.161 -        return this.buyPrice;
  51.162 -    }
  51.163 -    
  51.164 -    /**
  51.165 -     * <p>Get formatted text representing the current sell price.</p>
  51.166 -     * @return Formatted text representing the current sell price.
  51.167 -     */
  51.168 -    public String getSellPriceText() {
  51.169 -        return getTextForPrice(this.sellPrice);
  51.170 -    }
  51.171 -
  51.172 -    /**
  51.173 -     * <p>Get formatted text representing the current buy price.</p>
  51.174 -     * @return Formatted text representing the current buy price.
  51.175 -     */
  51.176 -    public String getBuyPriceText() {
  51.177 -        return getTextForPrice(this.buyPrice);
  51.178 -    }
  51.179 -    
  51.180 -    /**
  51.181 -     * <p>Get whether the sell price has visibly increased, decreased,
  51.182 -     * or remained unchanged since the previous poll request.</p>
  51.183 -     * @return Whether the sell price has visibly increased, decreased,
  51.184 -     * or remained unchanged.
  51.185 -     */
  51.186 -    public String getSellPriceVisibleChange() {
  51.187 -        return this.sellPriceVisibleChange;
  51.188 -    }
  51.189 -    
  51.190 -    /**
  51.191 -     * <p>Get whether the buy price has visibly increased, decreased,
  51.192 -     * or remained unchanged since the previous poll request.</p>
  51.193 -     * @return Whether the buy price has visibly increased, decreased,
  51.194 -     * or remained unchanged.
  51.195 -     */
  51.196 -    public String getBuyPriceVisibleChange() {
  51.197 -        return this.buyPriceVisibleChange;
  51.198 -    }
  51.199 -    
  51.200 -    /**
  51.201 -     * <p>Set the current sell and buy prices, respectively.</p>
  51.202 -     * @param newSellPrice The new sell price.
  51.203 -     * @param newBuyPrice The new buy price.
  51.204 -     */
  51.205 -    public void setPrices(double newSellPrice, double newBuyPrice) {
  51.206 -        double sellPriceDiff = newSellPrice - this.sellPrice;
  51.207 -        if (sellPriceDiff == 0.0) {
  51.208 -            this.sellPriceVisibleChange = VISIBLY_UNCHANGED;
  51.209 -            this.buyPriceVisibleChange = VISIBLY_UNCHANGED;
  51.210 -        }
  51.211 -        else {
  51.212 -            String sellPriceText = this.getSellPriceText();
  51.213 -            String buyPriceText = this.getBuyPriceText();
  51.214 -            String possibleVisibleChange = sellPriceDiff > 0.0 ? VISIBLE_INCREASE : VISIBLE_DECREASE;
  51.215 -            this.sellPriceVisibleChange = sellPriceText.equals(getTextForPrice(newSellPrice)) ? VISIBLY_UNCHANGED : possibleVisibleChange;
  51.216 -            this.buyPriceVisibleChange = buyPriceText.equals(getTextForPrice(newBuyPrice)) ? VISIBLY_UNCHANGED : possibleVisibleChange;
  51.217 -        }
  51.218 -        this.sellPrice = newSellPrice;
  51.219 -        this.buyPrice = newBuyPrice;
  51.220 -    }
  51.221 -}
    52.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/CurrencyPairCache.java	Wed Feb 23 20:05:40 2011 -0500
    52.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.3 @@ -1,254 +0,0 @@
    52.4 -/*
    52.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    52.6 - *
    52.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    52.8 - *
    52.9 - * The contents of this file are subject to the terms of either the GNU
   52.10 - * General Public License Version 2 only ("GPL") or the Common
   52.11 - * Development and Distribution License("CDDL") (collectively, the
   52.12 - * "License"). You may not use this file except in compliance with the
   52.13 - * License. You can obtain a copy of the License at
   52.14 - * http://www.netbeans.org/cddl-gplv2.html
   52.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   52.16 - * specific language governing permissions and limitations under the
   52.17 - * License.  When distributing the software, include this License Header
   52.18 - * Notice in each file and include the License file at
   52.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   52.20 - * particular file as subject to the "Classpath" exception as provided
   52.21 - * by Sun in the GPL Version 2 section of the License file that
   52.22 - * accompanied this code. If applicable, add the following below the
   52.23 - * License Header, with the fields enclosed by brackets [] replaced by
   52.24 - * your own identifying information:
   52.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   52.26 - *
   52.27 - * Contributor(s):
   52.28 - *
   52.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   52.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   52.31 - * Microsystems, Inc. All Rights Reserved.
   52.32 - *
   52.33 - * If you wish your version of this file to be governed by only the CDDL
   52.34 - * or only the GPL Version 2, indicate your decision by adding
   52.35 - * "[Contributor] elects to include this software in this distribution
   52.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   52.37 - * single choice of license, a recipient has the option to distribute
   52.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   52.39 - * to extend the choice of license to its licensees as provided above.
   52.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   52.41 - * Version 2 license, then the option applies only if the new code is
   52.42 - * made subject to such option by the copyright holder.
   52.43 - */
   52.44 -
   52.45 -
   52.46 -package currencytrader;
   52.47 -
   52.48 -import currencyservice.CurrencyService;
   52.49 -import java.util.ArrayList;
   52.50 -import java.util.HashMap;
   52.51 -import java.util.List;
   52.52 -import java.util.Map;
   52.53 -
   52.54 -/**
   52.55 - * <p>Instances of this class are held in session scope to cache currency pair
   52.56 - * pricing information.
   52.57 - * Many of the methods of this class accept a <code>renderId</code>
   52.58 - * parameter. This is because prices are cached separately for each rendered page
   52.59 - * associated with the session (for instance, if a user opens multiple 
   52.60 - * browser tabs). Caching prices on a per-page basis is necessary because 
   52.61 - * information regarding whether a price has visibly changed since the previous 
   52.62 - * poll request is applicable to a particular rendered page rather than the entire 
   52.63 - * session. This class also includes a convenience method to bypass the cached
   52.64 - * prices and retrieve a currency pair's real-time prices.</p>
   52.65 - * @author mbohm
   52.66 - */
   52.67 -public class CurrencyPairCache {
   52.68 -    
   52.69 -    /**
   52.70 -     * <p>The simulated client stub for an external currency service on the 
   52.71 -     * network.</p>
   52.72 -     */
   52.73 -    private CurrencyService service;
   52.74 -    
   52.75 -    /**
   52.76 -     * <p>An array of the currency pair names, such as "EUR/USD".</p>
   52.77 -     */
   52.78 -    private String[] pairNames;
   52.79 -    
   52.80 -    /**
   52.81 -     * <p>A <code>java.util.Map</code> with a <code>renderId</code> as the key and 
   52.82 -     * a <code>CurrencyPairCache.Cache</code> instance as the value.</p>
   52.83 -     */
   52.84 -    private Map cacheMap;
   52.85 -    
   52.86 -    /**
   52.87 -     * <p>Construct a <code>CurrencyPairCache</code> instance.</p>
   52.88 -     * @param service The simulated client stub for an external currency service on the 
   52.89 -     * network.
   52.90 -     */
   52.91 -    public CurrencyPairCache(CurrencyService service) {
   52.92 -        this.service = service;
   52.93 -        this.pairNames = service.getPairNames();
   52.94 -        this.cacheMap = new HashMap();
   52.95 -    }
   52.96 -    
   52.97 -    /**
   52.98 -     * <p>Bypass cached prices and get the real-time information for a currency
   52.99 -     * pair directly from the currency service.</p>
  52.100 -     * @param pairName The currency pair name, such as "EUR/USD".
  52.101 -     * @return A new <code>CurrencyPair</code> instance containing real-time 
  52.102 -     * information obtained directly from the currency service.
  52.103 -     */
  52.104 -    public CurrencyPair getRealTimeCurrencyPair(String pairName) {
  52.105 -        double[] prices = service.getPrices(pairName);
  52.106 -        return new CurrencyPair(pairName, prices[0], prices[1]);
  52.107 -    }
  52.108 -    
  52.109 -    /**
  52.110 -     * <p>Obtain fresh pricing data from the currency service for all currency
  52.111 -     * pairs and update the cached data for the rendered page represented 
  52.112 -     * by <code>renderId</code>.</p>
  52.113 -     * @param renderId A <code>renderId</code> representing a rendered page 
  52.114 -     * associated with the current session.
  52.115 -     */
  52.116 -    public void update(String renderId) {
  52.117 -        Cache cache = (Cache)cacheMap.get(renderId);
  52.118 -        if (cache == null) {
  52.119 -            initCache(renderId);
  52.120 -            return;
  52.121 -        }
  52.122 -        cache.update();
  52.123 -    }
  52.124 -    
  52.125 -    /**
  52.126 -     * <p>Get a <code>java.util.List</code> containing the 
  52.127 -     * <code>CurrencyPair</code> instances cached for the rendered page represented
  52.128 -     * by <code>renderId</code>.</p>
  52.129 -     * @param renderId A <code>renderId</code> representing a rendered page 
  52.130 -     * associated with the current session.
  52.131 -     * @return A <code>java.util.List</code> containing the 
  52.132 -     * <code>CurrencyPair</code> instances cached for <code>renderId</code>.
  52.133 -     */
  52.134 -    public List getCurrencyPairList(String renderId) {
  52.135 -        Cache cache = getCache(renderId);
  52.136 -        return cache.getPairList();
  52.137 -    }
  52.138 -    
  52.139 -    /**
  52.140 -     * <p>Get the <code>CurrencyPair</code> instance with the supplied
  52.141 -     * name that is cached for the rendered page represented
  52.142 -     * by <code>renderId</code>.</p>
  52.143 -     * @param renderId A <code>renderId</code> representing a rendered page 
  52.144 -     * associated with the current session.
  52.145 -     * @param pairName The currency pair name, such as "EUR/USD".
  52.146 -     * @return The <code>CurrencyPair</code> instance with the supplied
  52.147 -     * name that is cached for <code>renderId</code>.
  52.148 -     */
  52.149 -    public CurrencyPair getCurrencyPair(String renderId, String pairName) {
  52.150 -        Cache cache = getCache(renderId);
  52.151 -        return cache.getPair(pairName);
  52.152 -    }
  52.153 -    
  52.154 -    /**
  52.155 -     * <p>Get the <code>CurrencyPairCache.Cache</code> instance for the 
  52.156 -     * rendered page represented by <code>renderId</code>, creating one if
  52.157 -     * necessary.</p>
  52.158 -     * @param renderId A <code>renderId</code> representing a rendered page 
  52.159 -     * associated with the current session.
  52.160 -     * @return The <code>CurrencyPairCache.Cache</code> instance for 
  52.161 -     * <code>renderId</code>.
  52.162 -     */
  52.163 -    private Cache getCache(String renderId) {
  52.164 -        Cache cache = (Cache)cacheMap.get(renderId);
  52.165 -        if (cache == null) {
  52.166 -            cache = initCache(renderId);
  52.167 -        }
  52.168 -        return cache;
  52.169 -    }
  52.170 -    
  52.171 -    /**
  52.172 -     * <p>Create and return a <code>CurrencyPairCache.Cache</code> instance for the 
  52.173 -     * rendered page represented by <code>renderId</code> and store that instance
  52.174 -     * in <code>this.cacheMap</code>.</p>
  52.175 -     * @param renderId A <code>renderId</code> representing a rendered page 
  52.176 -     * associated with the current session.
  52.177 -     * @return A new <code>CurrencyPairCache.Cache</code> instance for 
  52.178 -     * <code>renderId</code>.
  52.179 -     */
  52.180 -    private Cache initCache(String renderId) {
  52.181 -        Cache cache = new Cache();
  52.182 -        this.cacheMap.put(renderId, cache);
  52.183 -        return cache;
  52.184 -    }
  52.185 -    
  52.186 -    /**
  52.187 -     * <p>An internal cache object containing <code>CurrencyPair</code> 
  52.188 -     * instances for a particular rendered page associated with the current 
  52.189 -     * session.</p>
  52.190 -     */
  52.191 -    private class Cache {
  52.192 -        
  52.193 -        /**
  52.194 -         * <p>A <code>java.util.Map</code> whose keys are currency pair names and whose values are 
  52.195 -         * <code>CurrencyPair</code> instances.</p>
  52.196 -         */
  52.197 -        private Map pairMap;
  52.198 -        
  52.199 -        /**
  52.200 -         * <p>A <code>java.util.List</code> of <code>CurrencyPair</code> instances.</p>
  52.201 -         */
  52.202 -        private List pairList;
  52.203 -        
  52.204 -        /**
  52.205 -         * <p>Construct a <code>CurrencyPairCache.Cache</code> instance. We contact
  52.206 -         * the currency service and obtain prices for all currency pairs and 
  52.207 -         * populate <code>this.pairMap</code> and <code>this.pairList</code> with 
  52.208 -         * new <code>CurrencyPair</code> instances.</p>
  52.209 -         */
  52.210 -        public Cache() {
  52.211 -            this.pairMap = new HashMap();
  52.212 -            this.pairList = new ArrayList();
  52.213 -            String[] pairNames = CurrencyPairCache.this.pairNames;
  52.214 -            for (int i = 0; i < pairNames.length; i++) {
  52.215 -                double[] prices = CurrencyPairCache.this.service.getPrices(pairNames[i]);
  52.216 -                CurrencyPair pair = new CurrencyPair(pairNames[i], prices[0], prices[1]);
  52.217 -                this.pairMap.put(pairNames[i], pair);
  52.218 -                this.pairList.add(pair);
  52.219 -            }
  52.220 -        }
  52.221 -        
  52.222 -        /**
  52.223 -         * <p>Get a <code>java.util.List</code> containing 
  52.224 -         * <code>CurrencyPair</code> instances.</p>
  52.225 -         * @return A <code>java.util.List</code> containing 
  52.226 -         * <code>CurrencyPair</code> instances.
  52.227 -         */
  52.228 -        public List getPairList() {
  52.229 -            return this.pairList;
  52.230 -        }
  52.231 -        
  52.232 -        /**
  52.233 -         * <p>Get the <code>CurrencyPair</code> instance with the supplied
  52.234 -         * name.</p>
  52.235 -         * @param pairName The currency pair name, such as "EUR/USD".
  52.236 -         * @return The <code>CurrencyPair</code> instance with the supplied
  52.237 -         * name.
  52.238 -         */
  52.239 -        public CurrencyPair getPair(String pairName) {
  52.240 -            return (CurrencyPair)this.pairMap.get(pairName);
  52.241 -        }
  52.242 -        
  52.243 -        /**
  52.244 -         * <p>Obtain current pricing information for all currency pairs
  52.245 -         * from the currency service and update the 
  52.246 -         * <code>CurrencyPair</code> instances contained herein.</p>
  52.247 -         */
  52.248 -        public void update() {
  52.249 -            String[] pairNames = CurrencyPairCache.this.pairNames;
  52.250 -            for (int i = 0; i < pairNames.length; i++) {
  52.251 -                double[] prices = CurrencyPairCache.this.service.getPrices(pairNames[i]);
  52.252 -                CurrencyPair pair = getPair(pairNames[i]);
  52.253 -                pair.setPrices(prices[0], prices[1]);
  52.254 -            }
  52.255 -        }
  52.256 -    }
  52.257 -}
    53.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/CurrencyPairListDataProvider.java	Wed Feb 23 20:05:40 2011 -0500
    53.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.3 @@ -1,78 +0,0 @@
    53.4 -/*
    53.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    53.6 - *
    53.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    53.8 - *
    53.9 - * The contents of this file are subject to the terms of either the GNU
   53.10 - * General Public License Version 2 only ("GPL") or the Common
   53.11 - * Development and Distribution License("CDDL") (collectively, the
   53.12 - * "License"). You may not use this file except in compliance with the
   53.13 - * License. You can obtain a copy of the License at
   53.14 - * http://www.netbeans.org/cddl-gplv2.html
   53.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   53.16 - * specific language governing permissions and limitations under the
   53.17 - * License.  When distributing the software, include this License Header
   53.18 - * Notice in each file and include the License file at
   53.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   53.20 - * particular file as subject to the "Classpath" exception as provided
   53.21 - * by Sun in the GPL Version 2 section of the License file that
   53.22 - * accompanied this code. If applicable, add the following below the
   53.23 - * License Header, with the fields enclosed by brackets [] replaced by
   53.24 - * your own identifying information:
   53.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   53.26 - *
   53.27 - * Contributor(s):
   53.28 - *
   53.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   53.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   53.31 - * Microsystems, Inc. All Rights Reserved.
   53.32 - *
   53.33 - * If you wish your version of this file to be governed by only the CDDL
   53.34 - * or only the GPL Version 2, indicate your decision by adding
   53.35 - * "[Contributor] elects to include this software in this distribution
   53.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   53.37 - * single choice of license, a recipient has the option to distribute
   53.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   53.39 - * to extend the choice of license to its licensees as provided above.
   53.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   53.41 - * Version 2 license, then the option applies only if the new code is
   53.42 - * made subject to such option by the copyright holder.
   53.43 - */
   53.44 -
   53.45 -
   53.46 -package currencytrader;
   53.47 -
   53.48 -import com.sun.data.provider.impl.ObjectListDataProvider;
   53.49 -import java.beans.Beans;
   53.50 -import java.util.ArrayList;
   53.51 -import java.util.List;
   53.52 -
   53.53 -/**
   53.54 - *
   53.55 - * @author mbohm
   53.56 - */
   53.57 -public class CurrencyPairListDataProvider extends ObjectListDataProvider {
   53.58 -
   53.59 -    public CurrencyPairListDataProvider() {
   53.60 -        if (Beans.isDesignTime()) {
   53.61 -            List pairList = new ArrayList();
   53.62 -            CurrencyPair[] pairs =  {
   53.63 -                new CurrencyPair("EUR/USD", 1.2752, 1.2755),
   53.64 -                new CurrencyPair("USD/JPY", 112.31, 112.35),
   53.65 -                new CurrencyPair("GBP/USD", 1.8601, 1.8606),
   53.66 -                new CurrencyPair("USD/CHF", 1.2242, 1.2247),
   53.67 -                new CurrencyPair("AUD/USD", 0.7583, 0.7587),
   53.68 -                new CurrencyPair("USD/CAD", 1.1054, 1.1059),
   53.69 -                new CurrencyPair("NZD/USD", 0.6340, 0.6344)
   53.70 -            };
   53.71 -            for (int i=0; i < pairs.length; i++) {
   53.72 -                pairList.add(pairs[i]);
   53.73 -            }
   53.74 -            this.setList(pairList);
   53.75 -        }
   53.76 -    }
   53.77 -
   53.78 -    public CurrencyPairListDataProvider(List pairList) {
   53.79 -        super(pairList);
   53.80 -    }
   53.81 -}
    54.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/Page1.java	Wed Feb 23 20:05:40 2011 -0500
    54.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    54.3 @@ -1,1130 +0,0 @@
    54.4 -/*
    54.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    54.6 - *
    54.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    54.8 - *
    54.9 - * The contents of this file are subject to the terms of either the GNU
   54.10 - * General Public License Version 2 only ("GPL") or the Common
   54.11 - * Development and Distribution License("CDDL") (collectively, the
   54.12 - * "License"). You may not use this file except in compliance with the
   54.13 - * License. You can obtain a copy of the License at
   54.14 - * http://www.netbeans.org/cddl-gplv2.html
   54.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   54.16 - * specific language governing permissions and limitations under the
   54.17 - * License.  When distributing the software, include this License Header
   54.18 - * Notice in each file and include the License file at
   54.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   54.20 - * particular file as subject to the "Classpath" exception as provided
   54.21 - * by Sun in the GPL Version 2 section of the License file that
   54.22 - * accompanied this code. If applicable, add the following below the
   54.23 - * License Header, with the fields enclosed by brackets [] replaced by
   54.24 - * your own identifying information:
   54.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   54.26 - *
   54.27 - * Contributor(s):
   54.28 - *
   54.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   54.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   54.31 - * Microsystems, Inc. All Rights Reserved.
   54.32 - *
   54.33 - * If you wish your version of this file to be governed by only the CDDL
   54.34 - * or only the GPL Version 2, indicate your decision by adding
   54.35 - * "[Contributor] elects to include this software in this distribution
   54.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   54.37 - * single choice of license, a recipient has the option to distribute
   54.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   54.39 - * to extend the choice of license to its licensees as provided above.
   54.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   54.41 - * Version 2 license, then the option applies only if the new code is
   54.42 - * made subject to such option by the copyright holder.
   54.43 - */
   54.44 -
   54.45 -package currencytrader;
   54.46 -
   54.47 -import com.sun.data.provider.RowKey;
   54.48 -import com.sun.faces.extensions.avatar.components.AjaxTransaction;
   54.49 -import com.sun.faces.extensions.avatar.components.AjaxZone;
   54.50 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   54.51 -import com.sun.rave.web.ui.component.Body;
   54.52 -import com.sun.rave.web.ui.component.Button;
   54.53 -import com.sun.rave.web.ui.component.DropDown;
   54.54 -import com.sun.rave.web.ui.component.Form;
   54.55 -import com.sun.rave.web.ui.component.Head;
   54.56 -import com.sun.rave.web.ui.component.HiddenField;
   54.57 -import com.sun.rave.web.ui.component.Html;
   54.58 -import com.sun.rave.web.ui.component.ImageComponent;
   54.59 -import com.sun.rave.web.ui.component.ImageHyperlink;
   54.60 -import com.sun.rave.web.ui.component.Link;
   54.61 -import com.sun.rave.web.ui.component.Page;
   54.62 -import com.sun.rave.web.ui.component.Script;
   54.63 -import com.sun.rave.web.ui.component.StaticText;
   54.64 -import com.sun.rave.web.ui.component.Table;
   54.65 -import com.sun.rave.web.ui.component.TableColumn;
   54.66 -import com.sun.rave.web.ui.component.TableRowGroup;
   54.67 -import java.util.Iterator;
   54.68 -import java.util.List;
   54.69 -import java.util.Map;
   54.70 -import javax.faces.FacesException;
   54.71 -import javax.faces.component.html.HtmlPanelGrid;
   54.72 -import javax.faces.context.FacesContext;
   54.73 -import javax.faces.convert.IntegerConverter;
   54.74 -import threadmanagement.ThreadPriority;
   54.75 -import threadmanagement.ThreadSynchronizer;
   54.76 -
   54.77 -/**
   54.78 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   54.79 - * class contains component definitions (and initialization code) for
   54.80 - * all components that you have defined on this page, as well as
   54.81 - * lifecycle methods and event handlers where you may add behavior
   54.82 - * to respond to incoming events.</p>
   54.83 - * @author mbohm
   54.84 - */
   54.85 -public class Page1 extends AbstractPageBean {
   54.86 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   54.87 -    private int __placeholder;
   54.88 -    
   54.89 -    /**
   54.90 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   54.91 -     * This method is automatically generated, so any user-specified code inserted
   54.92 -     * here is subject to being replaced.</p>
   54.93 -     */
   54.94 -    private void _init() throws Exception {
   54.95 -    }
   54.96 -    
   54.97 -    private Page page1 = new Page();
   54.98 -    
   54.99 -    public Page getPage1() {
  54.100 -        return page1;
  54.101 -    }
  54.102 -    
  54.103 -    public void setPage1(Page p) {
  54.104 -        this.page1 = p;
  54.105 -    }
  54.106 -    
  54.107 -    private Html html1 = new Html();
  54.108 -    
  54.109 -    public Html getHtml1() {
  54.110 -        return html1;
  54.111 -    }
  54.112 -    
  54.113 -    public void setHtml1(Html h) {
  54.114 -        this.html1 = h;
  54.115 -    }
  54.116 -    
  54.117 -    private Head head1 = new Head();
  54.118 -    
  54.119 -    public Head getHead1() {
  54.120 -        return head1;
  54.121 -    }
  54.122 -    
  54.123 -    public void setHead1(Head h) {
  54.124 -        this.head1 = h;
  54.125 -    }
  54.126 -    
  54.127 -    private Link link1 = new Link();
  54.128 -    
  54.129 -    public Link getLink1() {
  54.130 -        return link1;
  54.131 -    }
  54.132 -    
  54.133 -    public void setLink1(Link l) {
  54.134 -        this.link1 = l;
  54.135 -    }
  54.136 -    
  54.137 -    private Body body1 = new Body();
  54.138 -    
  54.139 -    public Body getBody1() {
  54.140 -        return body1;
  54.141 -    }
  54.142 -    
  54.143 -    public void setBody1(Body b) {
  54.144 -        this.body1 = b;
  54.145 -    }
  54.146 -    
  54.147 -    private Form form1 = new Form();
  54.148 -    
  54.149 -    public Form getForm1() {
  54.150 -        return form1;
  54.151 -    }
  54.152 -    
  54.153 -    public void setForm1(Form f) {
  54.154 -        this.form1 = f;
  54.155 -    }
  54.156 -
  54.157 -    private Table exchangeRateTable = new Table();
  54.158 -
  54.159 -    public Table getExchangeRateTable() {
  54.160 -        return exchangeRateTable;
  54.161 -    }
  54.162 -
  54.163 -    public void setExchangeRateTable(Table t) {
  54.164 -        this.exchangeRateTable = t;
  54.165 -    }
  54.166 -
  54.167 -    private TableRowGroup exchangeRateTableRowGroup = new TableRowGroup();
  54.168 -
  54.169 -    public TableRowGroup getExchangeRateTableRowGroup() {
  54.170 -        return exchangeRateTableRowGroup;
  54.171 -    }
  54.172 -
  54.173 -    public void setExchangeRateTableRowGroup(TableRowGroup trg) {
  54.174 -        this.exchangeRateTableRowGroup = trg;
  54.175 -    }
  54.176 -
  54.177 -    private TableColumn exchangeRateCurrencyColumn = new TableColumn();
  54.178 -
  54.179 -    public TableColumn getExchangeRateCurrencyColumn() {
  54.180 -        return exchangeRateCurrencyColumn;
  54.181 -    }
  54.182 -
  54.183 -    public void setExchangeRateCurrencyColumn(TableColumn tc) {
  54.184 -        this.exchangeRateCurrencyColumn = tc;
  54.185 -    }
  54.186 -
  54.187 -    private StaticText exchangeRateCurrencyText = new StaticText();
  54.188 -
  54.189 -    public StaticText getExchangeRateCurrencyText() {
  54.190 -        return exchangeRateCurrencyText;
  54.191 -    }
  54.192 -
  54.193 -    public void setExchangeRateCurrencyText(StaticText st) {
  54.194 -        this.exchangeRateCurrencyText = st;
  54.195 -    }
  54.196 -
  54.197 -    private TableColumn exchangeRateSellColumn = new TableColumn();
  54.198 -
  54.199 -    public TableColumn getExchangeRateSellColumn() {
  54.200 -        return exchangeRateSellColumn;
  54.201 -    }
  54.202 -
  54.203 -    public void setExchangeRateSellColumn(TableColumn tc) {
  54.204 -        this.exchangeRateSellColumn = tc;
  54.205 -    }
  54.206 -
  54.207 -    private StaticText exchangeRateSellText = new StaticText();
  54.208 -
  54.209 -    public StaticText getExchangeRateSellText() {
  54.210 -        return exchangeRateSellText;
  54.211 -    }
  54.212 -
  54.213 -    public void setExchangeRateSellText(StaticText st) {
  54.214 -        this.exchangeRateSellText = st;
  54.215 -    }
  54.216 -
  54.217 -    private TableColumn exchangeRateBuyColumn = new TableColumn();
  54.218 -
  54.219 -    public TableColumn getExchangeRateBuyColumn() {
  54.220 -        return exchangeRateBuyColumn;
  54.221 -    }
  54.222 -
  54.223 -    public void setExchangeRateBuyColumn(TableColumn tc) {
  54.224 -        this.exchangeRateBuyColumn = tc;
  54.225 -    }
  54.226 -
  54.227 -    private StaticText exchangeRateBuyText = new StaticText();
  54.228 -
  54.229 -    public StaticText getExchangeRateBuyText() {
  54.230 -        return exchangeRateBuyText;
  54.231 -    }
  54.232 -
  54.233 -    public void setExchangeRateBuyText(StaticText st) {
  54.234 -        this.exchangeRateBuyText = st;
  54.235 -    }
  54.236 -
  54.237 -    private Script script1 = new Script();
  54.238 -
  54.239 -    public Script getScript1() {
  54.240 -        return script1;
  54.241 -    }
  54.242 -
  54.243 -    public void setScript1(Script s) {
  54.244 -        this.script1 = s;
  54.245 -    }
  54.246 -
  54.247 -    private AjaxZone openAPositionPanelZone = new AjaxZone();
  54.248 -
  54.249 -    public AjaxZone getOpenAPositionPanelZone() {
  54.250 -        return openAPositionPanelZone;
  54.251 -    }
  54.252 -
  54.253 -    public void setOpenAPositionPanelZone(AjaxZone az) {
  54.254 -        this.openAPositionPanelZone = az;
  54.255 -    }
  54.256 -
  54.257 -    private StaticText orderPairNameText = new StaticText();
  54.258 -
  54.259 -    public StaticText getOrderPairNameText() {
  54.260 -        return orderPairNameText;
  54.261 -    }
  54.262 -
  54.263 -    public void setOrderPairNameText(StaticText st) {
  54.264 -        this.orderPairNameText = st;
  54.265 -    }
  54.266 -
  54.267 -    private DropDown orderPairNameDropDown = new DropDown();
  54.268 -
  54.269 -    public DropDown getOrderPairNameDropDown() {
  54.270 -        return orderPairNameDropDown;
  54.271 -    }
  54.272 -
  54.273 -    public void setOrderPairNameDropDown(DropDown dd) {
  54.274 -        this.orderPairNameDropDown = dd;
  54.275 -    }
  54.276 -
  54.277 -    private StaticText orderTypeText = new StaticText();
  54.278 -
  54.279 -    public StaticText getOrderTypeText() {
  54.280 -        return orderTypeText;
  54.281 -    }
  54.282 -
  54.283 -    public void setOrderTypeText(StaticText st) {
  54.284 -        this.orderTypeText = st;
  54.285 -    }
  54.286 -
  54.287 -    private DropDown orderTypeDropDown = new DropDown();
  54.288 -
  54.289 -    public DropDown getOrderTypeDropDown() {
  54.290 -        return orderTypeDropDown;
  54.291 -    }
  54.292 -
  54.293 -    public void setOrderTypeDropDown(DropDown dd) {
  54.294 -        this.orderTypeDropDown = dd;
  54.295 -    }
  54.296 -
  54.297 -    private StaticText orderAmountText = new StaticText();
  54.298 -
  54.299 -    public StaticText getOrderAmountText() {
  54.300 -        return orderAmountText;
  54.301 -    }
  54.302 -
  54.303 -    public void setOrderAmountText(StaticText st) {
  54.304 -        this.orderAmountText = st;
  54.305 -    }
  54.306 -
  54.307 -    private DropDown orderAmountDropDown = new DropDown();
  54.308 -
  54.309 -    public DropDown getOrderAmountDropDown() {
  54.310 -        return orderAmountDropDown;
  54.311 -    }
  54.312 -
  54.313 -    public void setOrderAmountDropDown(DropDown dd) {
  54.314 -        this.orderAmountDropDown = dd;
  54.315 -    }
  54.316 -
  54.317 -    private Button openButton = new Button();
  54.318 -
  54.319 -    public Button getOpenButton() {
  54.320 -        return openButton;
  54.321 -    }
  54.322 -
  54.323 -    public void setOpenButton(Button b) {
  54.324 -        this.openButton = b;
  54.325 -    }
  54.326 -
  54.327 -    private AjaxZone openPositionZone = new AjaxZone();
  54.328 -
  54.329 -    public AjaxZone getOpenPositionZone() {
  54.330 -        return openPositionZone;
  54.331 -    }
  54.332 -
  54.333 -    public void setOpenPositionZone(AjaxZone az) {
  54.334 -        this.openPositionZone = az;
  54.335 -    }
  54.336 -
  54.337 -    private Table openPositionTable = new Table();
  54.338 -
  54.339 -    public Table getOpenPositionTable() {
  54.340 -        return openPositionTable;
  54.341 -    }
  54.342 -
  54.343 -    public void setOpenPositionTable(Table t) {
  54.344 -        this.openPositionTable = t;
  54.345 -    }
  54.346 -
  54.347 -    private TableRowGroup openPositionTableRowGroup = new TableRowGroup();
  54.348 -
  54.349 -    public TableRowGroup getOpenPositionTableRowGroup() {
  54.350 -        return openPositionTableRowGroup;
  54.351 -    }
  54.352 -
  54.353 -    public void setOpenPositionTableRowGroup(TableRowGroup trg) {
  54.354 -        this.openPositionTableRowGroup = trg;
  54.355 -    }
  54.356 -
  54.357 -    private TableColumn openPositionCurrencyColumn = new TableColumn();
  54.358 -
  54.359 -    public TableColumn getOpenPositionCurrencyColumn() {
  54.360 -        return openPositionCurrencyColumn;
  54.361 -    }
  54.362 -
  54.363 -    public void setOpenPositionCurrencyColumn(TableColumn tc) {
  54.364 -        this.openPositionCurrencyColumn = tc;
  54.365 -    }
  54.366 -
  54.367 -    private StaticText openPositionCurrencyText = new StaticText();
  54.368 -
  54.369 -    public StaticText getOpenPositionCurrencyText() {
  54.370 -        return openPositionCurrencyText;
  54.371 -    }
  54.372 -
  54.373 -    public void setOpenPositionCurrencyText(StaticText st) {
  54.374 -        this.openPositionCurrencyText = st;
  54.375 -    }
  54.376 -
  54.377 -    private TableColumn openPositionAmountColumn = new TableColumn();
  54.378 -
  54.379 -    public TableColumn getOpenPositionAmountColumn() {
  54.380 -        return openPositionAmountColumn;
  54.381 -    }
  54.382 -
  54.383 -    public void setOpenPositionAmountColumn(TableColumn tc) {
  54.384 -        this.openPositionAmountColumn = tc;
  54.385 -    }
  54.386 -
  54.387 -    private StaticText openPositionAmountText = new StaticText();
  54.388 -
  54.389 -    public StaticText getOpenPositionAmountText() {
  54.390 -        return openPositionAmountText;
  54.391 -    }
  54.392 -
  54.393 -    public void setOpenPositionAmountText(StaticText st) {
  54.394 -        this.openPositionAmountText = st;
  54.395 -    }
  54.396 -
  54.397 -    private TableColumn openPositionTypeColumn = new TableColumn();
  54.398 -
  54.399 -    public TableColumn getOpenPositionTypeColumn() {
  54.400 -        return openPositionTypeColumn;
  54.401 -    }
  54.402 -
  54.403 -    public void setOpenPositionTypeColumn(TableColumn tc) {
  54.404 -        this.openPositionTypeColumn = tc;
  54.405 -    }
  54.406 -
  54.407 -    private StaticText openPositionTypeText = new StaticText();
  54.408 -
  54.409 -    public StaticText getOpenPositionTypeText() {
  54.410 -        return openPositionTypeText;
  54.411 -    }
  54.412 -
  54.413 -    public void setOpenPositionTypeText(StaticText st) {
  54.414 -        this.openPositionTypeText = st;
  54.415 -    }
  54.416 -
  54.417 -    private TableColumn openPositionOpenPriceColumn = new TableColumn();
  54.418 -
  54.419 -    public TableColumn getOpenPositionOpenPriceColumn() {
  54.420 -        return openPositionOpenPriceColumn;
  54.421 -    }
  54.422 -
  54.423 -    public void setOpenPositionOpenPriceColumn(TableColumn tc) {
  54.424 -        this.openPositionOpenPriceColumn = tc;
  54.425 -    }
  54.426 -
  54.427 -    private StaticText openPositionOpenPriceText = new StaticText();
  54.428 -
  54.429 -    public StaticText getOpenPositionOpenPriceText() {
  54.430 -        return openPositionOpenPriceText;
  54.431 -    }
  54.432 -
  54.433 -    public void setOpenPositionOpenPriceText(StaticText st) {
  54.434 -        this.openPositionOpenPriceText = st;
  54.435 -    }
  54.436 -
  54.437 -    private TableColumn currentPriceColumn = new TableColumn();
  54.438 -
  54.439 -    public TableColumn getCurrentPriceColumn() {
  54.440 -        return currentPriceColumn;
  54.441 -    }
  54.442 -
  54.443 -    public void setCurrentPriceColumn(TableColumn tc) {
  54.444 -        this.currentPriceColumn = tc;
  54.445 -    }
  54.446 -
  54.447 -    private StaticText currentPriceText = new StaticText();
  54.448 -
  54.449 -    public StaticText getCurrentPriceText() {
  54.450 -        return currentPriceText;
  54.451 -    }
  54.452 -
  54.453 -    public void setCurrentPriceText(StaticText st) {
  54.454 -        this.currentPriceText = st;
  54.455 -    }
  54.456 -
  54.457 -    private TableColumn floatingProfitColumn = new TableColumn();
  54.458 -
  54.459 -    public TableColumn getFloatingProfitColumn() {
  54.460 -        return floatingProfitColumn;
  54.461 -    }
  54.462 -
  54.463 -    public void setFloatingProfitColumn(TableColumn tc) {
  54.464 -        this.floatingProfitColumn = tc;
  54.465 -    }
  54.466 -
  54.467 -    private StaticText floatingProfitText = new StaticText();
  54.468 -
  54.469 -    public StaticText getFloatingProfitText() {
  54.470 -        return floatingProfitText;
  54.471 -    }
  54.472 -
  54.473 -    public void setFloatingProfitText(StaticText st) {
  54.474 -        this.floatingProfitText = st;
  54.475 -    }
  54.476 -
  54.477 -    private TableColumn floatingCloseAmountColumn = new TableColumn();
  54.478 -
  54.479 -    public TableColumn getFloatingCloseAmountColumn() {
  54.480 -        return floatingCloseAmountColumn;
  54.481 -    }
  54.482 -
  54.483 -    public void setFloatingCloseAmountColumn(TableColumn tc) {
  54.484 -        this.floatingCloseAmountColumn = tc;
  54.485 -    }
  54.486 -
  54.487 -    private DropDown floatingCloseAmountDropDown = new DropDown();
  54.488 -
  54.489 -    public DropDown getFloatingCloseAmountDropDown() {
  54.490 -        return floatingCloseAmountDropDown;
  54.491 -    }
  54.492 -
  54.493 -    public void setFloatingCloseAmountDropDown(DropDown dd) {
  54.494 -        this.floatingCloseAmountDropDown = dd;
  54.495 -    }
  54.496 -
  54.497 -    private TableColumn closeColumn = new TableColumn();
  54.498 -
  54.499 -    public TableColumn getCloseColumn() {
  54.500 -        return closeColumn;
  54.501 -    }
  54.502 -
  54.503 -    public void setCloseColumn(TableColumn tc) {
  54.504 -        this.closeColumn = tc;
  54.505 -    }
  54.506 -
  54.507 -    private Button closeButton = new Button();
  54.508 -
  54.509 -    public Button getCloseButton() {
  54.510 -        return closeButton;
  54.511 -    }
  54.512 -
  54.513 -    public void setCloseButton(Button b) {
  54.514 -        this.closeButton = b;
  54.515 -    }
  54.516 -
  54.517 -    private IntegerConverter integerConverter1 = new IntegerConverter();
  54.518 -
  54.519 -    public IntegerConverter getIntegerConverter1() {
  54.520 -        return integerConverter1;
  54.521 -    }
  54.522 -
  54.523 -    public void setIntegerConverter1(IntegerConverter ic) {
  54.524 -        this.integerConverter1 = ic;
  54.525 -    }
  54.526 -
  54.527 -    private AjaxZone closedPositionZone = new AjaxZone();
  54.528 -
  54.529 -    public AjaxZone getClosedPositionZone() {
  54.530 -        return closedPositionZone;
  54.531 -    }
  54.532 -
  54.533 -    public void setClosedPositionZone(AjaxZone az) {
  54.534 -        this.closedPositionZone = az;
  54.535 -    }
  54.536 -
  54.537 -    private Table closedPositionTable = new Table();
  54.538 -
  54.539 -    public Table getClosedPositionTable() {
  54.540 -        return closedPositionTable;
  54.541 -    }
  54.542 -
  54.543 -    public void setClosedPositionTable(Table t) {
  54.544 -        this.closedPositionTable = t;
  54.545 -    }
  54.546 -
  54.547 -    private TableRowGroup closedPositionTableRowGroup = new TableRowGroup();
  54.548 -
  54.549 -    public TableRowGroup getClosedPositionTableRowGroup() {
  54.550 -        return closedPositionTableRowGroup;
  54.551 -    }
  54.552 -
  54.553 -    public void setClosedPositionTableRowGroup(TableRowGroup trg) {
  54.554 -        this.closedPositionTableRowGroup = trg;
  54.555 -    }
  54.556 -
  54.557 -    private TableColumn closedPositionTypeColumn = new TableColumn();
  54.558 -
  54.559 -    public TableColumn getClosedPositionTypeColumn() {
  54.560 -        return closedPositionTypeColumn;
  54.561 -    }
  54.562 -
  54.563 -    public void setClosedPositionTypeColumn(TableColumn tc) {
  54.564 -        this.closedPositionTypeColumn = tc;
  54.565 -    }
  54.566 -
  54.567 -    private StaticText closedPositionTypeText = new StaticText();
  54.568 -
  54.569 -    public StaticText getClosedPositionTypeText() {
  54.570 -        return closedPositionTypeText;
  54.571 -    }
  54.572 -
  54.573 -    public void setClosedPositionTypeText(StaticText st) {
  54.574 -        this.closedPositionTypeText = st;
  54.575 -    }
  54.576 -
  54.577 -    private TableColumn closedPositionOpenPriceColumn = new TableColumn();
  54.578 -
  54.579 -    public TableColumn getClosedPositionOpenPriceColumn() {
  54.580 -        return closedPositionOpenPriceColumn;
  54.581 -    }
  54.582 -
  54.583 -    public void setClosedPositionOpenPriceColumn(TableColumn tc) {
  54.584 -        this.closedPositionOpenPriceColumn = tc;
  54.585 -    }
  54.586 -
  54.587 -    private StaticText closedPositionOpenPriceText = new StaticText();
  54.588 -
  54.589 -    public StaticText getClosedPositionOpenPriceText() {
  54.590 -        return closedPositionOpenPriceText;
  54.591 -    }
  54.592 -
  54.593 -    public void setClosedPositionOpenPriceText(StaticText st) {
  54.594 -        this.closedPositionOpenPriceText = st;
  54.595 -    }
  54.596 -
  54.597 -    private TableColumn closedPositionAmountColumn = new TableColumn();
  54.598 -
  54.599 -    public TableColumn getClosedPositionAmountColumn() {
  54.600 -        return closedPositionAmountColumn;
  54.601 -    }
  54.602 -
  54.603 -    public void setClosedPositionAmountColumn(TableColumn tc) {
  54.604 -        this.closedPositionAmountColumn = tc;
  54.605 -    }
  54.606 -
  54.607 -    private StaticText closedPositionAmountText = new StaticText();
  54.608 -
  54.609 -    public StaticText getClosedPositionAmountText() {
  54.610 -        return closedPositionAmountText;
  54.611 -    }
  54.612 -
  54.613 -    public void setClosedPositionAmountText(StaticText st) {
  54.614 -        this.closedPositionAmountText = st;
  54.615 -    }
  54.616 -
  54.617 -    private TableColumn closedPositionClosePriceColumn = new TableColumn();
  54.618 -
  54.619 -    public TableColumn getClosedPositionClosePriceColumn() {
  54.620 -        return closedPositionClosePriceColumn;
  54.621 -    }
  54.622 -
  54.623 -    public void setClosedPositionClosePriceColumn(TableColumn tc) {
  54.624 -        this.closedPositionClosePriceColumn = tc;
  54.625 -    }
  54.626 -
  54.627 -    private StaticText closedPositionClosePriceText = new StaticText();
  54.628 -
  54.629 -    public StaticText getClosedPositionClosePriceText() {
  54.630 -        return closedPositionClosePriceText;
  54.631 -    }
  54.632 -
  54.633 -    public void setClosedPositionClosePriceText(StaticText st) {
  54.634 -        this.closedPositionClosePriceText = st;
  54.635 -    }
  54.636 -
  54.637 -    private TableColumn closedPositionCurrencyColumn = new TableColumn();
  54.638 -
  54.639 -    public TableColumn getClosedPositionCurrencyColumn() {
  54.640 -        return closedPositionCurrencyColumn;
  54.641 -    }
  54.642 -
  54.643 -    public void setClosedPositionCurrencyColumn(TableColumn tc) {
  54.644 -        this.closedPositionCurrencyColumn = tc;
  54.645 -    }
  54.646 -
  54.647 -    private StaticText closedPositionCurrencyText = new StaticText();
  54.648 -
  54.649 -    public StaticText getClosedPositionCurrencyText() {
  54.650 -        return closedPositionCurrencyText;
  54.651 -    }
  54.652 -
  54.653 -    public void setClosedPositionCurrencyText(StaticText st) {
  54.654 -        this.closedPositionCurrencyText = st;
  54.655 -    }
  54.656 -
  54.657 -    private TableColumn profitColumn = new TableColumn();
  54.658 -
  54.659 -    public TableColumn getProfitColumn() {
  54.660 -        return profitColumn;
  54.661 -    }
  54.662 -
  54.663 -    public void setProfitColumn(TableColumn tc) {
  54.664 -        this.profitColumn = tc;
  54.665 -    }
  54.666 -
  54.667 -    private StaticText profitText = new StaticText();
  54.668 -
  54.669 -    public StaticText getProfitText() {
  54.670 -        return profitText;
  54.671 -    }
  54.672 -
  54.673 -    public void setProfitText(StaticText st) {
  54.674 -        this.profitText = st;
  54.675 -    }
  54.676 -
  54.677 -    private StaticText totalProfitLabelText = new StaticText();
  54.678 -
  54.679 -    public StaticText getTotalProfitLabelText() {
  54.680 -        return totalProfitLabelText;
  54.681 -    }
  54.682 -
  54.683 -    public void setTotalProfitLabelText(StaticText st) {
  54.684 -        this.totalProfitLabelText = st;
  54.685 -    }
  54.686 -
  54.687 -    private StaticText totalProfitDisplayText = new StaticText();
  54.688 -
  54.689 -    public StaticText getTotalProfitDisplayText() {
  54.690 -        return totalProfitDisplayText;
  54.691 -    }
  54.692 -
  54.693 -    public void setTotalProfitDisplayText(StaticText st) {
  54.694 -        this.totalProfitDisplayText = st;
  54.695 -    }
  54.696 -
  54.697 -    private AjaxZone totalProfitZone = new AjaxZone();
  54.698 -
  54.699 -    public AjaxZone getTotalProfitZone() {
  54.700 -        return totalProfitZone;
  54.701 -    }
  54.702 -
  54.703 -    public void setTotalProfitZone(AjaxZone az) {
  54.704 -        this.totalProfitZone = az;
  54.705 -    }
  54.706 -
  54.707 -    private StaticText openAPositionPanelText = new StaticText();
  54.708 -
  54.709 -    public StaticText getOpenAPositionPanelText() {
  54.710 -        return openAPositionPanelText;
  54.711 -    }
  54.712 -
  54.713 -    public void setOpenAPositionPanelText(StaticText st) {
  54.714 -        this.openAPositionPanelText = st;
  54.715 -    }
  54.716 -
  54.717 -    private HiddenField hiddenPollIndicator = new HiddenField();
  54.718 -
  54.719 -    public HiddenField getHiddenPollIndicator() {
  54.720 -        return hiddenPollIndicator;
  54.721 -    }
  54.722 -
  54.723 -    public void setHiddenPollIndicator(HiddenField hf) {
  54.724 -        this.hiddenPollIndicator = hf;
  54.725 -    }
  54.726 -
  54.727 -    private ImageComponent exchangeRateSellImage = new ImageComponent();
  54.728 -
  54.729 -    public ImageComponent getExchangeRateSellImage() {
  54.730 -        return exchangeRateSellImage;
  54.731 -    }
  54.732 -
  54.733 -    public void setExchangeRateSellImage(ImageComponent ic) {
  54.734 -        this.exchangeRateSellImage = ic;
  54.735 -    }
  54.736 -
  54.737 -    private ImageComponent exchangeRateBuyImage = new ImageComponent();
  54.738 -
  54.739 -    public ImageComponent getExchangeRateBuyImage() {
  54.740 -        return exchangeRateBuyImage;
  54.741 -    }
  54.742 -
  54.743 -    public void setExchangeRateBuyImage(ImageComponent ic) {
  54.744 -        this.exchangeRateBuyImage = ic;
  54.745 -    }
  54.746 -
  54.747 -    private ImageComponent currentPriceImage = new ImageComponent();
  54.748 -
  54.749 -    public ImageComponent getCurrentPriceImage() {
  54.750 -        return currentPriceImage;
  54.751 -    }
  54.752 -
  54.753 -    public void setCurrentPriceImage(ImageComponent ic) {
  54.754 -        this.currentPriceImage = ic;
  54.755 -    }
  54.756 -
  54.757 -    private ImageComponent floatingProfitImage = new ImageComponent();
  54.758 -
  54.759 -    public ImageComponent getFloatingProfitImage() {
  54.760 -        return floatingProfitImage;
  54.761 -    }
  54.762 -
  54.763 -    public void setFloatingProfitImage(ImageComponent ic) {
  54.764 -        this.floatingProfitImage = ic;
  54.765 -    }
  54.766 -
  54.767 -    private HiddenField hiddenRenderId = new HiddenField();
  54.768 -
  54.769 -    public HiddenField getHiddenRenderId() {
  54.770 -        return hiddenRenderId;
  54.771 -    }
  54.772 -
  54.773 -    public void setHiddenRenderId(HiddenField hf) {
  54.774 -        this.hiddenRenderId = hf;
  54.775 -    }
  54.776 -
  54.777 -    private HtmlPanelGrid headerPanel1 = new HtmlPanelGrid();
  54.778 -
  54.779 -    public HtmlPanelGrid getHeaderPanel1() {
  54.780 -        return headerPanel1;
  54.781 -    }
  54.782 -
  54.783 -    public void setHeaderPanel1(HtmlPanelGrid hpg) {
  54.784 -        this.headerPanel1 = hpg;
  54.785 -    }
  54.786 -
  54.787 -    private HtmlPanelGrid titlePanel1 = new HtmlPanelGrid();
  54.788 -
  54.789 -    public HtmlPanelGrid getTitlePanel1() {
  54.790 -        return titlePanel1;
  54.791 -    }
  54.792 -
  54.793 -    public void setTitlePanel1(HtmlPanelGrid hpg) {
  54.794 -        this.titlePanel1 = hpg;
  54.795 -    }
  54.796 -
  54.797 -    private HtmlPanelGrid subPanel1 = new HtmlPanelGrid();
  54.798 -
  54.799 -    public HtmlPanelGrid getSubPanel1() {
  54.800 -        return subPanel1;
  54.801 -    }
  54.802 -
  54.803 -    public void setSubPanel1(HtmlPanelGrid hpg) {
  54.804 -        this.subPanel1 = hpg;
  54.805 -    }
  54.806 -
  54.807 -    private HtmlPanelGrid spacingPanel1 = new HtmlPanelGrid();
  54.808 -
  54.809 -    public HtmlPanelGrid getSpacingPanel1() {
  54.810 -        return spacingPanel1;
  54.811 -    }
  54.812 -
  54.813 -    public void setSpacingPanel1(HtmlPanelGrid hpg) {
  54.814 -        this.spacingPanel1 = hpg;
  54.815 -    }
  54.816 -
  54.817 -    private ImageHyperlink imageHyperlink1 = new ImageHyperlink();
  54.818 -
  54.819 -    public ImageHyperlink getImageHyperlink1() {
  54.820 -        return imageHyperlink1;
  54.821 -    }
  54.822 -
  54.823 -    public void setImageHyperlink1(ImageHyperlink ih) {
  54.824 -        this.imageHyperlink1 = ih;
  54.825 -    }
  54.826 -
  54.827 -    private ImageHyperlink imageHyperlink2 = new ImageHyperlink();
  54.828 -
  54.829 -    public ImageHyperlink getImageHyperlink2() {
  54.830 -        return imageHyperlink2;
  54.831 -    }
  54.832 -
  54.833 -    public void setImageHyperlink2(ImageHyperlink ih) {
  54.834 -        this.imageHyperlink2 = ih;
  54.835 -    }
  54.836 -
  54.837 -    private StaticText appNameText = new StaticText();
  54.838 -
  54.839 -    public StaticText getAppNameText() {
  54.840 -        return appNameText;
  54.841 -    }
  54.842 -
  54.843 -    public void setAppNameText(StaticText st) {
  54.844 -        this.appNameText = st;
  54.845 -    }
  54.846 -
  54.847 -    private StaticText tagLineText = new StaticText();
  54.848 -
  54.849 -    public StaticText getTagLineText() {
  54.850 -        return tagLineText;
  54.851 -    }
  54.852 -
  54.853 -    public void setTagLineText(StaticText st) {
  54.854 -        this.tagLineText = st;
  54.855 -    }
  54.856 -    private AjaxTransaction pollTx = new AjaxTransaction();
  54.857 -
  54.858 -    public AjaxTransaction getPollTx() {
  54.859 -        return pollTx;
  54.860 -    }
  54.861 -
  54.862 -    public void setPollTx(AjaxTransaction at) {
  54.863 -        this.pollTx = at;
  54.864 -    }
  54.865 -    
  54.866 -    // </editor-fold>
  54.867 -    
  54.868 -    /**
  54.869 -     * <p>Construct a new Page bean instance.</p>
  54.870 -     */
  54.871 -    public Page1() {
  54.872 -    }
  54.873 -    
  54.874 -    /**
  54.875 -     * <p>Callback method that is called whenever a page is navigated to,
  54.876 -     * either directly via a URL, or indirectly via page navigation.
  54.877 -     * Customize this method to acquire resources that will be needed
  54.878 -     * for event handlers and lifecycle methods, whether or not this
  54.879 -     * page is performing post back processing.</p>
  54.880 -     *
  54.881 -     * <p>Note that, if the current request is a postback, the property
  54.882 -     * values of the components do <strong>not</strong> represent any
  54.883 -     * values submitted with this request.  Instead, they represent the
  54.884 -     * property values that were saved for this view when it was rendered.</p>
  54.885 -     */
  54.886 -    public void init() {
  54.887 -        // Perform initializations inherited from our superclass
  54.888 -        super.init();
  54.889 -        // Perform application initialization that must complete
  54.890 -        // *before* managed components are initialized
  54.891 -        // TODO - add your own initialiation code here
  54.892 -        
  54.893 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  54.894 -        // Initialize automatically managed components
  54.895 -        // *Note* - this logic should NOT be modified
  54.896 -        try {
  54.897 -            _init();
  54.898 -        } catch (Exception e) {
  54.899 -            log("Page1 Initialization Failure", e);
  54.900 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  54.901 -        }
  54.902 -        
  54.903 -        // </editor-fold>
  54.904 -        // Perform application initialization that must complete
  54.905 -        // *after* managed components are initialized
  54.906 -        // TODO - add your own initialization code here
  54.907 -        
  54.908 -        boolean poll = isPollRequest();
  54.909 -        ThreadSynchronizer synchronizer = getSessionBean1().getSynchronizer();
  54.910 -        //"gesture" requests (sent via the openButton, closeButton, or floatingCloseAmountDropDown)
  54.911 -        //have a higher priority than "poll" requests
  54.912 -        ThreadPriority currentThreadPriority = poll ? synchronizer.getPriorities()[1] : synchronizer.getPriorities()[0];
  54.913 -        //let multiple requests from the same session through one at a time
  54.914 -        this.currentThreadSynchronized = synchronizer.synchronizeCurrentThread(currentThreadPriority);
  54.915 -    }
  54.916 -    
  54.917 -    /**
  54.918 -     * <p>Callback method that is called after the component tree has been
  54.919 -     * restored, but before any event processing takes place.  This method
  54.920 -     * will <strong>only</strong> be called on a postback request that
  54.921 -     * is processing a form submit.  Customize this method to allocate
  54.922 -     * resources that will be required in your event handlers.</p>
  54.923 -     */
  54.924 -    public void preprocess() {
  54.925 -    }
  54.926 -    
  54.927 -    /**
  54.928 -     * <p>Callback method that is called just before rendering takes place.
  54.929 -     * This method will <strong>only</strong> be called for the page that
  54.930 -     * will actually be rendered (and not, for example, on a page that
  54.931 -     * handled a postback and then navigated to a different page).  Customize
  54.932 -     * this method to allocate resources that will be required for rendering
  54.933 -     * this page.</p>
  54.934 -     */
  54.935 -    public void prerender() {
  54.936 -        boolean poll = isPollRequest();
  54.937 -        Map requestParameterMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
  54.938 -        String renderId = (String)requestParameterMap.get("form1:hiddenRenderId");
  54.939 -        if (renderId == null) {
  54.940 -            //we are doing an initial render, not a postback
  54.941 -            renderId = getInitialRenderId();
  54.942 -        }
  54.943 -        
  54.944 -        CurrencyPairCache cache = getSessionBean1().getCache();
  54.945 -        if (poll) {
  54.946 -            //this is a poll request
  54.947 -            
  54.948 -            //update the cache
  54.949 -            cache.update(renderId);
  54.950 -            
  54.951 -            //update all the open positions
  54.952 -            for (Iterator iter = getSessionBean1().getOpenPositionsIterator(); iter.hasNext(); ) {
  54.953 -                Position openPosition = (Position)iter.next();
  54.954 -                String positionId = openPosition.getId();
  54.955 -                String pairName = openPosition.getName();
  54.956 -                
  54.957 -                //pull the currency pair from cache for this page by pairName
  54.958 -                //and use it to update the position
  54.959 -                CurrencyPair currentPair = getSessionBean1().getCache().getCurrencyPair(renderId, pairName);
  54.960 -                openPosition.update(currentPair);
  54.961 -            }
  54.962 -        }
  54.963 -        else {
  54.964 -            //this request was sent via the openButton, closeButton, or floatingCloseAmountDropDown
  54.965 -            //since we may be processing input from the floatingCloseAmountDropDown,
  54.966 -            //we need to commit changes on the openPositionProvider.
  54.967 -            getSessionBean1().getOpenPositionProvider().commitChanges();
  54.968 -        }
  54.969 -        
  54.970 -        //the quote table is bound to #{Page1.currencyPairProvider}
  54.971 -        //grab the list of currency pairs for this page from cache
  54.972 -        //and set it as the currencyPairProvider's list
  54.973 -        List currencyPairList = cache.getCurrencyPairList(renderId);
  54.974 -        this.currencyPairProvider = new CurrencyPairListDataProvider(currencyPairList);
  54.975 -    }
  54.976 -    
  54.977 -    /**
  54.978 -     * <p>Callback method that is called after rendering is completed for
  54.979 -     * this request, if <code>init()</code> was called (regardless of whether
  54.980 -     * or not this was the page that was actually rendered).  Customize this
  54.981 -     * method to release resources acquired in the <code>init()</code>,
  54.982 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  54.983 -     * acquired during execution of an event handler).</p>
  54.984 -     */
  54.985 -    public void destroy() {
  54.986 -        //if the current thread has the ball,
  54.987 -        //give it up
  54.988 -        if (this.currentThreadSynchronized) {
  54.989 -            ThreadSynchronizer synchronizer = getSessionBean1().getSynchronizer();
  54.990 -            synchronizer.releaseCurrentThread();
  54.991 -        }
  54.992 -    }
  54.993 -
  54.994 -    /**
  54.995 -     * <p>Return a reference to the scoped data bean.</p>
  54.996 -     */
  54.997 -    protected SessionBean1 getSessionBean1() {
  54.998 -        return (SessionBean1)getBean("SessionBean1");
  54.999 -    }
 54.1000 -
 54.1001 -    /**
 54.1002 -     * <p>Return a reference to the scoped data bean.</p>
 54.1003 -     */
 54.1004 -    protected ApplicationBean1 getApplicationBean1() {
 54.1005 -        return (ApplicationBean1)getBean("ApplicationBean1");
 54.1006 -    }
 54.1007 -
 54.1008 -    /**
 54.1009 -     * <p>Return a reference to the scoped data bean.</p>
 54.1010 -     */
 54.1011 -    protected RequestBean1 getRequestBean1() {
 54.1012 -        return (RequestBean1)getBean("RequestBean1");
 54.1013 -    }
 54.1014 -
 54.1015 -    /**
 54.1016 -     * <p>Create a position and add it to the open positions in session.</p>
 54.1017 -     * @return The <code>null</code> outcome.
 54.1018 -     */
 54.1019 -    public String openButton_action() {
 54.1020 -        String name = (String)orderPairNameDropDown.getValue();
 54.1021 -        Integer amount = (Integer)orderAmountDropDown.getValue();
 54.1022 -        String type = (String)orderTypeDropDown.getValue();
 54.1023 -        
 54.1024 -        //grab the real-time prices for this pair name as a CurrencyPair instance
 54.1025 -        CurrencyPairCache cache = getSessionBean1().getCache();
 54.1026 -        CurrencyPair openPair = cache.getRealTimeCurrencyPair(name);
 54.1027 -        
 54.1028 -        //use the openPair to open a new position
 54.1029 -        Position openPosition = Position.createOpenPosition(openPair, amount.intValue(), type);
 54.1030 -        
 54.1031 -        //add the new position to the openPositions in session
 54.1032 -        getSessionBean1().addOpenPosition(openPosition);
 54.1033 -        
 54.1034 -        return null;
 54.1035 -    }
 54.1036 -
 54.1037 -    /**
 54.1038 -     * <p>Close the position in question, updating the open and closed positions
 54.1039 -     * in session.</p>
 54.1040 -     * @return The <code>null</code> outcome.
 54.1041 -     */
 54.1042 -    public String closeButton_action() {
 54.1043 -        //get the position id for the current row
 54.1044 -        RowKey currentRow = openPositionTableRowGroup.getRowKey();
 54.1045 -        String positionId = (String)getSessionBean1().getOpenPositionProvider().getValue("id", currentRow);
 54.1046 -        
 54.1047 -        //use the positionId to find the position in session
 54.1048 -        Position position = getSessionBean1().getOpenPosition(positionId);
 54.1049 -        String name = position.getName();
 54.1050 -        
 54.1051 -        //grab the real-time prices for this pair name as a CurrencyPair instance
 54.1052 -        CurrencyPairCache cache = getSessionBean1().getCache();
 54.1053 -        CurrencyPair closePair = cache.getRealTimeCurrencyPair(name);
 54.1054 -        
 54.1055 -        //determine if we are closing the whole position or just a portion of it
 54.1056 -        int amount = position.getAmount();
 54.1057 -        int floatingCloseAmount = position.getFloatingCloseAmount();
 54.1058 -        int diff = amount - floatingCloseAmount;
 54.1059 -        
 54.1060 -        if (diff == 0) {
 54.1061 -            //we are closing the whole position
 54.1062 -            position.close(closePair);
 54.1063 -            getSessionBean1().removeOpenPosition(position);
 54.1064 -            getSessionBean1().addClosedPosition(position);
 54.1065 -        }
 54.1066 -        else {
 54.1067 -            //we are closing just a portion of the position
 54.1068 -            //adjust amount
 54.1069 -            position.setAmount(diff);
 54.1070 -            
 54.1071 -            //create a new closed position and add it to the closed positions in session
 54.1072 -            Position closedPosition = Position.createClosedPosition(closePair, floatingCloseAmount, position.getType(), position.getOpenPrice());
 54.1073 -            getSessionBean1().addClosedPosition(closedPosition);
 54.1074 -        }
 54.1075 -        
 54.1076 -        return null;
 54.1077 -    }
 54.1078 -    
 54.1079 -    /**
 54.1080 -     * <p>A <code>boolean</code> indicating whether the current thread has been successfully 
 54.1081 -     * synchronized by the <code>ThreadSynchronizer</code>.</p>
 54.1082 -     */
 54.1083 -    private boolean currentThreadSynchronized;
 54.1084 -    
 54.1085 -    /**
 54.1086 -     * <p>The <code>TableDataProvider</code> implementation that holds
 54.1087 -     * a list of <code>CurrencyPair</code> instances to be rendered.</p>
 54.1088 -     */
 54.1089 -    private CurrencyPairListDataProvider currencyPairProvider = new CurrencyPairListDataProvider();
 54.1090 -    
 54.1091 -    /**
 54.1092 -     * <p>The id we will associate with this rendered page.</p>
 54.1093 -     */
 54.1094 -    private String initialRenderId;
 54.1095 -    
 54.1096 -    /**
 54.1097 -     * <p>Get the <code>TableDataProvider</code> implementation that holds
 54.1098 -     * a list of <code>CurrencyPair</code> instances to be rendered.</p>
 54.1099 -     */
 54.1100 -    public CurrencyPairListDataProvider getCurrencyPairProvider() {
 54.1101 -        return this.currencyPairProvider;
 54.1102 -    }
 54.1103 -    
 54.1104 -    /**
 54.1105 -     * <p>Get the id we will associate with this rendered page.
 54.1106 -     * This property is bound to a hidden field.</p>
 54.1107 -     */
 54.1108 -    public String getInitialRenderId() {
 54.1109 -        if (this.initialRenderId == null) {
 54.1110 -            this.initialRenderId = getSessionBean1().getInitialRenderId();
 54.1111 -        }
 54.1112 -        return this.initialRenderId;
 54.1113 -    }
 54.1114 -    
 54.1115 -    /**
 54.1116 -     * <p>Determine whether the current request is a poll request
 54.1117 -     * by examining the <code>form1:hiddenPollIndicator</code> and 
 54.1118 -     * <code>form1:hiddenRenderId</code> request parameters.</p>
 54.1119 -     */
 54.1120 -    private boolean isPollRequest() {
 54.1121 -        Map requestParameterMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
 54.1122 -        if (requestParameterMap.get("form1:hiddenRenderId") == null) {
 54.1123 -            //on the actual initial render, form1:hiddenRenderId will be null
 54.1124 -            //consider this like a poll request            
 54.1125 -            return true;
 54.1126 -        }
 54.1127 -        else {
 54.1128 -            String pollIndicatorText = (String)requestParameterMap.get("form1:hiddenPollIndicator");
 54.1129 -            return "pollRequest".equals(pollIndicatorText);
 54.1130 -        }
 54.1131 -    }
 54.1132 -}
 54.1133 -
    55.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/Position.java	Wed Feb 23 20:05:40 2011 -0500
    55.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.3 @@ -1,581 +0,0 @@
    55.4 -/*
    55.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    55.6 - *
    55.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    55.8 - *
    55.9 - * The contents of this file are subject to the terms of either the GNU
   55.10 - * General Public License Version 2 only ("GPL") or the Common
   55.11 - * Development and Distribution License("CDDL") (collectively, the
   55.12 - * "License"). You may not use this file except in compliance with the
   55.13 - * License. You can obtain a copy of the License at
   55.14 - * http://www.netbeans.org/cddl-gplv2.html
   55.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   55.16 - * specific language governing permissions and limitations under the
   55.17 - * License.  When distributing the software, include this License Header
   55.18 - * Notice in each file and include the License file at
   55.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   55.20 - * particular file as subject to the "Classpath" exception as provided
   55.21 - * by Sun in the GPL Version 2 section of the License file that
   55.22 - * accompanied this code. If applicable, add the following below the
   55.23 - * License Header, with the fields enclosed by brackets [] replaced by
   55.24 - * your own identifying information:
   55.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   55.26 - *
   55.27 - * Contributor(s):
   55.28 - *
   55.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   55.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   55.31 - * Microsystems, Inc. All Rights Reserved.
   55.32 - *
   55.33 - * If you wish your version of this file to be governed by only the CDDL
   55.34 - * or only the GPL Version 2, indicate your decision by adding
   55.35 - * "[Contributor] elects to include this software in this distribution
   55.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   55.37 - * single choice of license, a recipient has the option to distribute
   55.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   55.39 - * to extend the choice of license to its licensees as provided above.
   55.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   55.41 - * Version 2 license, then the option applies only if the new code is
   55.42 - * made subject to such option by the copyright holder.
   55.43 - */
   55.44 -
   55.45 -
   55.46 -package currencytrader;
   55.47 -
   55.48 -import com.sun.rave.web.ui.model.Option;
   55.49 -import java.io.Serializable;
   55.50 -import java.text.NumberFormat;
   55.51 -
   55.52 -/**
   55.53 - * <p>This class represents an open or closed position. In the currency trading 
   55.54 - * domain, a "position" is a trading transaction. A position is said to be
   55.55 - * "opened" when some amount of the primary currency (e.g., "EUR") in a 
   55.56 - * currency pair (e.g., "EUR/USD") is bought or sold. A position is said to be
   55.57 - * "closed" when the same or a lesser amount of the primary currency is traded
   55.58 - * in the inverse manner, that is, sold if the position was opened by buying and
   55.59 - * bought if the position was opened by selling.</p>
   55.60 - *
   55.61 - * <p>Components in the Open Positions and Closed Positions table on Page1 are
   55.62 - * bound to properties in this object via interceding 
   55.63 - * <code>TableDataProvider</code> instances in session.</p>
   55.64 - * @author mbohm
   55.65 - */
   55.66 -public class Position implements Serializable {
   55.67 -    
   55.68 -    /**
   55.69 -     * <p>Used to create position ids that are unique across all positions
   55.70 -     * across all users.</p>
   55.71 -     */
   55.72 -    private static int counter;
   55.73 -    
   55.74 -    /**
   55.75 -     * <p>Whether this position is open. The default value is <code>true</code>.</p>
   55.76 -     */
   55.77 -    private boolean open = true;
   55.78 -    
   55.79 -    /**
   55.80 -     * <p>The unique id for this position. The id is unique across all positions
   55.81 -     * across all users.</p>
   55.82 -     */
   55.83 -    private String id;
   55.84 -    
   55.85 -    /**
   55.86 -     * <p>The name of the currency pair for this position, such as 
   55.87 -     * "EUR/USD".</p>
   55.88 -     */
   55.89 -    private String name;
   55.90 -    
   55.91 -    /**
   55.92 -     * <p>The type of this position, namely, "Sell" or "Buy".</p>
   55.93 -     */ 
   55.94 -    private String type;
   55.95 -    
   55.96 -    /**
   55.97 -     * <p>The number of units (in thousands) of the primary currency that was
   55.98 -     * bought or sold when this position was opened (in the case of an 
   55.99 -     * open position) or closed (in the case of a closed position).</p>
  55.100 -     */
  55.101 -    private int amount;
  55.102 -    
  55.103 -    /**
  55.104 -     * <p>The number of units (in thousands) of the primary currency that would
  55.105 -     * be bought or sold if the position were closed now. This amount is meaningful
  55.106 -     * only when the position is still open.</p>
  55.107 -     */ 
  55.108 -    private int floatingCloseAmount;
  55.109 -    
  55.110 -    /**
  55.111 -     * <p>The sell price (in the case of a Sell position) or buy price (in the 
  55.112 -     * case of a Buy position) at the time the position was opened.</p>
  55.113 -     */
  55.114 -    private double openPrice;
  55.115 -    
  55.116 -    /**
  55.117 -     * <p>A <code>CurrencyPair</code> instance containing pricing information
  55.118 -     * (including whether prices have visibly changed since the previous 
  55.119 -     * poll request) for the currency pair applicable to this position.</p>
  55.120 -     * 
  55.121 -     */
  55.122 -    private CurrencyPair pair;
  55.123 -    
  55.124 -    /**
  55.125 -     * <p>The floating (in the case of an open position) or actual (in the case
  55.126 -     * of a closed postion) profit. In the currency trading domain, "floating 
  55.127 -     * profit" denotes the profit that would be sustained if the position were
  55.128 -     * closed now.</p>
  55.129 -     */
  55.130 -    private double profit;
  55.131 -    
  55.132 -    /**
  55.133 -     * <p>Denotes whether the current price has visibly increased, decreased,
  55.134 -     * or remained unchanged since the previous poll request. The "current 
  55.135 -     * price" is the current buy price in the case of a Sell trade and the 
  55.136 -     * current sell price in the case of a Buy trade.</p>
  55.137 -     */
  55.138 -    private String currentPriceVisibleChange;
  55.139 -    
  55.140 -    /**
  55.141 -     * <p>Denotes whether the floating profit has visibly increased, decreased,
  55.142 -     * or remained unchanged since the previous poll request.
  55.143 -     * In the currency trading domain, "floating 
  55.144 -     * profit" denotes the profit that would be sustained if the position were
  55.145 -     * closed now.</p>
  55.146 -     */
  55.147 -    private String floatingProfitVisibleChange;
  55.148 -    
  55.149 -    /**
  55.150 -     * <p>Get a position id that is unique across all positions across all
  55.151 -     * users. Synchronization on the <code>Position</code> class is used for 
  55.152 -     * this purpose.</p>
  55.153 -     * @return A position id that is unique across all positions across all
  55.154 -     * users.
  55.155 -     */
  55.156 -    private static String getNextId() {
  55.157 -        //synchronize to give all positions across all users a unique id
  55.158 -        synchronized (Position.class) {
  55.159 -            return String.valueOf(counter++);
  55.160 -        }
  55.161 -    }
  55.162 -    
  55.163 -    /**
  55.164 -     * <p>Create and return a <code>Position</code> instance representing
  55.165 -     * an open position.</p>
  55.166 -     * @param openPair A <code>CurrencyPair</code> instance containing pricing
  55.167 -     * information for the applicable currency pair.
  55.168 -     * @param amount The number of units (in thousands) of the primary currency
  55.169 -     * that are being bought or sold with the opening of the position.
  55.170 -     * @param type The type of the position, namely, "Sell" or "Buy".
  55.171 -     * @return The new <code>Position</code> instance.
  55.172 -     */
  55.173 -    public static Position createOpenPosition(CurrencyPair openPair, int amount, String type) {
  55.174 -        return new Position(openPair, amount, type);
  55.175 -    }
  55.176 -    
  55.177 -    /**
  55.178 -     * <p>Create and return a <code>Position</code> instance representing
  55.179 -     * a closed position.</p>
  55.180 -     * @param closePair A <code>CurrencyPair</code> instance containing pricing
  55.181 -     * information for the applicable currency pair.
  55.182 -     * @param amount The number of units (in thousands) of the primary currency
  55.183 -     * that are being bought or sold with the closing of the position.
  55.184 -     * @param type The type of the position, namely, "Sell" or "Buy".
  55.185 -     * @param openPrice The sell price (in the case of a Sell position) or buy price (in the 
  55.186 -     * case of a Buy position) at the time the position was opened.
  55.187 -     * @return The new <code>Position</code> instance.
  55.188 -     */
  55.189 -    public static Position createClosedPosition(CurrencyPair closePair, int amount, String type, double openPrice) {
  55.190 -        return new Position(closePair, amount, type, openPrice);
  55.191 -    }
  55.192 -    
  55.193 -    /**
  55.194 -     * <p>Constructs a <code>Position</code> instance representing an open
  55.195 -     * position.</p>
  55.196 -     * @param openPair A <code>CurrencyPair</code> instance containing pricing
  55.197 -     * information for the applicable currency pair.
  55.198 -     * @param amount The number of units (in thousands) of the primary currency
  55.199 -     * that are being bought or sold with the opening of the position.
  55.200 -     * @param type The type of the position, namely, "Sell" or "Buy".
  55.201 -     */
  55.202 -    private Position(CurrencyPair openPair, int amount, String type) {
  55.203 -        this.id = getNextId();
  55.204 -        this.name = openPair.getName();
  55.205 -        this.amount = amount;
  55.206 -        this.type = type;
  55.207 -        double openPrice;
  55.208 -        if ("Sell".equals(type)) {
  55.209 -            openPrice = openPair.getSellPrice();
  55.210 -        }
  55.211 -        else {
  55.212 -            openPrice = openPair.getBuyPrice();
  55.213 -        }
  55.214 -        this.openPrice = openPrice;
  55.215 -        this.floatingCloseAmount = amount; //default to amount
  55.216 -        update(openPair);
  55.217 -    }
  55.218 -    
  55.219 -    /**
  55.220 -     * <p>Constructs a <code>Position</code> instance representing a closed
  55.221 -     * position.</p>
  55.222 -     * @param closePair A <code>CurrencyPair</code> instance containing pricing
  55.223 -     * information for the applicable currency pair.
  55.224 -     * @param amount The number of units (in thousands) of the primary currency
  55.225 -     * that are being bought or sold with the closing of the position.
  55.226 -     * @param type The type of the position, namely, "Sell" or "Buy".
  55.227 -     * @param openPrice The sell price (in the case of a Sell position) or buy price (in the 
  55.228 -     * case of a Buy position) at the time the position was opened.
  55.229 -     */
  55.230 -    private Position(CurrencyPair closePair, int amount, String type, double openPrice) {
  55.231 -        this.id = getNextId();
  55.232 -        this.name = closePair.getName();
  55.233 -        this.amount = amount;
  55.234 -        this.type = type;
  55.235 -        this.openPrice = openPrice;
  55.236 -        //no need to set floatingCloseAmount
  55.237 -        close(closePair);
  55.238 -    }
  55.239 -    
  55.240 -    /**
  55.241 -     * <p>Get the unique id for this position. The id is unique across all positions
  55.242 -     * across all users.</p>
  55.243 -     * @return The unique id for this position.
  55.244 -     */
  55.245 -    public String getId() {
  55.246 -        return this.id;
  55.247 -    }
  55.248 -    
  55.249 -    /**
  55.250 -     * <p>Get the name of the currency pair for this position, such as 
  55.251 -     * "EUR/USD".</p>
  55.252 -     * @return The name of the currency pair for this position.
  55.253 -     */
  55.254 -    public String getName() {
  55.255 -        return this.name;
  55.256 -    }
  55.257 -    
  55.258 -    /**
  55.259 -     * <p>Get the number of units (in thousands) of the primary currency that was
  55.260 -     * bought or sold when this position was opened (in the case of an 
  55.261 -     * open position) or closed (in the case of a closed position).</p>
  55.262 -     * @return The number of units (in thousands) of the primary currency.
  55.263 -     */
  55.264 -    public int getAmount() {
  55.265 -        return this.amount;
  55.266 -    }
  55.267 -
  55.268 -    /**
  55.269 -     * <p>Set the number of units (in thousands) of the primary currency that 
  55.270 -     * remain open in this position.</p>
  55.271 -     * @param amount The number of units (in thousands) of the primary currency.
  55.272 -     */
  55.273 -    public void setAmount(int amount) {
  55.274 -        this.amount = amount;
  55.275 -        setFloatingCloseAmount(amount);
  55.276 -    }
  55.277 -
  55.278 -    /**
  55.279 -     * <p>Get the type of this position, namely, "Sell" or "Buy".</p>
  55.280 -     * @return The type of this position, namely, "Sell" or "Buy".
  55.281 -     */ 
  55.282 -    public String getType() {
  55.283 -        return this.type;
  55.284 -    }
  55.285 -
  55.286 -    /**
  55.287 -     * <p>Get the sell price (in the case of a Sell position) or buy price (in the 
  55.288 -     * case of a Buy position) at the time the position was opened.</p>
  55.289 -     * @return The relevant price at the time the position was opened.
  55.290 -     */
  55.291 -    public double getOpenPrice() {
  55.292 -        return this.openPrice;
  55.293 -    }
  55.294 -
  55.295 -    /**
  55.296 -     * <p>Get formatted text representing the open price.</p>
  55.297 -     * @return Formatted text representing the open price.
  55.298 -     */
  55.299 -    public String getOpenPriceText() {
  55.300 -        return getTextForPrice(this.openPrice);
  55.301 -    }
  55.302 -    
  55.303 -    /**
  55.304 -     * <p>Get formatted text representing the current price (in the case of 
  55.305 -     * an open position) or close price (in the case of a closed position).
  55.306 -     * The "current price" is the current buy price in the case of a Sell 
  55.307 -     * trade and the current sell price in the case of a Buy trade.</p>
  55.308 -     * @return Formatted text representing the current or close price, 
  55.309 -     * depending on whether the position is open or closed, respectively.
  55.310 -     */
  55.311 -    public String getClosePriceText() {
  55.312 -        double closePrice = getClosePrice();
  55.313 -        return getTextForPrice(closePrice);
  55.314 -    }
  55.315 -    
  55.316 -    /**
  55.317 -     * <p>Get whether the current price has visibly increased, decreased,
  55.318 -     * or remained unchanged since the previous poll request. The "current 
  55.319 -     * price" is the current buy price in the case of a Sell trade and the 
  55.320 -     * current sell price in the case of a Buy trade.</p>
  55.321 -     * @return Whether the current price has visibly increased, decreased,
  55.322 -     * or remained unchanged since the previous poll request.
  55.323 -     */
  55.324 -    public String getCurrentPriceVisibleChange() {
  55.325 -        return this.currentPriceVisibleChange;
  55.326 -    }
  55.327 -    
  55.328 -    /**
  55.329 -     * <p>Get the floating (in the case of an open position) or actual (in the case
  55.330 -     * of a closed postion) profit. In the currency trading domain, "floating 
  55.331 -     * profit" denotes the profit that would be sustained if the position were
  55.332 -     * closed now.</p>
  55.333 -     * @return The floating or actual profit, depending on whether the 
  55.334 -     * position is open or closed, respectively.
  55.335 -     */
  55.336 -    public double getProfit() {
  55.337 -        return this.profit;
  55.338 -    }
  55.339 -
  55.340 -    /**
  55.341 -     * <p>Get formatted text representing the floating (in the case of an open 
  55.342 -     * position) or actual (in the case of a closed postion) profit.
  55.343 -     * In the currency trading domain, "floating 
  55.344 -     * profit" denotes the profit that would be sustained if the position were
  55.345 -     * closed now.</p>
  55.346 -     * @return Formatted text representing the floating or actual profit, 
  55.347 -     * depending on whether the position is open or closed, respectively.
  55.348 -     */ 
  55.349 -    public String getProfitText() {
  55.350 -        return getTextForProfit(this.profit);
  55.351 -    }
  55.352 -    
  55.353 -    /**
  55.354 -     * <p>Get whether the floating profit has visibly increased, decreased,
  55.355 -     * or remained unchanged since the previous poll request.
  55.356 -     * In the currency trading domain, "floating 
  55.357 -     * profit" denotes the profit that would be sustained if the position were
  55.358 -     * closed now.</p>
  55.359 -     * @return Whether the floating profit has visibly increased, decreased,
  55.360 -     * or remained unchanged since the previous poll request.
  55.361 -     */
  55.362 -    public String getFloatingProfitVisibleChange() {
  55.363 -        return this.floatingProfitVisibleChange;
  55.364 -    }
  55.365 -    
  55.366 -    /**
  55.367 -     * <p>Get the number of units (in thousands) of the primary currency that would
  55.368 -     * be bought or sold if the position were closed now. This amount is meaningful
  55.369 -     * only when the position is still open.</p>
  55.370 -     * @return The number of units (in thousands) of the primary currency that would
  55.371 -     * be bought or sold if the position were closed now.
  55.372 -     */
  55.373 -    public int getFloatingCloseAmount() {
  55.374 -        return this.floatingCloseAmount;
  55.375 -    }
  55.376 -    
  55.377 -    /**
  55.378 -     * <p>Set the number of units (in thousands) of the primary currency that would
  55.379 -     * be bought or sold if the position were closed now. This amount is meaningful
  55.380 -     * only when the position is still open. Simply return if this position is 
  55.381 -     * closed or if the supplied <code>floatingCloseAmt</code> is greater than
  55.382 -     * <code>this.amount</code>. Otherwise, set <code>this.floatingCloseAmount</code>
  55.383 -     * and <code>this.profit</code> accordingly.</p>
  55.384 -     * @param floatingCloseAmt The number of units (in thousands) of the primary currency that would
  55.385 -     * be bought or sold if the position were closed now.
  55.386 -     */
  55.387 -    public void setFloatingCloseAmount(int floatingCloseAmt) {
  55.388 -        if (floatingCloseAmt > this.amount || !this.open) {
  55.389 -            return;
  55.390 -        }
  55.391 -
  55.392 -        this.floatingCloseAmount = floatingCloseAmt;
  55.393 -        this.profit = calculateProfit(true);
  55.394 -    }
  55.395 -    
  55.396 -    /**
  55.397 -     * <p>Get an array of <code>Option</code> instances representing the choices
  55.398 -     * to present in the floating close dropdown. Specifically, we present choices by the
  55.399 -     * hundred from <code>100</code> to <code>this.amount</code>. The <code>Option</code>
  55.400 -     * instances have an <code>Integer</code> value and a <code>String</code> label.</p>
  55.401 -     * @return An array of <code>Option</code> instances representing the choices to present
  55.402 -     * in the floating close dropdown.
  55.403 -     */
  55.404 -    public Option[] getFloatingCloseAmountOptions() {
  55.405 -        Option[] amountOptions = new Option[this.amount/100];
  55.406 -        for (int i = this.amount; i >= 100; i -= 100) {
  55.407 -            amountOptions[(i/100) - 1] = new Option(new Integer(i), String.valueOf(i));
  55.408 -        }
  55.409 -        return amountOptions;
  55.410 -    }
  55.411 -    
  55.412 -    /**
  55.413 -     * <p>Close the position. We assign the supplied
  55.414 -     * <code>currentPair</code> to <code>this.pair</code>, set <code>this.profit</code>
  55.415 -     * appropriately, and set <code>this.open</code> to <code>false</code>.</p>
  55.416 -     * @param currentPair A <code>CurrencyPair</code> instance containing
  55.417 -     * pricing information for the applicable currency pair.
  55.418 -     * @throws <code>NullPointerException</code> if the supplied <code>currentPair</code>
  55.419 -     * is <code>null</code>.
  55.420 -     * @throws <code>IllegalArgumentException</code> if the name of the supplied <code>currentPair</code>
  55.421 -     * is not equal to <code>this.name</code>.
  55.422 -     */
  55.423 -    public void close(CurrencyPair currentPair) {
  55.424 -        checkPair(currentPair);
  55.425 -        this.pair = currentPair;
  55.426 -        this.profit = calculateProfit(false);
  55.427 -        this.open = false;
  55.428 -    }
  55.429 -    
  55.430 -    /**
  55.431 -     * <p>Update the position to use the supplied <code>currentPair</code>, which
  55.432 -     * contains pricing information (including whether prices have visibly 
  55.433 -     * changed since the previous poll request) for the applicable currency 
  55.434 -     * pair. We assign the supplied <code>currentPair</code> to 
  55.435 -     * <code>this.pair</code> and set <code>this.profit</code>,
  55.436 -     * <code>this.currentPriceVisibleChange</code>, and 
  55.437 -     * <code>this.floatingProfitVisibleChange</code> appropriately.</p>
  55.438 -     * @param currentPair A <code>CurrencyPair</code> instance containing
  55.439 -     * pricing information for the applicable currency pair.
  55.440 -     * @throws <code>IllegalStateException</code> if the position is closed.
  55.441 -     * @throws <code>NullPointerException</code> if the supplied <code>currentPair</code>
  55.442 -     * is <code>null</code>.
  55.443 -     * @throws <code>IllegalArgumentException</code> if the name of the supplied <code>currentPair</code>
  55.444 -     * is not equal to <code>this.name</code>.
  55.445 -     */
  55.446 -    public void update(CurrencyPair currentPair) {
  55.447 -        if (!open) {
  55.448 -            throw new IllegalStateException("Position.updateRealTimeFields: position " + this.id + " is not open");
  55.449 -        }
  55.450 -        
  55.451 -        checkPair(currentPair);
  55.452 -        
  55.453 -        this.pair = currentPair;
  55.454 -        this.profit = calculateProfit(true);
  55.455 -        
  55.456 -        if ("Sell".equals(this.type)) {
  55.457 -            this.currentPriceVisibleChange = currentPair.getBuyPriceVisibleChange(); //inverse on purpose
  55.458 -
  55.459 -            //in a Sell position, floating profit varies inversely with buy price increase
  55.460 -            //due to the "buy low, sell high" principle
  55.461 -            if (CurrencyPair.VISIBLE_INCREASE.equals(this.currentPriceVisibleChange)) {
  55.462 -                this.floatingProfitVisibleChange = CurrencyPair.VISIBLE_DECREASE;
  55.463 -            }
  55.464 -            else if (CurrencyPair.VISIBLE_DECREASE.equals(this.currentPriceVisibleChange)) {
  55.465 -                this.floatingProfitVisibleChange = CurrencyPair.VISIBLE_INCREASE;
  55.466 -            }
  55.467 -            else {
  55.468 -                this.floatingProfitVisibleChange = CurrencyPair.VISIBLY_UNCHANGED;
  55.469 -            }
  55.470 -        }
  55.471 -        else {
  55.472 -            this.currentPriceVisibleChange = currentPair.getSellPriceVisibleChange();
  55.473 -            this.floatingProfitVisibleChange = this.currentPriceVisibleChange;
  55.474 -        }
  55.475 -    }    
  55.476 -    
  55.477 -    /**
  55.478 -     * <p>Calculate the floating or actual profit, depending on the supplied
  55.479 -     * boolean, in terms of USD. We calculate floating profit based on <code>this.floatingCloseAmount</code>
  55.480 -     * and actual profit based on <code>this.amount</code>. The calculation is also based
  55.481 -     * on <code>this.openPrice</code> as well as the current buy price (in the 
  55.482 -     * case of a Sell position) or sell price (in the case of a Buy position). If
  55.483 -     * the primary currency is "USD," the profit reaped (or loss endured) is in terms
  55.484 -     * of the other currency. In such cases, it is necessary to convert that profit
  55.485 -     * to USD by using it to buy USD.</p>
  55.486 -     * @param floating Whether we are calculating floating (as opposed to actual) profit.
  55.487 -     * @return The floating or actual profit, in terms of USD.
  55.488 -     */
  55.489 -    private double calculateProfit(boolean floating) {
  55.490 -        double currentSellPrice = this.pair.getSellPrice();
  55.491 -        double currentBuyPrice = this.pair.getBuyPrice();
  55.492 -        
  55.493 -        int floatingOrActualCloseAmount = floating ? this.floatingCloseAmount : this.amount;
  55.494 -        floatingOrActualCloseAmount *= 1000;
  55.495 -        
  55.496 -        double gain, cost;
  55.497 -        if ("Sell".equals(this.type)) {
  55.498 -            //your gain is when you sell, which in this case is when the position was opened.
  55.499 -            //so multiply the price at that time (this.openPrice) by the number of units (floatingOrActualCloseAmount).
  55.500 -            gain = this.openPrice * floatingOrActualCloseAmount;
  55.501 -            
  55.502 -            //your cost is when you buy. since we are calculating the profit that
  55.503 -            //would be sustained if we closed now, "when you buy" is effectively now.
  55.504 -            //so multiply the current buy price by the number of units (floatingOrActualCloseAmount).
  55.505 -            cost = currentBuyPrice * floatingOrActualCloseAmount;
  55.506 -        }
  55.507 -        else {
  55.508 -            //your gain is when you sell. since we are calculating the profit that
  55.509 -            //would be sustained if we closed now, "when you sell" is effectively now.
  55.510 -            //so multiply the current sell price by the number of units (floatingOrActualCloseAmount).
  55.511 -            gain = currentSellPrice * floatingOrActualCloseAmount;
  55.512 -            
  55.513 -            //your cost is when you buy, which in this case is when the position was opened.
  55.514 -            //so multiply the price at that time (this.openPrice) by the number of units (floatingOrActualCloseAmount).
  55.515 -            cost = this.openPrice * floatingOrActualCloseAmount;
  55.516 -        }
  55.517 -        
  55.518 -        double calculatedProfit = gain - cost;
  55.519 -        
  55.520 -        if (this.name.startsWith("USD")) { //example: USD/JPY
  55.521 -            //calculatedProfit is in terms of the other currency.
  55.522 -            //so we need to convert calculatedProfit to USD.
  55.523 -            //to convert it: you have a calculatedProfit in the other currency,
  55.524 -            //so use that money to buy USD.
  55.525 -            calculatedProfit = calculatedProfit / currentBuyPrice; //divide, say, 120 yen profit by 120 to calculate 1 dollar profit
  55.526 -        }
  55.527 -
  55.528 -        return calculatedProfit;
  55.529 -    }
  55.530 -    
  55.531 -    /**
  55.532 -     * <p>Get the current price (in the case of 
  55.533 -     * an open position) or close price (in the case of a closed position).
  55.534 -     * The "current price" is the current buy price in the case of a Sell 
  55.535 -     * trade and the current sell price in the case of a Buy trade.</p>
  55.536 -     * @return The current or close price, 
  55.537 -     * depending on whether the position is open or closed, respectively.
  55.538 -     */
  55.539 -    private double getClosePrice() {
  55.540 -        if ("Sell".equals(this.type)) {
  55.541 -            return this.pair.getBuyPrice();
  55.542 -        }
  55.543 -        else {
  55.544 -            return this.pair.getSellPrice();
  55.545 -        }
  55.546 -    }
  55.547 -    
  55.548 -    /**
  55.549 -     * <p>Get formatted text representing the supplied price.</p>
  55.550 -     * @param price The price for which we want formatted text.
  55.551 -     * @return Formatted text representing the supplied price.
  55.552 -     */
  55.553 -    private String getTextForPrice(double price) {
  55.554 -        return CurrencyPair.getTextForPrice(price);
  55.555 -    }
  55.556 -    
  55.557 -    /**
  55.558 -     * <p>Get formatted text representing the supplied profit figure.</p>
  55.559 -     * @param floatingOrActualProfit The profit figure for which we want formatted text.
  55.560 -     * @return Formatted text representing the supplied profit figure.
  55.561 -     */
  55.562 -    private String getTextForProfit(double floatingOrActualProfit) {
  55.563 -        return NumberFormat.getCurrencyInstance().format(floatingOrActualProfit); 
  55.564 -    }
  55.565 -    
  55.566 -    /**
  55.567 -     * <p>Check the supplied <code>currentPair</code> to ensure it is not
  55.568 -     * <code>null</code> and that its name equals the name of this position.</p>
  55.569 -     * @param currentPair A <code>CurrencyPair</code> instance containing
  55.570 -     * pricing information for the applicable currency pair.
  55.571 -     * @throws <code>NullPointerException</code> if the supplied <code>currentPair</code>
  55.572 -     * is <code>null</code>.
  55.573 -     * @throws <code>IllegalArgumentException</code> if the name of the supplied <code>currentPair</code>
  55.574 -     * is not equal to <code>this.name</code>.
  55.575 -     */
  55.576 -    private void checkPair(CurrencyPair currentPair) {
  55.577 -        if (currentPair == null) {
  55.578 -            throw new NullPointerException();
  55.579 -        }
  55.580 -        if (!this.name.equals(currentPair.getName())) {
  55.581 -            throw new IllegalArgumentException("name of position " + this.id + " is " + this.name + ", but supplied name of currentPair was " + currentPair.getName());
  55.582 -        }
  55.583 -    }
  55.584 -}
    56.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/PositionListDataProvider.java	Wed Feb 23 20:05:40 2011 -0500
    56.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.3 @@ -1,68 +0,0 @@
    56.4 -/*
    56.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    56.6 - *
    56.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    56.8 - *
    56.9 - * The contents of this file are subject to the terms of either the GNU
   56.10 - * General Public License Version 2 only ("GPL") or the Common
   56.11 - * Development and Distribution License("CDDL") (collectively, the
   56.12 - * "License"). You may not use this file except in compliance with the
   56.13 - * License. You can obtain a copy of the License at
   56.14 - * http://www.netbeans.org/cddl-gplv2.html
   56.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   56.16 - * specific language governing permissions and limitations under the
   56.17 - * License.  When distributing the software, include this License Header
   56.18 - * Notice in each file and include the License file at
   56.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   56.20 - * particular file as subject to the "Classpath" exception as provided
   56.21 - * by Sun in the GPL Version 2 section of the License file that
   56.22 - * accompanied this code. If applicable, add the following below the
   56.23 - * License Header, with the fields enclosed by brackets [] replaced by
   56.24 - * your own identifying information:
   56.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   56.26 - *
   56.27 - * Contributor(s):
   56.28 - *
   56.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   56.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   56.31 - * Microsystems, Inc. All Rights Reserved.
   56.32 - *
   56.33 - * If you wish your version of this file to be governed by only the CDDL
   56.34 - * or only the GPL Version 2, indicate your decision by adding
   56.35 - * "[Contributor] elects to include this software in this distribution
   56.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   56.37 - * single choice of license, a recipient has the option to distribute
   56.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   56.39 - * to extend the choice of license to its licensees as provided above.
   56.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   56.41 - * Version 2 license, then the option applies only if the new code is
   56.42 - * made subject to such option by the copyright holder.
   56.43 - */
   56.44 -
   56.45 -
   56.46 -package currencytrader;
   56.47 -
   56.48 -import com.sun.data.provider.impl.ObjectListDataProvider;
   56.49 -import java.beans.Beans;
   56.50 -import java.util.ArrayList;
   56.51 -import java.util.List;
   56.52 -
   56.53 -/**
   56.54 - *
   56.55 - * @author mbohm
   56.56 - */
   56.57 -public class PositionListDataProvider extends ObjectListDataProvider {
   56.58 -
   56.59 -    public PositionListDataProvider() {
   56.60 -        if (Beans.isDesignTime()) {
   56.61 -            List positionList = new ArrayList();
   56.62 -            Position openPosition = Position.createOpenPosition(new CurrencyPair("EUR/USD", 1.2752, 1.2755), 100, "Buy");
   56.63 -            positionList.add(openPosition);
   56.64 -            this.setList(positionList);
   56.65 -        }
   56.66 -    }
   56.67 -
   56.68 -    public PositionListDataProvider(List positionList) {
   56.69 -        super(positionList);
   56.70 -    }
   56.71 -}
    57.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/RequestBean1.java	Wed Feb 23 20:05:40 2011 -0500
    57.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    57.3 @@ -1,135 +0,0 @@
    57.4 -/*
    57.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    57.6 - *
    57.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    57.8 - *
    57.9 - * The contents of this file are subject to the terms of either the GNU
   57.10 - * General Public License Version 2 only ("GPL") or the Common
   57.11 - * Development and Distribution License("CDDL") (collectively, the
   57.12 - * "License"). You may not use this file except in compliance with the
   57.13 - * License. You can obtain a copy of the License at
   57.14 - * http://www.netbeans.org/cddl-gplv2.html
   57.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   57.16 - * specific language governing permissions and limitations under the
   57.17 - * License.  When distributing the software, include this License Header
   57.18 - * Notice in each file and include the License file at
   57.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   57.20 - * particular file as subject to the "Classpath" exception as provided
   57.21 - * by Sun in the GPL Version 2 section of the License file that
   57.22 - * accompanied this code. If applicable, add the following below the
   57.23 - * License Header, with the fields enclosed by brackets [] replaced by
   57.24 - * your own identifying information:
   57.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   57.26 - *
   57.27 - * Contributor(s):
   57.28 - *
   57.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   57.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   57.31 - * Microsystems, Inc. All Rights Reserved.
   57.32 - *
   57.33 - * If you wish your version of this file to be governed by only the CDDL
   57.34 - * or only the GPL Version 2, indicate your decision by adding
   57.35 - * "[Contributor] elects to include this software in this distribution
   57.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   57.37 - * single choice of license, a recipient has the option to distribute
   57.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   57.39 - * to extend the choice of license to its licensees as provided above.
   57.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   57.41 - * Version 2 license, then the option applies only if the new code is
   57.42 - * made subject to such option by the copyright holder.
   57.43 - */
   57.44 -
   57.45 -package currencytrader;
   57.46 -
   57.47 -import com.sun.rave.web.ui.appbase.AbstractRequestBean;
   57.48 -import javax.faces.FacesException;
   57.49 -
   57.50 -/**
   57.51 - * <p>Request scope data bean for your application.  Create properties
   57.52 - *  here to represent data that should be made available across different
   57.53 - *  pages in the same HTTP request, so that the page bean classes do not
   57.54 - *  have to be directly linked to each other.</p>
   57.55 - *
   57.56 - * <p>An instance of this class will be created for you automatically,
   57.57 - * the first time your application evaluates a value binding expression
   57.58 - * or method binding expression that references a managed bean using
   57.59 - * this class.</p>
   57.60 - */
   57.61 -public class RequestBean1 extends AbstractRequestBean {
   57.62 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   57.63 -    private int __placeholder;
   57.64 -    
   57.65 -    /**
   57.66 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   57.67 -     * This method is automatically generated, so any user-specified code inserted
   57.68 -     * here is subject to being replaced.</p>
   57.69 -     */
   57.70 -    private void _init() throws Exception {
   57.71 -    }
   57.72 -    // </editor-fold>
   57.73 -    
   57.74 -    /**
   57.75 -     * <p>Construct a new request data bean instance.</p>
   57.76 -     */
   57.77 -    public RequestBean1() {
   57.78 -    }
   57.79 -    
   57.80 -    /**
   57.81 -     * <p>This method is called when this bean is initially added to
   57.82 -     * request scope.  Typically, this occurs as a result of evaluating
   57.83 -     * a value binding or method binding expression, which utilizes the
   57.84 -     * managed bean facility to instantiate this bean and store it into
   57.85 -     * request scope.</p>
   57.86 -     *
   57.87 -     * <p>You may customize this method to allocate resources that are required
   57.88 -     * for the lifetime of the current request.</p>
   57.89 -     */
   57.90 -    public void init() {
   57.91 -        // Perform initializations inherited from our superclass
   57.92 -        super.init();
   57.93 -        // Perform application initialization that must complete
   57.94 -        // *before* managed components are initialized
   57.95 -        // TODO - add your own initialiation code here
   57.96 -        
   57.97 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
   57.98 -        // Initialize automatically managed components
   57.99 -        // *Note* - this logic should NOT be modified
  57.100 -        try {
  57.101 -            _init();
  57.102 -        } catch (Exception e) {
  57.103 -            log("RequestBean1 Initialization Failure", e);
  57.104 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  57.105 -        }
  57.106 -        
  57.107 -        // </editor-fold>
  57.108 -        // Perform application initialization that must complete
  57.109 -        // *after* managed components are initialized
  57.110 -        // TODO - add your own initialization code here
  57.111 -    }
  57.112 -    
  57.113 -    /**
  57.114 -     * <p>This method is called when this bean is removed from
  57.115 -     * request scope.  This occurs automatically when the corresponding
  57.116 -     * HTTP response has been completed and sent to the client.</p>
  57.117 -     *
  57.118 -     * <p>You may customize this method to clean up resources allocated
  57.119 -     * during the execution of the <code>init()</code> method, or
  57.120 -     * at any later time during the lifetime of the request.</p>
  57.121 -     */
  57.122 -    public void destroy() {
  57.123 -    }
  57.124 -
  57.125 -    /**
  57.126 -     * <p>Return a reference to the scoped data bean.</p>
  57.127 -     */
  57.128 -    protected SessionBean1 getSessionBean1() {
  57.129 -        return (SessionBean1)getBean("SessionBean1");
  57.130 -    }
  57.131 -
  57.132 -    /**
  57.133 -     * <p>Return a reference to the scoped data bean.</p>
  57.134 -     */
  57.135 -    protected ApplicationBean1 getApplicationBean1() {
  57.136 -        return (ApplicationBean1)getBean("ApplicationBean1");
  57.137 -    }
  57.138 -}
    58.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/SessionBean1.java	Wed Feb 23 20:05:40 2011 -0500
    58.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    58.3 @@ -1,368 +0,0 @@
    58.4 -/*
    58.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    58.6 - *
    58.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    58.8 - *
    58.9 - * The contents of this file are subject to the terms of either the GNU
   58.10 - * General Public License Version 2 only ("GPL") or the Common
   58.11 - * Development and Distribution License("CDDL") (collectively, the
   58.12 - * "License"). You may not use this file except in compliance with the
   58.13 - * License. You can obtain a copy of the License at
   58.14 - * http://www.netbeans.org/cddl-gplv2.html
   58.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   58.16 - * specific language governing permissions and limitations under the
   58.17 - * License.  When distributing the software, include this License Header
   58.18 - * Notice in each file and include the License file at
   58.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   58.20 - * particular file as subject to the "Classpath" exception as provided
   58.21 - * by Sun in the GPL Version 2 section of the License file that
   58.22 - * accompanied this code. If applicable, add the following below the
   58.23 - * License Header, with the fields enclosed by brackets [] replaced by
   58.24 - * your own identifying information:
   58.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   58.26 - *
   58.27 - * Contributor(s):
   58.28 - *
   58.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   58.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   58.31 - * Microsystems, Inc. All Rights Reserved.
   58.32 - *
   58.33 - * If you wish your version of this file to be governed by only the CDDL
   58.34 - * or only the GPL Version 2, indicate your decision by adding
   58.35 - * "[Contributor] elects to include this software in this distribution
   58.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   58.37 - * single choice of license, a recipient has the option to distribute
   58.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   58.39 - * to extend the choice of license to its licensees as provided above.
   58.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   58.41 - * Version 2 license, then the option applies only if the new code is
   58.42 - * made subject to such option by the copyright holder.
   58.43 - */
   58.44 -
   58.45 -package currencytrader;
   58.46 -
   58.47 -import com.sun.rave.web.ui.appbase.AbstractSessionBean;
   58.48 -import java.text.NumberFormat;
   58.49 -import java.util.ArrayList;
   58.50 -import java.util.HashMap;
   58.51 -import java.util.Iterator;
   58.52 -import java.util.List;
   58.53 -import java.util.Map;
   58.54 -import javax.faces.FacesException;
   58.55 -import threadmanagement.ThreadPriority;
   58.56 -import threadmanagement.ThreadSynchronizer;
   58.57 -
   58.58 -/**
   58.59 - * <p>Session scope data bean for your application.  Create properties
   58.60 - *  here to represent cached data that should be made available across
   58.61 - *  multiple HTTP requests for an individual user.</p>
   58.62 - *
   58.63 - * <p>An instance of this class will be created for you automatically,
   58.64 - * the first time your application evaluates a value binding expression
   58.65 - * or method binding expression that references a managed bean using
   58.66 - * this class.</p>
   58.67 - * @author mbohm
   58.68 - */
   58.69 -public class SessionBean1 extends AbstractSessionBean {
   58.70 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   58.71 -    private int __placeholder;
   58.72 -    
   58.73 -    /**
   58.74 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   58.75 -     * This method is automatically generated, so any user-specified code inserted
   58.76 -     * here is subject to being replaced.</p>
   58.77 -     */
   58.78 -    private void _init() throws Exception {
   58.79 -    }
   58.80 -    // </editor-fold>
   58.81 -    
   58.82 -    /**
   58.83 -     * <p>Construct a new session data bean instance.</p>
   58.84 -     */
   58.85 -    public SessionBean1() {
   58.86 -    }
   58.87 -    
   58.88 -    /**
   58.89 -     * <p>This method is called when this bean is initially added to
   58.90 -     * session scope.  Typically, this occurs as a result of evaluating
   58.91 -     * a value binding or method binding expression, which utilizes the
   58.92 -     * managed bean facility to instantiate this bean and store it into
   58.93 -     * session scope.</p>
   58.94 -     *
   58.95 -     * <p>You may customize this method to initialize and cache data values
   58.96 -     * or resources that are required for the lifetime of a particular
   58.97 -     * user session.</p>
   58.98 -     */
   58.99 -    public void init() {
  58.100 -        // Perform initializations inherited from our superclass
  58.101 -        super.init();
  58.102 -        // Perform application initialization that must complete
  58.103 -        // *before* managed components are initialized
  58.104 -        // TODO - add your own initialiation code here
  58.105 -        
  58.106 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  58.107 -        // Initialize automatically managed components
  58.108 -        // *Note* - this logic should NOT be modified
  58.109 -        try {
  58.110 -            _init();
  58.111 -        } catch (Exception e) {
  58.112 -            log("SessionBean1 Initialization Failure", e);
  58.113 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  58.114 -        }
  58.115 -        
  58.116 -        // </editor-fold>
  58.117 -        // Perform application initialization that must complete
  58.118 -        // *after* managed components are initialized
  58.119 -        // TODO - add your own initialization code here       
  58.120 -
  58.121 -        //set up the data providers, cache, and synchronizer
  58.122 -        openPositionProvider = new PositionListDataProvider(openPositionList);
  58.123 -        openPositionProvider.setObjectType(Position.class);
  58.124 -        closedPositionProvider = new PositionListDataProvider(closedPositionList);
  58.125 -        closedPositionProvider.setObjectType(Position.class);
  58.126 -        initCacheAndSynchronizer();
  58.127 -    }
  58.128 -    
  58.129 -    /**
  58.130 -     * <p>This method is called when the session containing it is about to be
  58.131 -     * passivated.  Typically, this occurs in a distributed servlet container
  58.132 -     * when the session is about to be transferred to a different
  58.133 -     * container instance, after which the <code>activate()</code> method
  58.134 -     * will be called to indicate that the transfer is complete.</p>
  58.135 -     *
  58.136 -     * <p>You may customize this method to release references to session data
  58.137 -     * or resources that can not be serialized with the session itself.</p>
  58.138 -     */
  58.139 -    public void passivate() {
  58.140 -    }
  58.141 -    
  58.142 -    /**
  58.143 -     * <p>This method is called when the session containing it was
  58.144 -     * reactivated.</p>
  58.145 -     *
  58.146 -     * <p>You may customize this method to reacquire references to session
  58.147 -     * data or resources that could not be serialized with the
  58.148 -     * session itself.</p>
  58.149 -     */
  58.150 -    public void activate() {
  58.151 -        //re-create the cache and synchronizer
  58.152 -        initCacheAndSynchronizer();
  58.153 -    }
  58.154 -    
  58.155 -    /**
  58.156 -     * <p>This method is called when this bean is removed from
  58.157 -     * session scope.  Typically, this occurs as a result of
  58.158 -     * the session timing out or being terminated by the application.</p>
  58.159 -     *
  58.160 -     * <p>You may customize this method to clean up resources allocated
  58.161 -     * during the execution of the <code>init()</code> method, or
  58.162 -     * at any later time during the lifetime of the application.</p>
  58.163 -     */
  58.164 -    public void destroy() {
  58.165 -    }
  58.166 -
  58.167 -    /**
  58.168 -     * <p>Return a reference to the scoped data bean.</p>
  58.169 -     */
  58.170 -    protected ApplicationBean1 getApplicationBean1() {
  58.171 -        return (ApplicationBean1)getBean("ApplicationBean1");
  58.172 -    }
  58.173 -    
  58.174 -    /**
  58.175 -     * <p>Used to produce unique render ids within this session.</p>
  58.176 -     */
  58.177 -    private int initialRenderCounter;
  58.178 -    
  58.179 -    /**
  58.180 -     * <p>A <code>java.util.Map</code> whose keys are position ids and whose values are
  58.181 -     * <code>Position</code> instances representing open positions.</p>
  58.182 -     */
  58.183 -    private Map openPositionMap = new HashMap();
  58.184 -    
  58.185 -    /**
  58.186 -     * <p>A <code>java.util.List</code> containing <code>Position</code>
  58.187 -     * instances representing open positions.</p>
  58.188 -     */
  58.189 -    private List openPositionList = new ArrayList();
  58.190 -    
  58.191 -    /**
  58.192 -     * <p>A <code>java.util.Map</code> whose keys are position ids and whose values are
  58.193 -     * <code>Position</code> instances representing closed positions.</p>
  58.194 -     */
  58.195 -    private Map closedPositionMap = new HashMap();
  58.196 -    
  58.197 -    /**
  58.198 -     * <p>A <code>java.util.List</code> containing <code>Position</code>
  58.199 -     * instances representing closed positions.</p>
  58.200 -     */
  58.201 -    private List closedPositionList = new ArrayList();
  58.202 -    
  58.203 -    /**
  58.204 -     * <p>A <code>CurrencyPairCache</code> instance that caches
  58.205 -     * currency pair pricing information. In the event that the session is 
  58.206 -     * "passivated," there is no need to serialize the cache; the cache can simply be
  58.207 -     * re-created once the session is activated. Therefore, this field is marked 
  58.208 -     * <code>transient</code>.</p>
  58.209 -     */
  58.210 -    private transient CurrencyPairCache cache;
  58.211 -    
  58.212 -    /**
  58.213 -     * <p>A <code>ThreadSynchronizer</code> instance that handles the
  58.214 -     * thread synchronization for the session, permitting one thread per session
  58.215 -     * to execute at a time. Methods of the synchronizer are invoked from the <code>init</code>
  58.216 -     * and <code>destroy</code> methods of <code>Page1</code>. Because the
  58.217 -     * synchronizer holds references to <code>Thread</code> instances for the
  58.218 -     * various requests, it cannot be serialized; therefore, this field is marked
  58.219 -     * <code>transient</code>. In the event that the session is 
  58.220 -     * "passivated," the synchronizer is re-created once the session is activated.</p>
  58.221 -     */
  58.222 -    private transient ThreadSynchronizer synchronizer;
  58.223 -    
  58.224 -    /**
  58.225 -     * <p>A <code>TableDataProvider</code> implementation that holds a
  58.226 -     * list of <code>Position</code> instances representing open positions.</p>
  58.227 -     */
  58.228 -    private PositionListDataProvider openPositionProvider = new PositionListDataProvider();
  58.229 -    
  58.230 -    /**
  58.231 -     * <p>A <code>TableDataProvider</code> implementation that holds a
  58.232 -     * list of <code>Position</code> instances representing closed positions.</p>
  58.233 -     */
  58.234 -    private PositionListDataProvider closedPositionProvider = new PositionListDataProvider();
  58.235 -    
  58.236 -    /**
  58.237 -     * <p>Get a render id that is unique within this session. The render id
  58.238 -     * identifies a particular rendered page associated with the session.
  58.239 -     * For example, if a user opens Page1
  58.240 -     * in two different browser tabs, two different render ids will be generated.
  58.241 -     * Identifying each rendered page in this way is necessary because 
  58.242 -     * information regarding whether a price has 
  58.243 -     * visibly changed since the previous poll request is applicable to a 
  58.244 -     * particular rendered page rather than the entire session.</p>
  58.245 -     * @return A render id that identifies a particular rendered page within the session.
  58.246 -     */
  58.247 -    public String getInitialRenderId() {
  58.248 -        return String.valueOf(initialRenderCounter++);
  58.249 -    }
  58.250 -
  58.251 -    /**
  58.252 -     * <p>Add a <code>Position</code> instance representing an open position
  58.253 -     * to <code>this.openPositionList</code> and <code>this.openPositionMap</code>.</p>
  58.254 -     * @param openPosition The open position to add.
  58.255 -     */
  58.256 -    public void addOpenPosition(Position openPosition) {
  58.257 -        this.openPositionList.add(openPosition);
  58.258 -        this.openPositionMap.put(openPosition.getId(), openPosition);
  58.259 -    }
  58.260 -    
  58.261 -    /**
  58.262 -     * <p>Remove a <code>Position</code> instance representing an open position
  58.263 -     * from <code>this.openPositionList</code> and <code>this.openPositionMap</code>.</p>
  58.264 -     * @param openPosition The open position to remove.
  58.265 -     */
  58.266 -    public void removeOpenPosition(Position openPosition) {
  58.267 -        this.openPositionList.remove(openPosition);
  58.268 -        this.openPositionMap.remove(openPosition.getId());
  58.269 -    }
  58.270 -    
  58.271 -    /**
  58.272 -     * <p>Add a <code>Position</code> instance representing a closed position
  58.273 -     * to <code>this.closedPositionList</code> and <code>this.closedPositionMap</code>.</p>
  58.274 -     * @param closedPosition The closed position to add.
  58.275 -     */
  58.276 -    public void addClosedPosition(Position closedPosition) {
  58.277 -        this.closedPositionList.add(closedPosition);
  58.278 -        this.closedPositionMap.put(closedPosition.getId(), closedPosition);
  58.279 -    }
  58.280 -    
  58.281 -    /**
  58.282 -     * <p>Get the <code>Position</code> instance representing the open position
  58.283 -     * with the supplied <code>id</code>.</p>
  58.284 -     * @param id The position id.
  58.285 -     * @return The position with the supplied id.
  58.286 -     */
  58.287 -    public Position getOpenPosition(String id) {
  58.288 -        return (Position)this.openPositionMap.get(id);
  58.289 -    }
  58.290 -    
  58.291 -    /**
  58.292 -     * <p>Get a <code>java.util.Iterator</code> to iterate over the
  58.293 -     * <code>Position</code> instances representing the open positions.</p>
  58.294 -     * @return A <code>java.util.Iterator</code> to iterate over the open positions.
  58.295 -     */
  58.296 -    public Iterator getOpenPositionsIterator() {
  58.297 -        return this.openPositionList.iterator();
  58.298 -    }
  58.299 -    
  58.300 -    /**
  58.301 -     * <p>Get formatted text representing the total profit figure sustained so 
  58.302 -     * far. The total profit figure is calculated by summing the profit figures 
  58.303 -     * of all closed positions.</p>
  58.304 -     * @return Formatted text representing the total profit figure sustained so 
  58.305 -     * far.
  58.306 -     */
  58.307 -    public String getTotalProfitText() {
  58.308 -        double totalProfit = 0;
  58.309 -        for (Iterator iter = this.closedPositionList.iterator(); iter.hasNext(); ) {
  58.310 -            Position closedPosition = (Position)iter.next();
  58.311 -            totalProfit += closedPosition.getProfit();
  58.312 -        }
  58.313 -        return NumberFormat.getCurrencyInstance().format(totalProfit);
  58.314 -    }
  58.315 -    
  58.316 -    /**
  58.317 -     * <p>Get a <code>CurrencyPairCache</code> instance that caches
  58.318 -     * currency pair pricing information for this session.</p>
  58.319 -     * @return A <code>CurrencyPairCache</code> instance that caches
  58.320 -     * currency pair pricing information for this session.
  58.321 -     */
  58.322 -    public CurrencyPairCache getCache() {
  58.323 -        return this.cache;
  58.324 -    }
  58.325 -    
  58.326 -    /**
  58.327 -     * <p>Get a <code>ThreadSynchronizer</code> instance that handles the
  58.328 -     * thread synchronization for the session, permitting one thread per session
  58.329 -     * to execute at a time. The synchronizer is used in the <code>init</code>
  58.330 -     * and <code>destroy</code> methods of <code>Page1</code>.</p>
  58.331 -     * @return A <code>ThreadSynchronizer</code> instance that handles the
  58.332 -     * thread synchronization for the session.
  58.333 -     */
  58.334 -    public ThreadSynchronizer getSynchronizer() {
  58.335 -        return this.synchronizer;
  58.336 -    }
  58.337 -    
  58.338 -    /**
  58.339 -     * <p>Get a <code>TableDataProvider</code> implementation that holds a
  58.340 -     * list of <code>Position</code> instances representing open positions.</p>
  58.341 -     * @return A <code>TableDataProvider</code> implementation that holds a
  58.342 -     * list of <code>Position</code> instances representing open positions.
  58.343 -     */
  58.344 -    public PositionListDataProvider getOpenPositionProvider() {
  58.345 -        return this.openPositionProvider;
  58.346 -    }
  58.347 -    
  58.348 -    /**
  58.349 -     * <p>Get a <code>TableDataProvider</code> implementation that holds a
  58.350 -     * list of <code>Position</code> instances representing closed positions.</p>
  58.351 -     * @return A <code>TableDataProvider</code> implementation that holds a
  58.352 -     * list of <code>Position</code> instances representing closed positions.
  58.353 -     */
  58.354 -    public PositionListDataProvider getClosedPositionProvider() {
  58.355 -        return this.closedPositionProvider;
  58.356 -    }
  58.357 -    
  58.358 -    /**
  58.359 -     * <p>Create instances of <code>CurrencyPairCache</code> and
  58.360 -     * <code>ThreadSynchronizer</code> and assign them to <code>this.cache</code>
  58.361 -     * and <code>this.synchronizer</code>, respectively. This method is invoked
  58.362 -     * from the <code>init</code> and <code>activate</code> methods of this class.</p>
  58.363 -     */
  58.364 -    private void initCacheAndSynchronizer() {
  58.365 -        this.cache = new CurrencyPairCache(getApplicationBean1().getService());
  58.366 -        //"gesture" requests (sent via the openButton, closeButton, or floatingCloseAmountDropDown)
  58.367 -        //have a higher priority than "poll" requests
  58.368 -        ThreadPriority[] priorities = {new ThreadPriority("gesture", true), new ThreadPriority("poll", false)};
  58.369 -        this.synchronizer = new ThreadSynchronizer(priorities, 10000L);   
  58.370 -    }
  58.371 -}
    59.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/currencytrader/VisibleChangeMap.java	Wed Feb 23 20:05:40 2011 -0500
    59.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    59.3 @@ -1,72 +0,0 @@
    59.4 -/*
    59.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    59.6 - *
    59.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    59.8 - *
    59.9 - * The contents of this file are subject to the terms of either the GNU
   59.10 - * General Public License Version 2 only ("GPL") or the Common
   59.11 - * Development and Distribution License("CDDL") (collectively, the
   59.12 - * "License"). You may not use this file except in compliance with the
   59.13 - * License. You can obtain a copy of the License at
   59.14 - * http://www.netbeans.org/cddl-gplv2.html
   59.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   59.16 - * specific language governing permissions and limitations under the
   59.17 - * License.  When distributing the software, include this License Header
   59.18 - * Notice in each file and include the License file at
   59.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   59.20 - * particular file as subject to the "Classpath" exception as provided
   59.21 - * by Sun in the GPL Version 2 section of the License file that
   59.22 - * accompanied this code. If applicable, add the following below the
   59.23 - * License Header, with the fields enclosed by brackets [] replaced by
   59.24 - * your own identifying information:
   59.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   59.26 - *
   59.27 - * Contributor(s):
   59.28 - *
   59.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   59.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   59.31 - * Microsystems, Inc. All Rights Reserved.
   59.32 - *
   59.33 - * If you wish your version of this file to be governed by only the CDDL
   59.34 - * or only the GPL Version 2, indicate your decision by adding
   59.35 - * "[Contributor] elects to include this software in this distribution
   59.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   59.37 - * single choice of license, a recipient has the option to distribute
   59.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   59.39 - * to extend the choice of license to its licensees as provided above.
   59.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   59.41 - * Version 2 license, then the option applies only if the new code is
   59.42 - * made subject to such option by the copyright holder.
   59.43 - */
   59.44 -
   59.45 -/*
   59.46 - * VisibleChangeMap.java
   59.47 - * 
   59.48 - * Created on May 4, 2007, 11:31:34 PM
   59.49 - * 
   59.50 - * To change this template, choose Tools | Template Manager
   59.51 - * and open the template in the editor.
   59.52 - */
   59.53 -
   59.54 -package currencytrader;
   59.55 -
   59.56 -import java.beans.Beans;
   59.57 -import java.util.HashMap;
   59.58 -
   59.59 -/**
   59.60 - *
   59.61 - * @author mbohm
   59.62 - */
   59.63 -public class VisibleChangeMap extends HashMap {
   59.64 -
   59.65 -    public VisibleChangeMap() {
   59.66 -        String unchanged = "/resources/blank.gif";
   59.67 -        if (Beans.isDesignTime()) {
   59.68 -            unchanged = "/resources/upArrow.jpg";
   59.69 -        }
   59.70 -        this.put(CurrencyPair.VISIBLY_UNCHANGED, unchanged);
   59.71 -        this.put(CurrencyPair.VISIBLE_INCREASE, "/resources/upArrow.jpg");
   59.72 -        this.put(CurrencyPair.VISIBLE_DECREASE, "/resources/downArrow.jpg");        
   59.73 -    }
   59.74 -
   59.75 -}
    60.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/threadmanagement/ThreadPriority.java	Wed Feb 23 20:05:40 2011 -0500
    60.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    60.3 @@ -1,101 +0,0 @@
    60.4 -/*
    60.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    60.6 - *
    60.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    60.8 - *
    60.9 - * The contents of this file are subject to the terms of either the GNU
   60.10 - * General Public License Version 2 only ("GPL") or the Common
   60.11 - * Development and Distribution License("CDDL") (collectively, the
   60.12 - * "License"). You may not use this file except in compliance with the
   60.13 - * License. You can obtain a copy of the License at
   60.14 - * http://www.netbeans.org/cddl-gplv2.html
   60.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   60.16 - * specific language governing permissions and limitations under the
   60.17 - * License.  When distributing the software, include this License Header
   60.18 - * Notice in each file and include the License file at
   60.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   60.20 - * particular file as subject to the "Classpath" exception as provided
   60.21 - * by Sun in the GPL Version 2 section of the License file that
   60.22 - * accompanied this code. If applicable, add the following below the
   60.23 - * License Header, with the fields enclosed by brackets [] replaced by
   60.24 - * your own identifying information:
   60.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   60.26 - *
   60.27 - * Contributor(s):
   60.28 - *
   60.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   60.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   60.31 - * Microsystems, Inc. All Rights Reserved.
   60.32 - *
   60.33 - * If you wish your version of this file to be governed by only the CDDL
   60.34 - * or only the GPL Version 2, indicate your decision by adding
   60.35 - * "[Contributor] elects to include this software in this distribution
   60.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   60.37 - * single choice of license, a recipient has the option to distribute
   60.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   60.39 - * to extend the choice of license to its licensees as provided above.
   60.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   60.41 - * Version 2 license, then the option applies only if the new code is
   60.42 - * made subject to such option by the copyright holder.
   60.43 - */
   60.44 -
   60.45 -package threadmanagement;
   60.46 -
   60.47 -/**
   60.48 - * <p>This class models a priority level for incoming request threads and is 
   60.49 - * used by the <code>ThreadSynchronizer</code> class.</p>
   60.50 - * @author mbohm
   60.51 - */
   60.52 -public class ThreadPriority {
   60.53 -    
   60.54 -    /**
   60.55 -     * <p>A name to identify this priority level.</p>
   60.56 -     */
   60.57 -    private String name;
   60.58 -    
   60.59 -    /**
   60.60 -     * <p>If <code>true</code>, request threads of this priority level must execute in 
   60.61 -     * the order they are received; otherwise, they may execute in any order.</p>
   60.62 -     */
   60.63 -    private boolean serviceInOrderReceived;
   60.64 -    
   60.65 -    /**
   60.66 -     * <p>Construct a <code>ThreadPriority</code> instance.</p>
   60.67 -     * @param name A name to identify this priority level.
   60.68 -     * @param serviceInOrderReceived If <code>true</code>, request threads of this priority level must execute in 
   60.69 -     * the order they are received; otherwise, they may execute in any order.
   60.70 -     */
   60.71 -    public ThreadPriority(String name, boolean serviceInOrderReceived) {
   60.72 -        this.name = name;
   60.73 -        this.serviceInOrderReceived = serviceInOrderReceived;
   60.74 -    }
   60.75 -    
   60.76 -    /**
   60.77 -     * <p>Get a name to identify this priority level.</p>
   60.78 -     * @return A name to identify this priority level.
   60.79 -     */
   60.80 -    public String getName() {
   60.81 -        return this.name;
   60.82 -    }
   60.83 -    
   60.84 -    /**
   60.85 -     * <p>Get whether request threads of this priority level must execute in 
   60.86 -     * the order they are received as opposed to executing in any order.</p>
   60.87 -     * @return <code>true</code> if request threads of this priority level must execute in 
   60.88 -     * the order they are received, <code>false</code> otherwise.
   60.89 -     */
   60.90 -    public boolean isServiceInOrderReceived() {
   60.91 -        return this.serviceInOrderReceived;
   60.92 -    }
   60.93 -    
   60.94 -    /**
   60.95 -     * <p>Get a <code>String</code> instance that identifies the values of the 
   60.96 -     * <code>name</code> and <code>serviceInOrderReceived</code> properties.</p>
   60.97 -     * @return A <code>String</code> instance that identifies the values of the 
   60.98 -     * <code>name</code> and <code>serviceInOrderReceived</code> properties.
   60.99 -     */
  60.100 -    public String toString() {
  60.101 -        return "[ThreadPriority:name=" + this.name + ",serviceInOrderReceived=" + this.serviceInOrderReceived + "]";
  60.102 -    }
  60.103 -    
  60.104 -}
    61.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/src/java/threadmanagement/ThreadSynchronizer.java	Wed Feb 23 20:05:40 2011 -0500
    61.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    61.3 @@ -1,441 +0,0 @@
    61.4 -/*
    61.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    61.6 - *
    61.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    61.8 - *
    61.9 - * The contents of this file are subject to the terms of either the GNU
   61.10 - * General Public License Version 2 only ("GPL") or the Common
   61.11 - * Development and Distribution License("CDDL") (collectively, the
   61.12 - * "License"). You may not use this file except in compliance with the
   61.13 - * License. You can obtain a copy of the License at
   61.14 - * http://www.netbeans.org/cddl-gplv2.html
   61.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   61.16 - * specific language governing permissions and limitations under the
   61.17 - * License.  When distributing the software, include this License Header
   61.18 - * Notice in each file and include the License file at
   61.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   61.20 - * particular file as subject to the "Classpath" exception as provided
   61.21 - * by Sun in the GPL Version 2 section of the License file that
   61.22 - * accompanied this code. If applicable, add the following below the
   61.23 - * License Header, with the fields enclosed by brackets [] replaced by
   61.24 - * your own identifying information:
   61.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   61.26 - *
   61.27 - * Contributor(s):
   61.28 - *
   61.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   61.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   61.31 - * Microsystems, Inc. All Rights Reserved.
   61.32 - *
   61.33 - * If you wish your version of this file to be governed by only the CDDL
   61.34 - * or only the GPL Version 2, indicate your decision by adding
   61.35 - * "[Contributor] elects to include this software in this distribution
   61.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   61.37 - * single choice of license, a recipient has the option to distribute
   61.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   61.39 - * to extend the choice of license to its licensees as provided above.
   61.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   61.41 - * Version 2 license, then the option applies only if the new code is
   61.42 - * made subject to such option by the copyright holder.
   61.43 - */
   61.44 -
   61.45 -package threadmanagement;
   61.46 -
   61.47 -import java.util.HashMap;
   61.48 -import java.util.LinkedList;
   61.49 -import java.util.List;
   61.50 -import java.util.Map;
   61.51 -
   61.52 -/**
   61.53 - * <p>This class manages multiple <code>Thread</code> instances, permitting one
   61.54 - * thread at a time to continue its normal execution while the others wait.
   61.55 - * In web applications, an instance of this class can be held in session scope and 
   61.56 - * used to permit only one thread associated with the session to execute at at time.
   61.57 - * In web applications (particularly JavaServer Faces applications) that implement <code>init</code> and
   61.58 - * <code>destroy</code> (or equivalent) lifecycle methods in request scope, this class can be used like so:</p>
   61.59 -<pre>public void init() {
   61.60 -    //...normal init logic goes here...
   61.61 -    ThreadSynchronizer synchronizer = getSessionBean1().getSynchronizer();
   61.62 -    ThreadPriority currentThreadPriority = ... ; //determine current thread priority
   61.63 -    this.currentThreadSynchronized = synchronizer.synchronizeCurrentThread(currentThreadPriority);
   61.64 -}
   61.65 -
   61.66 -public void destroy() {
   61.67 -    if (this.currentThreadSynchronized) {
   61.68 -        ThreadSynchronizer synchronizer = getSessionBean1().getSynchronizer();
   61.69 -        synchronizer.releaseCurrentThread();
   61.70 -    }
   61.71 -}
   61.72 -</pre>
   61.73 - * <p>The order in which threads are permitted to continue
   61.74 - * normal execution is based on their priority level, and, in the case of threads bearing a priority
   61.75 - * level for which the <code>serviceInOrderReceived</code> property is <code>true</code>,
   61.76 - * on the order in which such threads are received.</p>
   61.77 - *
   61.78 - * <p>Internally, this class maintains a <code>java.util.List</code> instance
   61.79 - * for each of its known priority levels. Invoking the <code>synchronizeCurrentThread</code>
   61.80 - * method either permits the current thread to continue normal execution or places it in
   61.81 - * the appropriate <code>java.util.List</code> instance and makes it wait. 
   61.82 - * Invoking the <code>releaseCurrentThread</code>
   61.83 - * method notifies any waiting threads that the current thread has completed 
   61.84 - * its normal execution, thereby causing the waiting threads to test whether they are next to 
   61.85 - * be permitted to continue executing normally.</p>
   61.86 - * 
   61.87 - * @author mbohm
   61.88 - */
   61.89 -public class ThreadSynchronizer {
   61.90 -    
   61.91 -    /**
   61.92 -     * <p>An array of <code>ThreadPriority</code> instances representing
   61.93 -     * this object's known priority levels.</p>
   61.94 -     */
   61.95 -    private ThreadPriority[] priorities;
   61.96 -    
   61.97 -    /**
   61.98 -     * <p>An array of <code>java.util.List</code> instances, where each instance 
   61.99 -     * represents a "bucket" in which threads of a particular priority level wait.
  61.100 -     * Because one bucket is established for each known priority level, 
  61.101 -     * this array has the same length as <code>this.priorities</code>.</p>
  61.102 -     */
  61.103 -    private List[] bucketArr;
  61.104 -    
  61.105 -    /**
  61.106 -     * <p>The thread currently completing its normal execution. Any other threads
  61.107 -     * associated with the session wait until its execution is complete.</p>
  61.108 -     */
  61.109 -    private Thread threadInProgress;
  61.110 -    
  61.111 -    /**
  61.112 -     * <p>The maximum time in milliseconds a thread may wait. If a thread's wait time exceeds this interval, 
  61.113 -     * <code>synchronizeCurrentThread</code> returns <code>false</code> and the thread continues its normal execution.
  61.114 -     * In such a case, that thread is not assigned to <code>this.threadInProgress</code>.</p>
  61.115 -     */
  61.116 -    private long waitTimeout;
  61.117 -    
  61.118 -    /**
  61.119 -     * <p>Whether we are debugging this class.</p>
  61.120 -     */
  61.121 -    private boolean debug;
  61.122 -    
  61.123 -    /**
  61.124 -     * <p>A counter that lets us number the threads for debugging purposes.</p>
  61.125 -     */
  61.126 -    private long debugThreadCounter;
  61.127 -    
  61.128 -    /**
  61.129 -     * <p>A <code>java.util.Map</code> whose keys are <code>Thread</code>
  61.130 -     * instances and whose values are <code>Long</code> instances indicating
  61.131 -     * the debug number assigned to the thread.</p>
  61.132 -     */
  61.133 -    private Map debugThreadMap;
  61.134 -
  61.135 -    /**
  61.136 -     * <p>Construct a <code>ThreadSynchronizer</code> instance.
  61.137 -     * We assign the <code>priorities</code>, <code>waitTimeout</code>, and
  61.138 -     * <code>debug</code> parameters to their corresponding member variables.
  61.139 -     * If <code>debug</code> is <code>true</code>, we initialize
  61.140 -     * <code>this.debugThreadMap</code>. We also initialize <code>this.bucketArr</code>
  61.141 -     * with the same length as <code>priorities</code>, and initialize
  61.142 -     * each of the members of <code>this.bucketArr</code> by instantiating a <code>java.util.LinkedList</code>.</p>
  61.143 -     * @param priorities An array of <code>ThreadPriority</code> instances representing
  61.144 -     * this object's known priority levels.
  61.145 -     * @param waitTimeout The maximum time in milliseconds a thread may wait.
  61.146 -     * @param debug Whether we are debugging this class.
  61.147 -     * @throws <code>NullPointerException</code> if <code>priorities</code> is <code>null</code>.
  61.148 -     * @throws <code>IllegalArgumentException</code> if <code>priorities</code> is zero-length.
  61.149 -     * @throws <code>IllegalArgumentException</code> if <code>priorities</code> contains duplicate instances of <code>ThreadPriority</code>.
  61.150 -     */
  61.151 -    public ThreadSynchronizer(ThreadPriority[] priorities, long waitTimeout, boolean debug) {
  61.152 -        if (priorities == null) {
  61.153 -            throw new NullPointerException();
  61.154 -        }
  61.155 -        if (priorities.length == 0) {
  61.156 -            throw new IllegalArgumentException("priorities was length 0");
  61.157 -        }
  61.158 -        //prevent duplicate ThreadPriority instances
  61.159 -        for (int i = 0; i < priorities.length - 1; i++) {   //don't test the last one
  61.160 -            for (int j = i + 1; j < priorities.length; j++) {
  61.161 -                if (priorities[i] == priorities[j]) {
  61.162 -                    throw new IllegalArgumentException("priorities[" + i + "] and  [" + j + "] were duplicates");
  61.163 -                }
  61.164 -            }
  61.165 -        }
  61.166 -        this.priorities = priorities;
  61.167 -        this.waitTimeout = waitTimeout;
  61.168 -        this.debug = debug;
  61.169 -        if (this.debug) {
  61.170 -            this.debugThreadMap = new HashMap();
  61.171 -        }
  61.172 -        this.bucketArr = new List[this.priorities.length];
  61.173 -        for (int i = 0; i < this.bucketArr.length; i++) {
  61.174 -            this.bucketArr[i] = new LinkedList();
  61.175 -        }
  61.176 -    }
  61.177 -    
  61.178 -    /**
  61.179 -     * <p>Construct a <code>ThreadSynchronizer</code> instance by 
  61.180 -     * invoking <code>this(priorities, waitTimeout, false)</code>, thus defaulting
  61.181 -     * <code>debug</code> to <code>false</code>.</p>
  61.182 -     * @param priorities An array of <code>ThreadPriority</code> instances representing
  61.183 -     * this object's known priority levels.
  61.184 -     * @param waitTimeout The maximum time in milliseconds a thread may wait.
  61.185 -     * @throws <code>NullPointerException</code> if <code>priorities</code> is <code>null</code>.
  61.186 -     * @throws <code>IllegalArgumentException</code> if <code>priorities</code> is zero-length.
  61.187 -     * @throws <code>IllegalArgumentException</code> if <code>priorities</code> contains duplicate instances of <code>ThreadPriority</code>.
  61.188 -     */
  61.189 -    public ThreadSynchronizer(ThreadPriority[] priorities, long waitTimeout) {
  61.190 -        this(priorities, waitTimeout, false);
  61.191 -    }
  61.192 -    
  61.193 -    /**
  61.194 -     * <p>Get an array of <code>ThreadPriority</code> instances representing
  61.195 -     * this object's known priority levels.</p>
  61.196 -     * @return This object's known priority levels.
  61.197 -     */
  61.198 -    public ThreadPriority[] getPriorities() {
  61.199 -        return this.priorities;
  61.200 -    }
  61.201 -    
  61.202 -    /**
  61.203 -     * <p>Notify any waiting threads that the current thread has completed its 
  61.204 -     * normal execution. This method should only (and must) be invoked after
  61.205 -     * previously invoking <code>synchronizeCurrentThread</code> and receiving a return
  61.206 -     * value of <code>true</code>. We set <code>this.threadInProgress</code> to
  61.207 -     * <code>null</code> and call <code>notify</code> on <code>this.bucketArr</code>.
  61.208 -     * The latter causes any waiting threads to test whether they are next to 
  61.209 -     * be permitted to continue executing normally.</p> 
  61.210 -     */
  61.211 -    public void releaseCurrentThread() {
  61.212 -        synchronized (bucketArr) {
  61.213 -            this.threadInProgress = null;
  61.214 -            if (this.debug) {
  61.215 -                log("Thread " + getDebugCurrentThreadNumber() + " is now released");
  61.216 -            }
  61.217 -            this.bucketArr.notify();
  61.218 -        }
  61.219 -    }
  61.220 -    
  61.221 -    /**
  61.222 -     * <p>Either assign the current thread to <code>this.threadInProgress</code> and
  61.223 -     * let it continue its normal execution or
  61.224 -     * add it to the appropriate "bucket" and make it wait. In the latter case,
  61.225 -     * if the current thread finishes waiting its turn without exceeding the 
  61.226 -     * <code>this.waitTimeout</code> interval, assign the current thread to <code>this.threadInProgress</code> and
  61.227 -     * let it continue its normal execution.</p>
  61.228 -     * @param priority The priority level of the current thread.
  61.229 -     * @throws <code>IllegalArgumentException</code> if the supplied priority is unknown to this <code>ThreadSynchronizer</code> instance.
  61.230 -     * @return <code>true</code> if the current thread has been assigned to <code>this.threadInProgress</code> and is thus
  61.231 -     * considered the thread of record completing its normal execution, <code>false</code> otherwise.
  61.232 -     */
  61.233 -    public boolean synchronizeCurrentThread(ThreadPriority priority) {
  61.234 -        synchronized (bucketArr) {
  61.235 -            try {
  61.236 -                Thread currentThread = Thread.currentThread();
  61.237 -                assignDebugCurrentThreadNumber();
  61.238 -                int ourPriority = getPriorityIndex(priority);
  61.239 -                if (canCurrentThreadProceed(ourPriority, false)) {
  61.240 -                    if (this.debug) {
  61.241 -                        String priorityMessage = priority.getName() == null ? (" with priorityIndex " + ourPriority) : (" with priority '" + priority.getName() + "'");
  61.242 -                        log("Thread " + getDebugCurrentThreadNumber() + priorityMessage + " is new and is proceeding");
  61.243 -                    }
  61.244 -                    this.threadInProgress = currentThread;
  61.245 -                    return true;
  61.246 -                }
  61.247 -                else {
  61.248 -                    return queueCurrentThreadAndWait(priority);
  61.249 -                }
  61.250 -            }
  61.251 -            catch (Exception e) {
  61.252 -                e.printStackTrace();
  61.253 -                return false;
  61.254 -            }
  61.255 -        }
  61.256 -    }
  61.257 -    
  61.258 -    /**
  61.259 -     * <p>Determine whether the current thread can continue its normal execution
  61.260 -     * now. If it cannot, then it must wait. If <code>this.threadInProgress</code>
  61.261 -     * is not <code>null</code>, then another thread is the thread of record completing
  61.262 -     * its normal execution, in which case return <code>false</code>. Otherwise,
  61.263 -     * loop through the buckets in <code>this.bucketArr</code>, proceeding from the bucket for
  61.264 -     * threads of the highest priority to the bucket for threads of the lowest priority.
  61.265 -     * If we encounter a non-empty bucket that is for threads of a higher 
  61.266 -     * priority than the current thread, then that means there are threads waiting of a higher
  61.267 -     * priority than the current thread, in which case
  61.268 -     * return <code>false</code>. If we encounter the bucket for threads of the 
  61.269 -     * same priority as the current thread, return <code>true</code> if 
  61.270 -     * one of the following is true (otherwise return <code>false</code>):</p>
  61.271 -     * <ul>
  61.272 -     * <li>the bucket for threads of the 
  61.273 -     * same priority as the current thread is empty (in which case there are no other threads 
  61.274 -     * waiting with the same priority
  61.275 -     * as the current thread)</li>
  61.276 -     * <li>this thread has already
  61.277 -     * been queued (and thus is in the bucket in question) and
  61.278 -     * the <code>serviceInOrderReceived</code> property of that bucket's
  61.279 -     * corresponding <code>ThreadPriority</code> is <code>false</code></li>
  61.280 -     * <li>this thread has already
  61.281 -     * been queued (and thus is in the bucket in question) and
  61.282 -     * the <code>serviceInOrderReceived</code> property of that bucket's
  61.283 -     * corresponding <code>ThreadPriority</code> is <code>true</code> <strong>and</strong> 
  61.284 -     * the current thread is the thread in that bucket that has been waiting the longest.</li>
  61.285 -     * </ul>
  61.286 -     * @param ourPriority The zero-based index of the current thread's priority level.
  61.287 -     * @param alreadyQueued <code>true</code> if this method is being invoked from <code>queueCurrentThreadAndWait</code>, 
  61.288 -     * <code>false</code> if it is being invoked from <code>synchronizeCurrentThread</code>.
  61.289 -     * @return Whether the current thread can continue its normal execution
  61.290 -     * now.
  61.291 -     */
  61.292 -    private boolean canCurrentThreadProceed(int ourPriority, boolean alreadyQueued) {
  61.293 -        synchronized (this.bucketArr) {
  61.294 -            if (this.threadInProgress != null) {
  61.295 -                return false;
  61.296 -            }
  61.297 -            //examine each bucket
  61.298 -            //go from "highest" priority to "lowest"
  61.299 -            for (int i = 0; i < this.bucketArr.length; i++) {
  61.300 -                List bucket = this.bucketArr[i];
  61.301 -                if (ourPriority > i)  { //ours is a lower priority than the current bucket
  61.302 -                    if (bucket.size() > 0) {
  61.303 -                        return false;
  61.304 -                    }
  61.305 -                    //else continue on to examine next bucket
  61.306 -                }
  61.307 -                else if (ourPriority == i) {
  61.308 -                    if (bucket.size() > 0) {
  61.309 -                        if (!alreadyQueued) {
  61.310 -                            return false;
  61.311 -                        }
  61.312 -                        else {
  61.313 -                            if (this.priorities[i].isServiceInOrderReceived()) {
  61.314 -                                if (bucket.get(0) == Thread.currentThread()) {
  61.315 -                                    return true;
  61.316 -                                }
  61.317 -                                else {
  61.318 -                                    return false;
  61.319 -                                }
  61.320 -                            }
  61.321 -                            else {
  61.322 -                                return true;
  61.323 -                            }
  61.324 -                        }
  61.325 -                    }
  61.326 -                    else {
  61.327 -                        return true;
  61.328 -                    }
  61.329 -                }
  61.330 -                else {
  61.331 -                    return true;    //should not be reachable
  61.332 -                }
  61.333 -            }
  61.334 -        }
  61.335 -        return true;    //should not be reachable
  61.336 -    }
  61.337 -    
  61.338 -    /**
  61.339 -     * <p>Add the current thread to the appropriate "bucket" and make it wait.
  61.340 -     * If the current thread finishes waiting its turn without exceeding the 
  61.341 -     * <code>this.waitTimeout</code> interval, remove it from the bucket, 
  61.342 -     * assign it to <code>this.threadInProgress</code> (thus making it
  61.343 -     * the thread of record completing its normal execution), and
  61.344 -     * return <code>true</code>, thereby
  61.345 -     * letting it continue its normal execution. If the current thread's wait 
  61.346 -     * time exceeds the <code>this.waitTimeout</code> interval, 
  61.347 -     * remove it from the bucket and 
  61.348 -     * return <code>false</code>, thereby letting it continue its normal 
  61.349 -     * execution, but not as the thread of record completing its normal execution.</p>
  61.350 -     * @param priority The priority level of the current thread.
  61.351 -     * @throws <code>IllegalArgumentException</code> if the supplied priority is unknown to this <code>ThreadSynchronizer</code> instance.
  61.352 -     * @return <code>true</code> if the current thread has been assigned to <code>this.threadInProgress</code> and is thus
  61.353 -     * considered the thread of record completing its normal execution, <code>false</code> otherwise.
  61.354 -     */
  61.355 -    private boolean queueCurrentThreadAndWait(ThreadPriority priority) throws InterruptedException {
  61.356 -        synchronized (this.bucketArr) {
  61.357 -            int ourPriority = getPriorityIndex(priority);
  61.358 -            Thread currentThread = Thread.currentThread();
  61.359 -            
  61.360 -            //add currentThread to correct bucket
  61.361 -            this.bucketArr[ourPriority].add(currentThread);
  61.362 -
  61.363 -            while(true) {
  61.364 -                if (this.debug) {
  61.365 -                    String priorityMessage = priority.getName() == null ? (" with priorityIndex " + ourPriority) : (" with priority '" + priority.getName() + "'");
  61.366 -                    log("Thread " + getDebugCurrentThreadNumber() + priorityMessage + " in queue will now wait");
  61.367 -                }
  61.368 -                long time1 = System.currentTimeMillis();
  61.369 -                this.bucketArr.wait(this.waitTimeout);
  61.370 -                long time2 = System.currentTimeMillis();
  61.371 -                if (time2 - time1 >= waitTimeout) {
  61.372 -                    //remove current thread from appropriate bucket
  61.373 -                    this.bucketArr[ourPriority].remove(currentThread);
  61.374 -                    
  61.375 -                    //return false without assigning currentThread to this.threadInProgress
  61.376 -                    if (this.debug) {
  61.377 -                        log("Thread " + getDebugCurrentThreadNumber() + " in queue waited too long. waited for: " + (time2 - time1));
  61.378 -                    }
  61.379 -                    return false;
  61.380 -                }
  61.381 -                if (canCurrentThreadProceed(ourPriority, true)) {
  61.382 -                    //remove current thread from appropriate bucket
  61.383 -                    this.bucketArr[ourPriority].remove(currentThread);
  61.384 -
  61.385 -                    //set current thread as thread in progress
  61.386 -                    if (this.debug) {
  61.387 -                        log("Thread " + getDebugCurrentThreadNumber() + " in queue will now proceed");
  61.388 -                    }
  61.389 -                    this.threadInProgress = currentThread;
  61.390 -                    return true;
  61.391 -                }
  61.392 -            }
  61.393 -        }
  61.394 -    }
  61.395 -
  61.396 -    /**
  61.397 -     * <p>Get the zero-based index of the supplied <code>priority</code> in 
  61.398 -     * <code>this.priorities</code>.</p>
  61.399 -     * @param priority The <code>ThreadPriority</code> instance whose index we want to find in <code>this.priorities</code>.
  61.400 -     * @throws <code>IllegalArgumentException</code> if the supplied priority is unknown to this <code>ThreadSynchronizer</code> instance.
  61.401 -     * @return The zero-based index of the supplied <code>priority</code> in 
  61.402 -     * <code>this.priorities</code>.
  61.403 -     */
  61.404 -    private int getPriorityIndex(ThreadPriority priority) {
  61.405 -        for (int i = 0; i < this.priorities.length; i++) {
  61.406 -            if (this.priorities[i] == priority) {
  61.407 -                return i;
  61.408 -            }
  61.409 -        }
  61.410 -        throw new IllegalArgumentException("unknown ThreadPriority: " + priority);
  61.411 -    }
  61.412 -    
  61.413 -    /**
  61.414 -     * <p>If we are debugging this class, use <code>this.debugThreadCounter</code> to place an entry for the current
  61.415 -     * thread in <code>this.debugThreadMap</code>.</p>
  61.416 -     */
  61.417 -    private void assignDebugCurrentThreadNumber() {
  61.418 -        if (this.debug) {
  61.419 -            Long threadNumber = new Long(this.debugThreadCounter++);
  61.420 -            this.debugThreadMap.put(Thread.currentThread(), threadNumber);
  61.421 -        }
  61.422 -    }
  61.423 -    
  61.424 -    /**
  61.425 -     * <p>If we are debugging this class, return the debugging number
  61.426 -     * assigned to the current thread as a <code>Long</code> instance; otherwise return <code>null</code>.</p>
  61.427 -     * @return The debugging number assigned to the current thread if we are debugging this class or <code>null</code> otherwise.
  61.428 -     */
  61.429 -    private Long getDebugCurrentThreadNumber() {
  61.430 -        if (this.debug) {
  61.431 -            return (Long)this.debugThreadMap.get(Thread.currentThread());
  61.432 -        }
  61.433 -        return null;
  61.434 -    }
  61.435 -    
  61.436 -    /**
  61.437 -     * <p>Log the supplied <code>message</code>. We use <code>System.out.println</code>
  61.438 -     * here for this purpose.</p>
  61.439 -     * @param message The message to log.
  61.440 -     */
  61.441 -    private void log(String message) {
  61.442 -        System.out.println(message);
  61.443 -    }
  61.444 -}
    62.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/web/Page1.jsp	Wed Feb 23 20:05:40 2011 -0500
    62.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.3 @@ -1,148 +0,0 @@
    62.4 -<?xml version="1.0" encoding="UTF-8"?>
    62.5 -<jsp:root version="1.2" xmlns:df="http://java.sun.com/jsf/dynamicfaces" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
    62.6 -    xmlns:jsfExt="http://java.sun.com/jsf/extensions/dynafaces" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    62.7 -    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    62.8 -    <f:view>
    62.9 -        <ui:page binding="#{Page1.page1}" id="page1">
   62.10 -            <ui:html binding="#{Page1.html1}" id="html1">
   62.11 -                <ui:head binding="#{Page1.head1}" id="head1">
   62.12 -                    <ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
   62.13 -                    <ui:script binding="#{Page1.script1}" id="script1" url="/resources/currencytrader.js"/>
   62.14 -                    <df:ajaxTransaction binding="#{Page1.pollTx}" execute="none" id="pollTx"
   62.15 -                        inputs="page1:html1:body1:form1:hiddenPollIndicator,page1:html1:body1:form1:hiddenRenderId" postReplace="customPostReplace"
   62.16 -                        render="page1:html1:body1:form1:openPositionZone:openPositionTable,page1:html1:body1:form1:exchangeRateTable" replaceElement="customReplace"/>
   62.17 -                </ui:head>
   62.18 -                <ui:body binding="#{Page1.body1}" id="body1" onLoad="startPolling();" onUnload="stopPolling();" style="-rave-layout: grid">
   62.19 -                    <ui:form binding="#{Page1.form1}" id="form1" virtualFormsConfig="">
   62.20 -                        <ui:table augmentTitle="false" binding="#{Page1.exchangeRateTable}" id="exchangeRateTable"
   62.21 -                            style="left: 24px; top: 240px; position: absolute; width: 420px" title="Exchange Rates" width="420">
   62.22 -                            <ui:tableRowGroup binding="#{Page1.exchangeRateTableRowGroup}" id="exchangeRateTableRowGroup" rows="10"
   62.23 -                                sourceData="#{Page1.currencyPairProvider}" sourceVar="currentRow">
   62.24 -                                <ui:tableColumn binding="#{Page1.exchangeRateCurrencyColumn}" headerText="Currency" id="exchangeRateCurrencyColumn">
   62.25 -                                    <ui:staticText binding="#{Page1.exchangeRateCurrencyText}" id="exchangeRateCurrencyText" text="#{currentRow.value['name']}"/>
   62.26 -                                </ui:tableColumn>
   62.27 -                                <ui:tableColumn binding="#{Page1.exchangeRateSellColumn}" headerText="Sell" id="exchangeRateSellColumn" width="140">
   62.28 -                                    <ui:image binding="#{Page1.exchangeRateSellImage}" height="12" id="exchangeRateSellImage"
   62.29 -                                        style="padding-left: 5px; float:right"
   62.30 -                                        url="#{ApplicationBean1.visibleChangeImageSrcMap[currentRow.value['sellPriceVisibleChange']]}" width="11"/>
   62.31 -                                    <ui:staticText binding="#{Page1.exchangeRateSellText}" escape="false" id="exchangeRateSellText" text="#{currentRow.value['sellPriceText']}"/>
   62.32 -                                </ui:tableColumn>
   62.33 -                                <ui:tableColumn binding="#{Page1.exchangeRateBuyColumn}" headerText="Buy" id="exchangeRateBuyColumn" width="140">
   62.34 -                                    <ui:image binding="#{Page1.exchangeRateBuyImage}" height="12" id="exchangeRateBuyImage"
   62.35 -                                        style="padding-left: 5px; float:right"
   62.36 -                                        url="#{ApplicationBean1.visibleChangeImageSrcMap[currentRow.value['buyPriceVisibleChange']]}" width="11"/>
   62.37 -                                    <ui:staticText binding="#{Page1.exchangeRateBuyText}" escape="false" id="exchangeRateBuyText" text="#{currentRow.value['buyPriceText']}"/>
   62.38 -                                </ui:tableColumn>
   62.39 -                            </ui:tableRowGroup>
   62.40 -                        </ui:table>
   62.41 -                        <jsfExt:ajaxZone binding="#{Page1.openAPositionPanelZone}" collectPostData="customCollectPostData" id="openAPositionPanelZone"
   62.42 -                            inspectElement="customInspectElementForPanelZone" render="form1:openPositionZone" style="border: 1px dotted gray; height: 94px; left: 24px; top: 480px; position: absolute; width: 430px; -rave-layout: grid">
   62.43 -                            <ui:staticText binding="#{Page1.orderPairNameText}" id="orderPairNameText" style="left: 24px; top: 24px; position: absolute" text="Currency"/>
   62.44 -                            <ui:dropDown binding="#{Page1.orderPairNameDropDown}" id="orderPairNameDropDown" items="#{ApplicationBean1.pairNameOptions}" style="left: 24px; top: 48px; position: absolute"/>
   62.45 -                            <ui:staticText binding="#{Page1.orderTypeText}" id="orderTypeText" style="left: 144px; top: 24px; position: absolute" text="Sell/Buy"/>
   62.46 -                            <ui:dropDown binding="#{Page1.orderTypeDropDown}" id="orderTypeDropDown" items="#{ApplicationBean1.typeOptions}" style="left: 144px; top: 48px; position: absolute"/>
   62.47 -                            <ui:staticText binding="#{Page1.orderAmountText}" id="orderAmountText" style="left: 240px; top: 24px; position: absolute" text="Amount (thousands)"/>
   62.48 -                            <ui:dropDown binding="#{Page1.orderAmountDropDown}" converter="#{Page1.integerConverter1}" id="orderAmountDropDown"
   62.49 -                                items="#{ApplicationBean1.amountOptions}" style="left: 240px; top: 48px; position: absolute"/>
   62.50 -                            <ui:button action="#{Page1.openButton_action}" binding="#{Page1.openButton}" id="openButton"
   62.51 -                                style="margin: 10px; left: 350px; top: 38px; position: absolute" text="Open"/>
   62.52 -                        </jsfExt:ajaxZone>
   62.53 -                        <jsfExt:ajaxZone binding="#{Page1.openPositionZone}" collectPostData="customCollectPostData" id="openPositionZone"
   62.54 -                            render="form1:openPositionZone,form1:closedPositionZone,form1:totalProfitZone" style="height: 118px; left: 24px; top: 600px; position: absolute; -rave-layout: grid; width:710px">
   62.55 -                            <ui:table augmentTitle="false" binding="#{Page1.openPositionTable}" id="openPositionTable"
   62.56 -                                style="left: 0px; top: 24px; position: absolute" title="Open Positions" width="710">
   62.57 -                                <ui:tableRowGroup binding="#{Page1.openPositionTableRowGroup}" emptyDataMsg="There are no open positions."
   62.58 -                                    id="openPositionTableRowGroup" rows="10" sourceData="#{SessionBean1.openPositionProvider}" sourceVar="currentRow">
   62.59 -                                    <ui:tableColumn binding="#{Page1.openPositionCurrencyColumn}" headerText="Currency" id="openPositionCurrencyColumn">
   62.60 -                                        <ui:staticText binding="#{Page1.openPositionCurrencyText}" id="openPositionCurrencyText" text="#{currentRow.value['name']}"/>
   62.61 -                                    </ui:tableColumn>
   62.62 -                                    <ui:tableColumn binding="#{Page1.openPositionAmountColumn}" headerText="Amount (thousands)" id="openPositionAmountColumn">
   62.63 -                                        <ui:staticText binding="#{Page1.openPositionAmountText}" id="openPositionAmountText" text="#{currentRow.value['amount']}"/>
   62.64 -                                    </ui:tableColumn>
   62.65 -                                    <ui:tableColumn binding="#{Page1.openPositionTypeColumn}" headerText="Sell/Buy" id="openPositionTypeColumn">
   62.66 -                                        <ui:staticText binding="#{Page1.openPositionTypeText}" id="openPositionTypeText" text="#{currentRow.value['type']}"/>
   62.67 -                                    </ui:tableColumn>
   62.68 -                                    <ui:tableColumn binding="#{Page1.openPositionOpenPriceColumn}" headerText="Open Price" id="openPositionOpenPriceColumn">
   62.69 -                                        <ui:staticText binding="#{Page1.openPositionOpenPriceText}" id="openPositionOpenPriceText" text="#{currentRow.value['openPriceText']}"/>
   62.70 -                                    </ui:tableColumn>
   62.71 -                                    <ui:tableColumn binding="#{Page1.currentPriceColumn}" headerText="Current Price" id="currentPriceColumn" width="110">
   62.72 -                                        <ui:image binding="#{Page1.currentPriceImage}" height="12" id="currentPriceImage" style="padding-left: 5px; float:right"
   62.73 -                                            url="#{ApplicationBean1.visibleChangeImageSrcMap[currentRow.value['currentPriceVisibleChange']]}" width="11"/>
   62.74 -                                        <ui:staticText binding="#{Page1.currentPriceText}" escape="false" id="currentPriceText" text="#{currentRow.value['closePriceText']}"/>
   62.75 -                                    </ui:tableColumn>
   62.76 -                                    <ui:tableColumn binding="#{Page1.floatingProfitColumn}" headerText="Floating Profit" id="floatingProfitColumn" width="160">
   62.77 -                                        <ui:image binding="#{Page1.floatingProfitImage}" height="12" id="floatingProfitImage"
   62.78 -                                            style="padding-left: 5px; float:right"
   62.79 -                                            url="#{ApplicationBean1.visibleChangeImageSrcMap[currentRow.value['floatingProfitVisibleChange']]}" width="11"/>
   62.80 -                                        <ui:staticText binding="#{Page1.floatingProfitText}" escape="false" id="floatingProfitText" text="#{currentRow.value['profitText']}"/>
   62.81 -                                    </ui:tableColumn>
   62.82 -                                    <ui:tableColumn binding="#{Page1.floatingCloseAmountColumn}" headerText="Close Amount" id="floatingCloseAmountColumn">
   62.83 -                                        <ui:dropDown binding="#{Page1.floatingCloseAmountDropDown}" converter="#{Page1.integerConverter1}"
   62.84 -                                            id="floatingCloseAmountDropDown" items="#{currentRow.value['floatingCloseAmountOptions']}" selected="#{currentRow.value['floatingCloseAmount']}"/>
   62.85 -                                    </ui:tableColumn>
   62.86 -                                    <ui:tableColumn binding="#{Page1.closeColumn}" headerText="Close" id="closeColumn">
   62.87 -                                        <ui:button action="#{Page1.closeButton_action}" binding="#{Page1.closeButton}" id="closeButton" text="Close"/>
   62.88 -                                    </ui:tableColumn>
   62.89 -                                </ui:tableRowGroup>
   62.90 -                            </ui:table>
   62.91 -                        </jsfExt:ajaxZone>
   62.92 -                        <jsfExt:ajaxZone binding="#{Page1.closedPositionZone}" id="closedPositionZone" style="height: 118px; left: 754px; top: 600px; position: absolute; width: 348px; -rave-layout: grid">
   62.93 -                            <ui:table augmentTitle="false" binding="#{Page1.closedPositionTable}" id="closedPositionTable"
   62.94 -                                style="left: 0px; top: 24px; position: absolute; width: 1px" title="Closed Positions" width="1">
   62.95 -                                <ui:tableRowGroup binding="#{Page1.closedPositionTableRowGroup}" emptyDataMsg="There are no closed positions."
   62.96 -                                    id="closedPositionTableRowGroup" rows="10" sourceData="#{SessionBean1.closedPositionProvider}" sourceVar="currentRow">
   62.97 -                                    <ui:tableColumn binding="#{Page1.closedPositionCurrencyColumn}" headerText="Currency" id="closedPositionCurrencyColumn">
   62.98 -                                        <ui:staticText binding="#{Page1.closedPositionCurrencyText}" id="closedPositionCurrencyText" text="#{currentRow.value['name']}"/>
   62.99 -                                    </ui:tableColumn>
  62.100 -                                    <ui:tableColumn binding="#{Page1.closedPositionAmountColumn}" headerText="Amount (thousands)" id="closedPositionAmountColumn">
  62.101 -                                        <ui:staticText binding="#{Page1.closedPositionAmountText}" id="closedPositionAmountText" text="#{currentRow.value['amount']}"/>
  62.102 -                                    </ui:tableColumn>
  62.103 -                                    <ui:tableColumn binding="#{Page1.closedPositionTypeColumn}" headerText="Sell/Buy" id="closedPositionTypeColumn">
  62.104 -                                        <ui:staticText binding="#{Page1.closedPositionTypeText}" id="closedPositionTypeText" text="#{currentRow.value['type']}"/>
  62.105 -                                    </ui:tableColumn>
  62.106 -                                    <ui:tableColumn binding="#{Page1.closedPositionOpenPriceColumn}" headerText="Open Price" id="closedPositionOpenPriceColumn">
  62.107 -                                        <ui:staticText binding="#{Page1.closedPositionOpenPriceText}" id="closedPositionOpenPriceText" text="#{currentRow.value['openPriceText']}"/>
  62.108 -                                    </ui:tableColumn>
  62.109 -                                    <ui:tableColumn binding="#{Page1.closedPositionClosePriceColumn}" headerText="Close Price" id="closedPositionClosePriceColumn">
  62.110 -                                        <ui:staticText binding="#{Page1.closedPositionClosePriceText}" id="closedPositionClosePriceText" text="#{currentRow.value['closePriceText']}"/>
  62.111 -                                    </ui:tableColumn>
  62.112 -                                    <ui:tableColumn binding="#{Page1.profitColumn}" headerText="Profit" id="profitColumn">
  62.113 -                                        <ui:staticText binding="#{Page1.profitText}" id="profitText" text="#{currentRow.value['profitText']}"/>
  62.114 -                                    </ui:tableColumn>
  62.115 -                                </ui:tableRowGroup>
  62.116 -                            </ui:table>
  62.117 -                        </jsfExt:ajaxZone>
  62.118 -                        <jsfExt:ajaxZone binding="#{Page1.totalProfitZone}" id="totalProfitZone" style="height: 22px; left: 24px; top: 180px; position: absolute; width: 142px; -rave-layout: grid">
  62.119 -                            <ui:staticText binding="#{Page1.totalProfitLabelText}" id="totalProfitLabelText"
  62.120 -                                style="color: rgb(43, 73, 107); font-size: 8pt; font-weight: normal; left: 3px; top: 2px; position: absolute;" text="Total Profit:"/>
  62.121 -                            <ui:staticText binding="#{Page1.totalProfitDisplayText}" id="totalProfitDisplayText"
  62.122 -                                style="color: rgb(43, 73, 107); font-size: 18px; left: 96px; top: -1px; position: absolute" text="#{SessionBean1.totalProfitText}"/>
  62.123 -                        </jsfExt:ajaxZone>
  62.124 -                        <ui:staticText binding="#{Page1.openAPositionPanelText}" id="openAPositionPanelText"
  62.125 -                            style="color: gray; left: 24px; top: 465px; position: absolute" text="Open a Position"/>
  62.126 -                        <ui:hiddenField binding="#{Page1.hiddenPollIndicator}" id="hiddenPollIndicator" text="pollRequest"/>
  62.127 -                        <ui:hiddenField binding="#{Page1.hiddenRenderId}" id="hiddenRenderId" text="#{Page1.initialRenderId}"/>
  62.128 -                        <h:panelGrid binding="#{Page1.headerPanel1}" id="headerPanel1" style="left: 0px; top: 0px; position: absolute">
  62.129 -                            <h:panelGrid binding="#{Page1.titlePanel1}" columns="1" id="titlePanel1"
  62.130 -                                style="background-image: url(resources/masthead_background.gif); height: 120px" width="744">
  62.131 -                                <ui:staticText binding="#{Page1.appNameText}" id="appNameText"
  62.132 -                                    style="color: rgb(255, 255, 255); font-family: 'Georgia','Times New Roman','times',serif; font-size: 24px; font-weight: bold" text="Currency Trader"/>
  62.133 -                                <ui:staticText binding="#{Page1.tagLineText}" id="tagLineText"
  62.134 -                                    style="color: rgb(255, 255, 255); font-family: Georgia,'Times New Roman',times,serif; font-size: 10px; font-weight: bold" text="Powered by NetBeans Visual Web and Dynamic Faces Technology"/>
  62.135 -                            </h:panelGrid>
  62.136 -                            <h:panelGrid binding="#{Page1.subPanel1}" columns="3" id="subPanel1" style="height: 24px; background-color: rgb(221, 226, 238);" width="744">
  62.137 -                                <h:panelGrid binding="#{Page1.spacingPanel1}" id="spacingPanel1" style="height: 15px" width="431"/>
  62.138 -                                <ui:imageHyperlink binding="#{Page1.imageHyperlink2}" id="imageHyperlink2" imageURL="resources/home.gif"
  62.139 -                                    style="background-color: rgb(221, 226, 238); color: rgb(0, 0, 0); font-family: 'Georgia','Times New Roman','times',serif; font-size: 10px; font-weight: bold"
  62.140 -                                    text="Home" url="http://www.netbeans.org"/>
  62.141 -                                <ui:imageHyperlink binding="#{Page1.imageHyperlink1}" id="imageHyperlink1" imageURL="resources/help.gif"
  62.142 -                                    style="background-color: rgb(221, 226, 238); color: rgb(0, 0, 0); font-family: 'Georgia','Times New Roman','times',serif; font-size: 10px; font-weight: bold"
  62.143 -                                    text="Help" url="/Readme.html"/>
  62.144 -                            </h:panelGrid>
  62.145 -                        </h:panelGrid>
  62.146 -                    </ui:form>
  62.147 -                </ui:body>
  62.148 -            </ui:html>
  62.149 -        </ui:page>
  62.150 -    </f:view>
  62.151 -</jsp:root>
    63.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/web/Readme.html	Wed Feb 23 20:05:40 2011 -0500
    63.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    63.3 @@ -1,48 +0,0 @@
    63.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    63.5 -
    63.6 -<html>
    63.7 -  <head>
    63.8 -    <title>Currency Trader -- readme</title>
    63.9 -  </head>
   63.10 -  <body>
   63.11 -
   63.12 -<P STYLE="border-top: none; border-bottom: 1px solid #000000; border-left: none; border-right: none; padding-top: 0in; padding-bottom: 0.03in; padding-left: 0in; padding-right: 0in">
   63.13 -<BR><BR>
   63.14 -</P>
   63.15 -<P STYLE="border-top: none; border-bottom: 1px solid #000000; border-left: none; border-right: none; padding-top: 0in; padding-bottom: 0.03in; padding-left: 0in; padding-right: 0in">
   63.16 -<B>README</B></P>
   63.17 -
   63.18 -<p><B>Currency Trader</B> is an example that demonstrates how to 
   63.19 -employ Ajax techniques with Ajax-unaware JavaServer Faces components using NetBeans Visual Web and Dynamic Faces technology. The example employs both the Ajax Zone and Ajax Transaction components. The example comprises one rendered page and is entirely Ajax-based; no conventional page submissions occur.
   63.20 -</p>
   63.21 -<p>
   63.22 -The Currency Trader example simulates real-time foreign exchange trading. The Exchange Rates table lists various currency pairs (such as EUR/USD) along with their sell and buy prices. The prices denote the exchange rate to sell or buy one unit of the primary currency, the first of the two currencies in the pair. For example, a sell price
   63.23 -of 1.2752 for EUR/USD denotes that a trader receives 1.2752 US dollars (USD) when selling one Euro (EUR). Similarly, a buy price of 1.2755 for EUR/USD denotes that a trader pays 1.2755 US dollars (USD) when buying one Euro (EUR). As another example, a sell price
   63.24 -of 112.31 for USD/JPY denotes that a trader receives 112.31 Japanese Yen (JPY) when selling one US dollar (USD). Similarly, a buy price of 112.35 for USD/JPY denotes that a trader pays 112.35 Japanese Yen (JPY) when buying one US dollar (USD).
   63.25 -</p>
   63.26 -<p>
   63.27 -Ajax requests poll the server every few seconds to retrieve the latest exchange rates and update the web page Document Object Model (DOM). 
   63.28 -When a sell or buy price changes, up or down arrows display to give a visual sign of the change.
   63.29 -</p>
   63.30 -<p>
   63.31 -There are two types of currency trades: Buy and Sell. In a Buy trade, the trader buys some amount of the primary currency and later sells that amount (or less) of the primary currency. The idea is to buy low and sell high in order to make a profit. For example, a trader might buy 100,000 Euros (paying, say, 125,000 US dollars) and later sell that same amount of Euros. If the trader receives, say, 126,000 US dollars from the sale, the trader profits 1,000 US dollars.
   63.32 -</p>
   63.33 -<p>
   63.34 -Similarly, in a Sell trade, the trader initially sells some amount of the primary currency and later buys back that amount (or less) of the primary currency. Again, the idea is to buy back the primary currency at a lower rate in order to make a profit. For example, a trader might sell 100,000 Euros (receiving, say, 125,000 US dollars) and later buy back that same amount of Euros. If the trader pays, say, 120,000 US dollars in the buyback, the trader profits 5,000 US dollars.
   63.35 -</p>
   63.36 -<p>
   63.37 -When the trader initiates the first exchange (buying the primary currency in the case of a Buy trade or selling the primary currency in the case of a Sell trade), it is known as <i>opening a position.</i> When the trader initiates the second exchange (selling the primary currency in the case of a Buy trade or buying back the primary currency in the case of a Sell trade), it is known as <i>closing a position</i>. Once a position is closed, the trader sustains a profit or loss from the trade.
   63.38 -</p>
   63.39 -<p>
   63.40 -To open a position in the Currency Trader example, use the dropdowns in the panel labeled <i>Open a Position</i> to choose a currency pair, the type of trade (Sell or Buy), and an amount. 
   63.41 -Then click the Open button. The position appears in the Open Positions table below. The position displays the <i>open price,</i> which is the relevant price (the sell price in the case of a Sell trade or the buy price in the case of a Buy trade) at the time the position was opened. The position also displays the <i>current price,</i> which is the relevant price (the buy price in the case of a Sell trade or the sell price in the case of a Buy trade) the trader would sustain if the trader were to close the position at the present time. You will notice that as exchange rates are updated in the Exchange Rates table, the corresponding figures are also updated in the Current Price column of the Open Positions table. Again, up or down arrows display to give a visual sign of the change.
   63.42 -</p>
   63.43 -<p>
   63.44 -Each open position also displays a <i>floating profit</i> figure. This is the profit (or loss) the trader would sustain if the trader were to close the position at the present time. Since the floating profit is calculated based on the current price, when exchange rates are updated in the Exchange Rates table and the Current Price column of the Open Positions table, the corresponding figures in the Floating Profit column are also updated. Again, up or down arrows display to give a visual sign of the change. The floating profit is also calculated based on the amount selected in the Close Amount dropdown, which is the amount of the primary currency the trader intends to sell or buy back in order to close the trade. When the trader changes the selection in the Close Amount dropdown, an Ajax request is sent to the server to recalculate the floating profit and update the web page Document Object Model (DOM). When the trader clicks the Close button, a closed position is created. The open position is either removed  from the Open Positions table or the figure in the Amount column is adjusted by subtracting the figure in the Close Amount dropdown. At the same time, a new position appears in the Closed Positions table, and the Total Profit figure at the top of the page is updated. Again, all updates to the page are achieved via Ajax requests leveraging Dynamic Faces technology. No conventional page submissions occur.
   63.45 -</p>
   63.46 -<p>For information on installing and running the example, see the accompanying online technical article "Installing the Currency Trader Sample Application."</p>
   63.47 -<!-- "Exploring" article is not yet available.
   63.48 -<p>For more information, see the accompanying online technical article "Exploring the Currency Trader Sample Application."</p>
   63.49 --->
   63.50 -  </body>
   63.51 -</html>
    64.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/web/WEB-INF/faces-config.xml	Wed Feb 23 20:05:40 2011 -0500
    64.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    64.3 @@ -1,31 +0,0 @@
    64.4 -<?xml version='1.0' encoding='UTF-8'?>
    64.5 -
    64.6 -
    64.7 -<!DOCTYPE faces-config PUBLIC
    64.8 -  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    64.9 -  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
   64.10 -
   64.11 -<!-- =========== FULL CONFIGURATION FILE ================================== -->
   64.12 -
   64.13 -<faces-config>
   64.14 -    <managed-bean>
   64.15 -        <managed-bean-name>SessionBean1</managed-bean-name>
   64.16 -        <managed-bean-class>currencytrader.SessionBean1</managed-bean-class>
   64.17 -        <managed-bean-scope>session</managed-bean-scope>
   64.18 -    </managed-bean>
   64.19 -    <managed-bean>
   64.20 -        <managed-bean-name>Page1</managed-bean-name>
   64.21 -        <managed-bean-class>currencytrader.Page1</managed-bean-class>
   64.22 -        <managed-bean-scope>request</managed-bean-scope>
   64.23 -    </managed-bean>
   64.24 -    <managed-bean>
   64.25 -        <managed-bean-name>RequestBean1</managed-bean-name>
   64.26 -        <managed-bean-class>currencytrader.RequestBean1</managed-bean-class>
   64.27 -        <managed-bean-scope>request</managed-bean-scope>
   64.28 -    </managed-bean>
   64.29 -    <managed-bean>
   64.30 -        <managed-bean-name>ApplicationBean1</managed-bean-name>
   64.31 -        <managed-bean-class>currencytrader.ApplicationBean1</managed-bean-class>
   64.32 -        <managed-bean-scope>application</managed-bean-scope>
   64.33 -    </managed-bean>
   64.34 -</faces-config>
    65.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/web/WEB-INF/sun-web.xml	Wed Feb 23 20:05:40 2011 -0500
    65.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.3 @@ -1,11 +0,0 @@
    65.4 -<?xml version="1.0" encoding="UTF-8"?>
    65.5 -<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
    65.6 -<sun-web-app error-url="">
    65.7 -  <context-root>/CurrencyTrader</context-root>
    65.8 -  <class-loader delegate="true"/>
    65.9 -  <jsp-config>
   65.10 -    <property name="keepgenerated" value="true">
   65.11 -      <description>Keep a copy of the generated servlet class' java code.</description>
   65.12 -    </property>
   65.13 -  </jsp-config>
   65.14 -</sun-web-app>
    66.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/web/WEB-INF/web.xml	Wed Feb 23 20:05:40 2011 -0500
    66.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    66.3 @@ -1,100 +0,0 @@
    66.4 -<?xml version="1.0" encoding="UTF-8"?>
    66.5 -<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" 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-app_2_4.xsd">
    66.6 -    <context-param>
    66.7 -        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    66.8 -        <param-value>client</param-value>
    66.9 -    </context-param>
   66.10 -    <context-param>
   66.11 -        <param-name>com.sun.faces.validateXml</param-name>
   66.12 -        <param-value>true</param-value>
   66.13 -    </context-param>
   66.14 -    <context-param>
   66.15 -        <param-name>com.sun.faces.verifyObjects</param-name>
   66.16 -        <param-value>false</param-value>
   66.17 -    </context-param>
   66.18 -    <filter>
   66.19 -        <filter-name>UploadFilter</filter-name>
   66.20 -        <filter-class>com.sun.rave.web.ui.util.UploadFilter</filter-class>
   66.21 -        <init-param>
   66.22 -            <description>The maximum allowed upload size in bytes.  If this is set to a negative value, there is no maximum.  The default value is 1000000.</description>
   66.23 -            <param-name>maxSize</param-name>
   66.24 -            <param-value>1000000</param-value>
   66.25 -        </init-param>
   66.26 -        <init-param>
   66.27 -            <description>The size (in bytes) of an uploaded file which, if it is exceeded, will cause the file to be written directly to disk instead of stored in memory.  Files smaller than or equal to this size will be stored in memory.  The default value is 4096.</description>
   66.28 -            <param-name>sizeThreshold</param-name>
   66.29 -            <param-value>4096</param-value>
   66.30 -        </init-param>
   66.31 -    </filter>
   66.32 -    <filter-mapping>
   66.33 -        <filter-name>UploadFilter</filter-name>
   66.34 -        <servlet-name>Faces Servlet</servlet-name>
   66.35 -    </filter-mapping>
   66.36 -    <servlet>
   66.37 -        <servlet-name>Faces Servlet</servlet-name>
   66.38 -        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
   66.39 -        <init-param>
   66.40 -            <param-name>javax.faces.LIFECYCLE_ID</param-name>
   66.41 -            <param-value>com.sun.faces.lifecycle.PARTIAL</param-value>
   66.42 -        </init-param>
   66.43 -        <load-on-startup>1</load-on-startup>
   66.44 -    </servlet>
   66.45 -    <servlet>
   66.46 -        <servlet-name>ExceptionHandlerServlet</servlet-name>
   66.47 -        <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
   66.48 -        <init-param>
   66.49 -            <param-name>errorHost</param-name>
   66.50 -            <param-value>localhost</param-value>
   66.51 -        </init-param>
   66.52 -        <init-param>
   66.53 -            <param-name>errorPort</param-name>
   66.54 -            <param-value>24444</param-value>
   66.55 -        </init-param>
   66.56 -    </servlet>
   66.57 -    <servlet>
   66.58 -        <servlet-name>ThemeServlet</servlet-name>
   66.59 -        <servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class>
   66.60 -    </servlet>
   66.61 -    <servlet-mapping>
   66.62 -        <servlet-name>Faces Servlet</servlet-name>
   66.63 -        <url-pattern>/faces/*</url-pattern>
   66.64 -    </servlet-mapping>
   66.65 -    <servlet-mapping>
   66.66 -        <servlet-name>ExceptionHandlerServlet</servlet-name>
   66.67 -        <url-pattern>/error/ExceptionHandler</url-pattern>
   66.68 -    </servlet-mapping>
   66.69 -    <servlet-mapping>
   66.70 -        <servlet-name>ThemeServlet</servlet-name>
   66.71 -        <url-pattern>/theme/*</url-pattern>
   66.72 -    </servlet-mapping>
   66.73 -    <session-config>
   66.74 -        <session-timeout>
   66.75 -            30
   66.76 -        </session-timeout>
   66.77 -    </session-config>
   66.78 -    <welcome-file-list>
   66.79 -        <welcome-file>faces/Page1.jsp</welcome-file>
   66.80 -        </welcome-file-list>
   66.81 -    <error-page>
   66.82 -        <exception-type>javax.servlet.ServletException</exception-type>
   66.83 -        <location>/error/ExceptionHandler</location>
   66.84 -    </error-page>
   66.85 -    <error-page>
   66.86 -        <exception-type>java.io.IOException</exception-type>
   66.87 -        <location>/error/ExceptionHandler</location>
   66.88 -    </error-page>
   66.89 -    <error-page>
   66.90 -        <exception-type>javax.faces.FacesException</exception-type>
   66.91 -        <location>/error/ExceptionHandler</location>
   66.92 -    </error-page>
   66.93 -    <error-page>
   66.94 -        <exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
   66.95 -        <location>/error/ExceptionHandler</location>
   66.96 -    </error-page>
   66.97 -    <jsp-config>
   66.98 -        <jsp-property-group>
   66.99 -            <url-pattern>*.jspf</url-pattern>
  66.100 -            <is-xml>true</is-xml>
  66.101 -        </jsp-property-group>
  66.102 -        </jsp-config>
  66.103 -    </web-app>
    67.1 Binary file visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/blank.gif has changed
    68.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/currencytrader.js	Wed Feb 23 20:05:40 2011 -0500
    68.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    68.3 @@ -1,269 +0,0 @@
    68.4 -/*
    68.5 -* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
    68.6 -*
    68.7 -* Redistribution and use in source and binary forms, with or without
    68.8 -* modification, are permitted provided that the following conditions
    68.9 -* are met:
   68.10 -*
   68.11 -* - Redistributions of source code must retain the above copyright
   68.12 -*   notice, this list of conditions and the following disclaimer.
   68.13 -*
   68.14 -* - Redistribution in binary form must reproduce the above copyright
   68.15 -*   notice, this list of conditions and the following disclaimer in
   68.16 -*   the documentation and/or other materials provided with the
   68.17 -*   distribution.
   68.18 -*
   68.19 -* Neither the name of Sun Microsystems, Inc. or the names of
   68.20 -* contributors may be used to endorse or promote products derived
   68.21 -* from this software without specific prior written permission.
   68.22 -*
   68.23 -* This software is provided "AS IS," without a warranty of any
   68.24 -* kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
   68.25 -* WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
   68.26 -* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
   68.27 -* EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
   68.28 -* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
   68.29 -* DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
   68.30 -* OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
   68.31 -* FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
   68.32 -* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
   68.33 -* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE,
   68.34 -* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
   68.35 -*
   68.36 -* You acknowledge that Software is not designed, licensed or intended
   68.37 -* for use in the design, construction, operation or maintenance of
   68.38 -* any nuclear facility.
   68.39 -*/
   68.40 -
   68.41 -/** JavaScript for the Currency Trader sample application. */
   68.42 -
   68.43 -/** Delay between requests to the server when polling. */
   68.44 -var pollDelay = 2500;
   68.45 -
   68.46 -/** 
   68.47 -  * Whether we will include the "closure" option in our invocations of DynaFaces.fireAjaxTransaction when polling.
   68.48 -  * If true, we send the next poll request by executing the closure. This allows us to send the next poll request not only 
   68.49 -  * upon receiving the ajax response (the normal case), but also in the event that the ajax response is not received
   68.50 -  * within the verifyPollResponseDelay interval (due to a temporary network problem, for instance).
   68.51 -  */
   68.52 -var useClosure = false;
   68.53 -
   68.54 -/** Delay between the time we send a poll request and the time we manually execute the closure to verify that the response was received. **/
   68.55 -var verifyPollResponseDelay = 15000;
   68.56 -
   68.57 -/** Timestamp for when the "pending" poll request was sent. */
   68.58 -var pendingPollRequestTimestamp;
   68.59 -
   68.60 -/** Whether polling should continue. Used by customPostReplace. */
   68.61 -var continuePolling = false;
   68.62 -
   68.63 -/** 
   68.64 -  * Invoked after receiving an Ajax response and replacing elements in the DOM. Sends a poll request if continuePolling is true.
   68.65 -  * @param element The element we just replaced with new markup.
   68.66 -  * @param markup The markup with which we just replaced the element.
   68.67 -  * @param closure A closure that, when executed, sends the next poll request.
   68.68 -  */
   68.69 -function customPostReplace(element, markup, closure) {
   68.70 -    if (element == document.getElementById('form1:exchangeRateTable')) {
   68.71 -        if (continuePolling == true) {
   68.72 -            if (useClosure) {
   68.73 -                //execute the closure to send the next poll request
   68.74 -                closure();
   68.75 -            } 
   68.76 -            else {
   68.77 -                //send the next poll request without executing the closure
   68.78 -                setTimeout(poll, pollDelay);
   68.79 -            }
   68.80 -        }
   68.81 -    }
   68.82 -    //invoke default behavior
   68.83 -    markup.evalScripts();
   68.84 -}
   68.85 -
   68.86 -/** 
   68.87 -  * Start polling the server, with the delay between requests determined by the pollDelay variable. 
   68.88 -  * This function is called in the body's onload event handler.
   68.89 -  */
   68.90 -function startPolling() {
   68.91 -    continuePolling = true;
   68.92 -    poll();
   68.93 -}
   68.94 -
   68.95 -/** Stop polling the server. This function is called by the body's onunload event handler. */
   68.96 -function stopPolling() {
   68.97 -    continuePolling = false;
   68.98 -}
   68.99 -
  68.100 -/** 
  68.101 -  * Poll the server by sending an Ajax request.
  68.102 -  * Send the hiddenPollIndicator hidden field as input so the server knows this is a poll request. (See Page1.prerender.)
  68.103 -  * Do not execute over any server-side nodes. We are just polling to get the latest exchange rates, not to process any input.
  68.104 -  * Rerender the exchangeRateTable and the openPositionTable.
  68.105 -  * Upon rerendering, use the customReplace function to perform replacing of elements, and the
  68.106 -  * customPostReplace function to send the next poll request.
  68.107 -  * If useClosure is true, attach a closure function to this Ajax request and execute it both
  68.108 -  * in customPostReplace and after the verifyPollResponseDelay: one of these invocations
  68.109 -  * will cause the next poll request to be sent.
  68.110 -  */
  68.111 -function poll() {
  68.112 -    if (useClosure) {
  68.113 -        var thisPollRequestTimestamp = new Date().getTime();
  68.114 -        //pass thisPollRequestTimestamp to getClosureThatSendsNextPollRequest so that the closure will know
  68.115 -        //the timestamp of this poll request.
  68.116 -        DynaFaces.Tx.config.pollTx.closure = getClosureThatSendsNextPollRequest(thisPollRequestTimestamp);
  68.117 -        pendingPollRequestTimestamp = thisPollRequestTimestamp;
  68.118 -    }
  68.119 -    DynaFaces.Tx.fire('pollTx');
  68.120 -    if (useClosure) {
  68.121 -        //execute the closure manually after the verifyPollResponseDelay, so that the next poll request will be sent even if the
  68.122 -        //response for this poll request is never received.
  68.123 -        setTimeout(DynaFaces.Tx.config.pollTx.closure, verifyPollResponseDelay);
  68.124 -    }
  68.125 -}
  68.126 -
  68.127 -/** 
  68.128 -  * Get a closure to be associated with a poll request. When the inner function executes, it checks whether
  68.129 -  * its poll request is the one that is considered "pending," and, if so, it sends the next poll request.
  68.130 -  * @param thisPollRequestTimestamp The timestamp of the poll request associated with this closure.
  68.131 -  * @return An inner function that sends the next poll request if the timestamp of the poll request associated with this closure
  68.132 -  * matches the timestamp of the "pending" poll request.
  68.133 -  */ 
  68.134 -function getClosureThatSendsNextPollRequest(thisPollRequestTimestamp) {
  68.135 -    return function() {
  68.136 -        if (pendingPollRequestTimestamp == thisPollRequestTimestamp) {
  68.137 -            //we have arrived here for one of two reasons:
  68.138 -            //1. the normal case: this code is executing in the customPostReplace function upon receiving the response for the "pending" Ajax request.
  68.139 -            //2. alternate case: this code is executing via the setTimeout call in the poll function, and no response for the "pending" Ajax request has been received.
  68.140 -            //in either case (1 or 2), send the next poll request.
  68.141 -            setTimeout(poll, pollDelay);
  68.142 -        }
  68.143 -    }
  68.144 -}
  68.145 -
  68.146 -/**
  68.147 -  * Collect the data to send with Ajax requests from Ajax zones.
  68.148 -  * In addition to the default collectPostData behavior, add the hiddenRenderId name/value pair.
  68.149 -  * @param ajaxZone The zone which is sending an Ajax request.
  68.150 -  * @param element The element the user has activated, causing the Ajax request to be sent.
  68.151 -  * @param outArray An array of name/value pairs to be populated; these will be sent with the Ajax request.
  68.152 -  */
  68.153 -function customCollectPostData(ajaxZone, element, outArray) {
  68.154 -    var name = 'form1:hiddenRenderId';
  68.155 -    var value = document.getElementById(name).value;
  68.156 -    outArray.push(name+'='+value);
  68.157 -    DynaFacesZones.collectPostData(ajaxZone, element, outArray);
  68.158 -}
  68.159 -
  68.160 -/** An array of id suffixes we will look for when invoking customReplace. */
  68.161 -var idSuffixesToReplace = [':currentPriceColumn:currentPriceText',':currentPriceColumn:currentPriceImage',':floatingProfitColumn:floatingProfitText',':floatingProfitColumn:floatingProfitImage'];
  68.162 -
  68.163 -/**
  68.164 -  * Function to perform custom replacing of elements.
  68.165 -  * This function is specified as the replaceElement option of fireAjaxTransaction, which is used to poll the server.
  68.166 -  * If the id parameter is that of the openPositionTable, extract from the src parameter nodes that represent the contents of the current price column and floating profit column, and replace the corresponding existing nodes in the page with the extracted nodes.
  68.167 -  * We do this so that other columns of the openPositionTable are not replaced, especially the close amount, which contains a dropdown.
  68.168 -  * If we were to replace the dropdown, it could interfere with a user's interacting with the dropdown.
  68.169 -  * If the id parameter is not that of the openPositionTable, simply call through to the default replaceElement function.
  68.170 -  * @param id The id of the element we are replacing as part of a call to fireAjaxTransaction.
  68.171 -  * @param src The new markup for the element.
  68.172 -  */
  68.173 -function customReplace(id, src) {
  68.174 -    if (id == 'form1:openPositionZone:openPositionTable') {
  68.175 -        //create a temporary div
  68.176 -        var temp = document.createElement('div');
  68.177 -
  68.178 -        //populate the temporary div with the src markup
  68.179 -        temp.innerHTML = DynaFaces.trim(src);
  68.180 -
  68.181 -        //temp.firstChild is the src markup's root node
  68.182 -        var revisedOpenTableNode = temp.firstChild;
  68.183 -
  68.184 -        //find and replace specific elements in the current price and floating profit columns
  68.185 -        replaceNodesByIdSuffix(revisedOpenTableNode, idSuffixesToReplace);
  68.186 -    }
  68.187 -    else {
  68.188 -        //just call the default replaceElement function
  68.189 -        Element.replace(id, src);
  68.190 -    }
  68.191 -}
  68.192 -
  68.193 -/** 
  68.194 -  * For each id suffix in suffixArr, extract any nodes within the supplied element having that id suffix.
  68.195 -  * Then replace the corresponding existing nodes in the page with the extracted nodes.
  68.196 -  * @param element The parent node from which to extract nodes with the specified suffixes. Here, element will be a new form1:openPositionZone:openPositionTable node.
  68.197 -  * @param suffixArr An array containing the id suffixes of nodes to extract from element and subsequently use for replacement.
  68.198 -  */
  68.199 -function replaceNodesByIdSuffix(element, suffixArr) {
  68.200 -    for (var i = 0; i < suffixArr.length; i++) {
  68.201 -        var nodeArr = [];
  68.202 -
  68.203 -        //look for nodes in element whose id ends with suffixArr[i], and append those nodes to nodeArr
  68.204 -        findNodesByIdSuffix(element, suffixArr[i], nodeArr);
  68.205 -
  68.206 -        //replace existing nodes in the page with corresponding nodes in nodeArr
  68.207 -        replaceNodes(nodeArr);
  68.208 -    }
  68.209 -}
  68.210 -
  68.211 -/**
  68.212 -  * Search element and its children for nodes whose id ends with suffix, and append those nodes to nodeArr.
  68.213 -  * @param element The element to search.
  68.214 -  * @param suffix The id suffix for which to search.
  68.215 -  * @param nodeArr The array to which we append nodes.
  68.216 -  */
  68.217 -function findNodesByIdSuffix(element, suffix, nodeArr) {
  68.218 -    if (element.id) {
  68.219 -        if (endsWith(element.id, suffix)) {
  68.220 -            nodeArr.push(element);
  68.221 -        }
  68.222 -    }
  68.223 -    if (element.hasChildNodes()) {
  68.224 -        for (var i = 0; i < element.childNodes.length; i++) {
  68.225 -            findNodesByIdSuffix(element.childNodes[i], suffix, nodeArr);
  68.226 -        }
  68.227 -    }
  68.228 -}
  68.229 -
  68.230 -/**
  68.231 -  * Replace existing nodes in the page with the corresponding nodes from the supplied nodeArr.
  68.232 -  * @param nodeArr The array of nodes.
  68.233 -  */
  68.234 -function replaceNodes(nodeArr) {
  68.235 -    for (var i = 0; i < nodeArr.length; i++) {
  68.236 -        //find the corresponding existing node in the page, namely, the one whose id is the same as nodeArr[i].id
  68.237 -        var correspNode = document.getElementById(nodeArr[i].id);
  68.238 -        if (!correspNode) {
  68.239 -            continue;
  68.240 -        }
  68.241 -
  68.242 -        //replace the existing node in the page with nodeArr[i]
  68.243 -        correspNode.parentNode.replaceChild(nodeArr[i], correspNode);
  68.244 -    }
  68.245 -}
  68.246 -
  68.247 -/**
  68.248 -  * The custom inspectElement function for openAPositionPanelZone.
  68.249 -  * If the supplied element is not an INPUT element, return false.
  68.250 -  * Otherwise, return the result of the default inspectElement function.
  68.251 -  * This function is necessary to prevent an Ajax request from being sent when the user interacts with any of the dropdowns in openAPositionPanelZone.
  68.252 -  * Note: openAPositionPanelZone contains the controls to open a position (not to be confused with openPositionZone, which shows all the currently open positions).
  68.253 -  * @param element The element to inspect so as to determine if it should send Ajax requests. This will be openAPositionPanelZone and its children.
  68.254 -  * @return False if element is not an INPUT element, or the result of the default inspectElement function otherwise.
  68.255 -  */
  68.256 -function customInspectElementForPanelZone(element) {
  68.257 -    return DynaFacesZones.inspectElementByNameAndAttribute(element, 'input');
  68.258 -}
  68.259 -
  68.260 -/** 
  68.261 -  * Determine if the supplied str ends with the supplied suffix.
  68.262 -  * @param str The full string.
  68.263 -  * @param suffix The suffix that str might end with.
  68.264 -  * @return True if str ends with suffix, false otherwise.
  68.265 -  */
  68.266 -function endsWith(str, suffix) {
  68.267 -    var start = str.length - suffix.length;
  68.268 -    if (start < 0) {
  68.269 -        return false;
  68.270 -    }
  68.271 -    return str.substring(start) == suffix;
  68.272 -}
  68.273 \ No newline at end of file
    69.1 Binary file visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/downArrow.jpg has changed
    70.1 Binary file visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/help.gif has changed
    71.1 Binary file visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/home.gif has changed
    72.1 Binary file visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/masthead_background.gif has changed
    73.1 --- a/visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/stylesheet.css	Wed Feb 23 20:05:40 2011 -0500
    73.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    73.3 @@ -1,45 +0,0 @@
    73.4 -/* Style rules to make data tables look better */
    73.5 -
    73.6 -.list-header {
    73.7 -  background-color: #eeeeee;
    73.8 -  font-size: larger;
    73.9 -  font-weight: bold;
   73.10 -}
   73.11 -
   73.12 -.list-paging-header {
   73.13 -  background-color: white;
   73.14 -}
   73.15 -
   73.16 -.list-paging-footer {
   73.17 -  background-color: white;
   73.18 -}
   73.19 -
   73.20 -.list-row-even { 
   73.21 -}
   73.22 -
   73.23 -.list-row-odd { 
   73.24 -  background-color: #eeeeee;
   73.25 -}
   73.26 -
   73.27 -/* Style rules for message severity levels */
   73.28 -
   73.29 -.infoMessage {
   73.30 -  color: black;
   73.31 -}
   73.32 -
   73.33 -.warnMessage {
   73.34 -  color: orange;
   73.35 -  font-weight: bold;
   73.36 -}
   73.37 -
   73.38 -.errorMessage {
   73.39 -  color: red;
   73.40 -  font-weight: bold;
   73.41 -}
   73.42 -
   73.43 -.fatalMessage {
   73.44 -  color: red;
   73.45 -  font-style: italic;
   73.46 -  font-weight: bold;
   73.47 -}
   73.48 -
    74.1 Binary file visualweb.samples.postrel/webapps/CurrencyTrader/web/resources/upArrow.jpg has changed
    75.1 --- a/visualweb.samples.postrel/webapps/descriptions/CurrencyTrader.html	Wed Feb 23 20:05:40 2011 -0500
    75.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    75.3 @@ -1,13 +0,0 @@
    75.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    75.5 -
    75.6 -<html>
    75.7 -  <head>
    75.8 -    <title>Currency Trader</title>
    75.9 -  </head>
   75.10 -  <body>
   75.11 -This is an example that simulates real-time foreign exchange trading and demonstrates 
   75.12 -how to employ Ajax techniques with Ajax-unaware JavaServer Faces components using 
   75.13 -Dynamic Faces technology. This application requires the Dynamic Faces component 
   75.14 -library (Technology Preview).
   75.15 -  </body>
   75.16 -</html>
    76.1 --- a/visualweb.woodstock.pagetemplates/build.xml	Wed Feb 23 20:05:40 2011 -0500
    76.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    76.3 @@ -1,8 +0,0 @@
    76.4 -<?xml version="1.0" encoding="UTF-8"?>
    76.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
    76.6 -<!-- for some information on what you could do (e.g. targets to override). -->
    76.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
    76.8 -<project name="contrib/visualweb.woodstock.pagetemplates" default="netbeans" basedir=".">
    76.9 -    <description>Builds, tests, and runs the project org.netbeans.modules.visualweb.woodstock.pagetemplates.</description>
   76.10 -    <import file="nbproject/build-impl.xml"/>
   76.11 -</project>
    77.1 --- a/visualweb.woodstock.pagetemplates/manifest.mf	Wed Feb 23 20:05:40 2011 -0500
    77.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    77.3 @@ -1,6 +0,0 @@
    77.4 -Manifest-Version: 1.0
    77.5 -OpenIDE-Module: org.netbeans.modules.visualweb.woodstock.pagetemplates
    77.6 -OpenIDE-Module-Layer: org/netbeans/modules/visualweb/woodstock/pagetemplates/layer.xml
    77.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/visualweb/woodstock/pagetemplates/Bundle.properties
    77.8 -OpenIDE-Module-Specification-Version: 1.0
    77.9 -
    78.1 --- a/visualweb.woodstock.pagetemplates/nbproject/build-impl.xml	Wed Feb 23 20:05:40 2011 -0500
    78.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    78.3 @@ -1,27 +0,0 @@
    78.4 -<?xml version="1.0" encoding="UTF-8"?>
    78.5 -<!--
    78.6 -*** GENERATED FROM project.xml - DO NOT EDIT  ***
    78.7 -***         EDIT ../build.xml INSTEAD         ***
    78.8 --->
    78.9 -<project name="org.netbeans.modules.visualweb.woodstock.pagetemplates-impl" basedir="..">
   78.10 -    <property file="nbproject/private/platform-private.properties"/>
   78.11 -    <property file="nbproject/platform.properties"/>
   78.12 -    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
   78.13 -        <attribute name="name"/>
   78.14 -        <attribute name="value"/>
   78.15 -        <sequential>
   78.16 -            <property name="@{name}" value="${@{value}}"/>
   78.17 -        </sequential>
   78.18 -    </macrodef>
   78.19 -    <property file="${user.properties.file}"/>
   78.20 -    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
   78.21 -    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
   78.22 -    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
   78.23 -        <condition>
   78.24 -            <not>
   78.25 -                <available file="${harness.dir}" type="dir"/>
   78.26 -            </not>
   78.27 -        </condition>
   78.28 -    </fail>
   78.29 -    <import file="${harness.dir}/build.xml"/>
   78.30 -</project>
    79.1 --- a/visualweb.woodstock.pagetemplates/nbproject/genfiles.properties	Wed Feb 23 20:05:40 2011 -0500
    79.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    79.3 @@ -1,8 +0,0 @@
    79.4 -build.xml.data.CRC32=5336c0ea
    79.5 -build.xml.script.CRC32=1425743d
    79.6 -build.xml.stylesheet.CRC32=79c3b980
    79.7 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    79.8 -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    79.9 -nbproject/build-impl.xml.data.CRC32=5336c0ea
   79.10 -nbproject/build-impl.xml.script.CRC32=b6304ead
   79.11 -nbproject/build-impl.xml.stylesheet.CRC32=deb65f65
    80.1 --- a/visualweb.woodstock.pagetemplates/nbproject/platform.properties	Wed Feb 23 20:05:40 2011 -0500
    80.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    80.3 @@ -1,1 +0,0 @@
    80.4 -nbplatform.active=default
    81.1 --- a/visualweb.woodstock.pagetemplates/nbproject/project.properties	Wed Feb 23 20:05:40 2011 -0500
    81.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    81.3 @@ -1,41 +0,0 @@
    81.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    81.5 -#
    81.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    81.7 -#
    81.8 -# The contents of this file are subject to the terms of either the GNU
    81.9 -# General Public License Version 2 only ("GPL") or the Common
   81.10 -# Development and Distribution License("CDDL") (collectively, the
   81.11 -# "License"). You may not use this file except in compliance with the
   81.12 -# License. You can obtain a copy of the License at
   81.13 -# http://www.netbeans.org/cddl-gplv2.html
   81.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   81.15 -# specific language governing permissions and limitations under the
   81.16 -# License.  When distributing the software, include this License Header
   81.17 -# Notice in each file and include the License file at
   81.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   81.19 -# particular file as subject to the "Classpath" exception as provided
   81.20 -# by Sun in the GPL Version 2 section of the License file that
   81.21 -# accompanied this code. If applicable, add the following below the
   81.22 -# License Header, with the fields enclosed by brackets [] replaced by
   81.23 -# your own identifying information:
   81.24 -# "Portions Copyrighted [year] [name of copyright owner]"
   81.25 -#
   81.26 -# Contributor(s):
   81.27 -#
   81.28 -# The Original Software is NetBeans. The Initial Developer of the Original
   81.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   81.30 -# Microsystems, Inc. All Rights Reserved.
   81.31 -#
   81.32 -# If you wish your version of this file to be governed by only the CDDL
   81.33 -# or only the GPL Version 2, indicate your decision by adding
   81.34 -# "[Contributor] elects to include this software in this distribution
   81.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   81.36 -# single choice of license, a recipient has the option to distribute
   81.37 -# your version of this file under either the CDDL, the GPL Version 2 or
   81.38 -# to extend the choice of license to its licensees as provided above.
   81.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   81.40 -# Version 2 license, then the option applies only if the new code is
   81.41 -# made subject to such option by the copyright holder.
   81.42 -
   81.43 -javac.source=1.5
   81.44 -javac.compilerargs=-Xlint -Xlint:-serial
    82.1 --- a/visualweb.woodstock.pagetemplates/nbproject/project.xml	Wed Feb 23 20:05:40 2011 -0500
    82.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    82.3 @@ -1,88 +0,0 @@
    82.4 -<?xml version="1.0" encoding="UTF-8"?>
    82.5 -<!--
    82.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    82.7 -
    82.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    82.9 -
   82.10 -
   82.11 -The contents of this file are subject to the terms of either the GNU
   82.12 -General Public License Version 2 only ("GPL") or the Common
   82.13 -Development and Distribution License("CDDL") (collectively, the
   82.14 -"License"). You may not use this file except in compliance with the
   82.15 -License. You can obtain a copy of the License at
   82.16 -http://www.netbeans.org/cddl-gplv2.html
   82.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   82.18 -specific language governing permissions and limitations under the
   82.19 -License.  When distributing the software, include this License Header
   82.20 -Notice in each file and include the License file at
   82.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   82.22 -particular file as subject to the "Classpath" exception as provided
   82.23 -by Sun in the GPL Version 2 section of the License file that
   82.24 -accompanied this code. If applicable, add the following below the
   82.25 -License Header, with the fields enclosed by brackets [] replaced by
   82.26 -your own identifying information:
   82.27 -"Portions Copyrighted [year] [name of copyright owner]"
   82.28 -
   82.29 -Contributor(s):
   82.30 -
   82.31 -The Original Software is NetBeans. The Initial Developer of the Original
   82.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   82.33 -Microsystems, Inc. All Rights Reserved.
   82.34 -
   82.35 -If you wish your version of this file to be governed by only the CDDL
   82.36 -or only the GPL Version 2, indicate your decision by adding
   82.37 -"[Contributor] elects to include this software in this distribution
   82.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
   82.39 -single choice of license, a recipient has the option to distribute
   82.40 -your version of this file under either the CDDL, the GPL Version 2 or
   82.41 -to extend the choice of license to its licensees as provided above.
   82.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
   82.43 -Version 2 license, then the option applies only if the new code is
   82.44 -made subject to such option by the copyright holder.
   82.45 --->
   82.46 -
   82.47 -<project xmlns="http://www.netbeans.org/ns/project/1">
   82.48 -    <type>org.netbeans.modules.apisupport.project</type>
   82.49 -    <configuration>
   82.50 -        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
   82.51 -            <code-name-base>org.netbeans.modules.visualweb.woodstock.pagetemplates</code-name-base>
   82.52 -            <standalone/>
   82.53 -            <module-dependencies>
   82.54 -                <dependency>
   82.55 -                    <code-name-base>org.jdesktop.layout</code-name-base>
   82.56 -                    <build-prerequisite/>
   82.57 -                    <compile-dependency/>
   82.58 -                    <run-dependency>
   82.59 -                        <release-version>1</release-version>
   82.60 -                        <specification-version>1.4</specification-version>
   82.61 -                    </run-dependency>
   82.62 -                </dependency>
   82.63 -                <dependency>
   82.64 -                    <code-name-base>org.openide.dialogs</code-name-base>
   82.65 -                    <build-prerequisite/>
   82.66 -                    <compile-dependency/>
   82.67 -                    <run-dependency>
   82.68 -                        <specification-version>7.5</specification-version>
   82.69 -                    </run-dependency>
   82.70 -                </dependency>
   82.71 -                <dependency>
   82.72 -                    <code-name-base>org.openide.filesystems</code-name-base>
   82.73 -                    <build-prerequisite/>
   82.74 -                    <compile-dependency/>
   82.75 -                    <run-dependency>
   82.76 -                        <specification-version>7.3</specification-version>
   82.77 -                    </run-dependency>
   82.78 -                </dependency>
   82.79 -                <dependency>
   82.80 -                    <code-name-base>org.openide.util</code-name-base>
   82.81 -                    <build-prerequisite/>
   82.82 -                    <compile-dependency/>
   82.83 -                    <run-dependency>
   82.84 -                        <specification-version>7.9.0.1</specification-version>
   82.85 -                    </run-dependency>
   82.86 -                </dependency>
   82.87 -            </module-dependencies>
   82.88 -            <public-packages/>
   82.89 -        </data>
   82.90 -    </configuration>
   82.91 -</project>
    83.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/Bundle.properties	Wed Feb 23 20:05:40 2011 -0500
    83.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    83.3 @@ -1,70 +0,0 @@
    83.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    83.5 -#
    83.6 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    83.7 -#
    83.8 -# The contents of this file are subject to the terms of either the GNU
    83.9 -# General Public License Version 2 only ("GPL") or the Common
   83.10 -# Development and Distribution License("CDDL") (collectively, the
   83.11 -# "License"). You may not use this file except in compliance with the
   83.12 -# License. You can obtain a copy of the License at
   83.13 -# http://www.netbeans.org/cddl-gplv2.html
   83.14 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   83.15 -# specific language governing permissions and limitations under the
   83.16 -# License.  When distributing the software, include this License Header
   83.17 -# Notice in each file and include the License file at
   83.18 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   83.19 -# particular file as subject to the "Classpath" exception as provided
   83.20 -# by Sun in the GPL Version 2 section of the License file that
   83.21 -# accompanied this code. If applicable, add the following below the
   83.22 -# License Header, with the fields enclosed by brackets [] replaced by
   83.23 -# your own identifying information:
   83.24 -# "Portions Copyrighted [year] [name of copyright owner]"
   83.25 -#
   83.26 -# Contributor(s):
   83.27 -#
   83.28 -# The Original Software is NetBeans. The Initial Developer of the Original
   83.29 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   83.30 -# Microsystems, Inc. All Rights Reserved.
   83.31 -#
   83.32 -# If you wish your version of this file to be governed by only the CDDL
   83.33 -# or only the GPL Version 2, indicate your decision by adding
   83.34 -# "[Contributor] elects to include this software in this distribution
   83.35 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
   83.36 -# single choice of license, a recipient has the option to distribute
   83.37 -# your version of this file under either the CDDL, the GPL Version 2 or
   83.38 -# to extend the choice of license to its licensees as provided above.
   83.39 -# However, if you add GPL Version 2 code and therefore, elected the GPL
   83.40 -# Version 2 license, then the option applies only if the new code is
   83.41 -# made subject to such option by the copyright holder.
   83.42 -
   83.43 -OpenIDE-Module-Display-Category=Visual Web
   83.44 -OpenIDE-Module-Long-Description=\
   83.45 -    This plugin installs sets of predefined Page Templates based on Project Woodstock Components and their resources. \
   83.46 -    Page authors can create initial pages for their Visual Web JSF Application using these page templates.
   83.47 -OpenIDE-Module-Name=Woodstock Page Templates 
   83.48 -
   83.49 -OpenIDE-Module-Short-Description=Page Templates for Woodstock Components
   83.50 -
   83.51 -PageTemplate1=None
   83.52 -PageTemplate2=Header only
   83.53 -PageTemplate3=Header and Footer
   83.54 -PageTemplate4=Header and Left Bar
   83.55 -PageTemplate5=Header and Right Bar
   83.56 -PageTemplate6=Header, Left Bar and Footer
   83.57 -PageTemplate7=Header, Right Bar and Footer
   83.58 -PageTemplate8=Header, Left Bar, Right Bar and Footer
   83.59 -PageTemplate9=Header, Navigation Menu, Right Bar and Footer
   83.60 -PageTemplate10=Header, Top Bar Menu, Right Bar and Footer
   83.61 -PageTemplate11=Header, Top Bar Menu, Navigation Menu Right Bar and Footer
   83.62 -
   83.63 -PageTemplate1_Desciption=Creates page with plain container
   83.64 -PageTemplate2_Desciption=Creates page with Header and Container regions 
   83.65 -PageTemplate3_Desciption=Creates page with Header, Footer and Container regions 
   83.66 -PageTemplate4_Desciption=Creates page with Header, Left Bar and Container regions
   83.67 -PageTemplate5_Desciption=Creates page with Header, Right Bar and Container regions
   83.68 -PageTemplate6_Desciption=Creates page with Header, Left Bar, Footer and Container regions 
   83.69 -PageTemplate7_Desciption=Creates page with Header, Right Bar, Footer and Container regions
   83.70 -PageTemplate8_Desciption=Creates page with Header, Left Bar, Right Bar, Footer and Container regions
   83.71 -PageTemplate9_Desciption=Creates page with Header,  Navigation Menu, Right Bar, Footer and Container regions 
   83.72 -PageTemplate10_Desciption=Creates page with Header, Top Bar Menu, Right Bar, Footer and Container regions
   83.73 -PageTemplate11_Desciption=Creates page with Header, Top Bar Menu, Navigation Menu Right Bar, Footer Container regions
    84.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate1.java.template	Wed Feb 23 20:05:40 2011 -0500
    84.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    84.3 @@ -1,301 +0,0 @@
    84.4 -/*
    84.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    84.6 - *
    84.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    84.8 - *
    84.9 - * The contents of this file are subject to the terms of either the GNU
   84.10 - * General Public License Version 2 only ("GPL") or the Common
   84.11 - * Development and Distribution License("CDDL") (collectively, the
   84.12 - * "License"). You may not use this file except in compliance with the
   84.13 - * License. You can obtain a copy of the License at
   84.14 - * http://www.netbeans.org/cddl-gplv2.html
   84.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   84.16 - * specific language governing permissions and limitations under the
   84.17 - * License.  When distributing the software, include this License Header
   84.18 - * Notice in each file and include the License file at
   84.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   84.20 - * particular file as subject to the "Classpath" exception as provided
   84.21 - * by Sun in the GPL Version 2 section of the License file that
   84.22 - * accompanied this code. If applicable, add the following below the
   84.23 - * License Header, with the fields enclosed by brackets [] replaced by
   84.24 - * your own identifying information:
   84.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   84.26 - *
   84.27 - * Contributor(s):
   84.28 - *
   84.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   84.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   84.31 - * Microsystems, Inc. All Rights Reserved.
   84.32 - *
   84.33 - * If you wish your version of this file to be governed by only the CDDL
   84.34 - * or only the GPL Version 2, indicate your decision by adding
   84.35 - * "[Contributor] elects to include this software in this distribution
   84.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   84.37 - * single choice of license, a recipient has the option to distribute
   84.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   84.39 - * to extend the choice of license to its licensees as provided above.
   84.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   84.41 - * Version 2 license, then the option applies only if the new code is
   84.42 - * made subject to such option by the copyright holder.
   84.43 - */
   84.44 -
   84.45 -/*
   84.46 - * ${name}.java
   84.47 - *
   84.48 - * Created on ${date}, ${time}
   84.49 - * Copyright ${user}
   84.50 - */
   84.51 -<#if package?? && package != "">
   84.52 -package ${package};
   84.53 -</#if>
   84.54 -
   84.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   84.56 -import com.sun.webui.jsf.component.Body;
   84.57 -import com.sun.webui.jsf.component.Form;
   84.58 -import com.sun.webui.jsf.component.Head;
   84.59 -import com.sun.webui.jsf.component.Html;
   84.60 -import com.sun.webui.jsf.component.Link;
   84.61 -import com.sun.webui.jsf.component.Page;
   84.62 -import com.sun.webui.jsf.component.PanelLayout;
   84.63 -import com.sun.webui.jsf.component.StaticText;
   84.64 -import javax.faces.FacesException;
   84.65 -
   84.66 -/**
   84.67 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   84.68 - * class contains component definitions (and initialization code) for
   84.69 - * all components that you have defined on this page, as well as
   84.70 - * lifecycle methods and event handlers where you may add behavior
   84.71 - * to respond to incoming events.</p>
   84.72 - */
   84.73 -public class ${name} extends AbstractPageBean {
   84.74 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   84.75 -    private int __placeholder;
   84.76 -
   84.77 -    /**
   84.78 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   84.79 -     * This method is automatically generated, so any user-specified code inserted
   84.80 -     * here is subject to being replaced.</p>
   84.81 -     */
   84.82 -    private void _init() throws Exception {
   84.83 -    }
   84.84 -
   84.85 -    private Page page1 = new Page();
   84.86 -    
   84.87 -    public Page getPage1() {
   84.88 -        return page1;
   84.89 -    }
   84.90 -    
   84.91 -    public void setPage1(Page p) {
   84.92 -        this.page1 = p;
   84.93 -    }
   84.94 -    
   84.95 -    private Html html1 = new Html();
   84.96 -    
   84.97 -    public Html getHtml1() {
   84.98 -        return html1;
   84.99 -    }
  84.100 -    
  84.101 -    public void setHtml1(Html h) {
  84.102 -        this.html1 = h;
  84.103 -    }
  84.104 -    
  84.105 -    private Head head1 = new Head();
  84.106 -    
  84.107 -    public Head getHead1() {
  84.108 -        return head1;
  84.109 -    }
  84.110 -    
  84.111 -    public void setHead1(Head h) {
  84.112 -        this.head1 = h;
  84.113 -    }
  84.114 -    
  84.115 -    private Link link1 = new Link();
  84.116 -    
  84.117 -    public Link getLink1() {
  84.118 -        return link1;
  84.119 -    }
  84.120 -    
  84.121 -    public void setLink1(Link l) {
  84.122 -        this.link1 = l;
  84.123 -    }
  84.124 -    
  84.125 -    private Body body1 = new Body();
  84.126 -    
  84.127 -    public Body getBody1() {
  84.128 -        return body1;
  84.129 -    }
  84.130 -    
  84.131 -    public void setBody1(Body b) {
  84.132 -        this.body1 = b;
  84.133 -    }
  84.134 -    
  84.135 -    private Form form1 = new Form();
  84.136 -    
  84.137 -    public Form getForm1() {
  84.138 -        return form1;
  84.139 -    }
  84.140 -    
  84.141 -    public void setForm1(Form f) {
  84.142 -        this.form1 = f;
  84.143 -    }
  84.144 -    private Link link2 = new Link();
  84.145 -
  84.146 -    public Link getLink2() {
  84.147 -        return link2;
  84.148 -    }
  84.149 -
  84.150 -    public void setLink2(Link l) {
  84.151 -        this.link2 = l;
  84.152 -    }
  84.153 -    private PanelLayout mainContentPanel = new PanelLayout();
  84.154 -
  84.155 -    public PanelLayout getMainContentPanel() {
  84.156 -        return mainContentPanel;
  84.157 -    }
  84.158 -
  84.159 -    public void setMainContentPanel(PanelLayout pl) {
  84.160 -        this.mainContentPanel = pl;
  84.161 -    }
  84.162 -    private StaticText staticText11 = new StaticText();
  84.163 -
  84.164 -    public StaticText getStaticText11() {
  84.165 -        return staticText11;
  84.166 -    }
  84.167 -
  84.168 -    public void setStaticText11(StaticText st) {
  84.169 -        this.staticText11 = st;
  84.170 -    }
  84.171 -    private StaticText staticText12 = new StaticText();
  84.172 -
  84.173 -    public StaticText getStaticText12() {
  84.174 -        return staticText12;
  84.175 -    }
  84.176 -
  84.177 -    public void setStaticText12(StaticText st) {
  84.178 -        this.staticText12 = st;
  84.179 -    }
  84.180 -    private StaticText staticText13 = new StaticText();
  84.181 -
  84.182 -    public StaticText getStaticText13() {
  84.183 -        return staticText13;
  84.184 -    }
  84.185 -
  84.186 -    public void setStaticText13(StaticText st) {
  84.187 -        this.staticText13 = st;
  84.188 -    }
  84.189 -    private StaticText staticText14 = new StaticText();
  84.190 -
  84.191 -    public StaticText getStaticText14() {
  84.192 -        return staticText14;
  84.193 -    }
  84.194 -
  84.195 -    public void setStaticText14(StaticText st) {
  84.196 -        this.staticText14 = st;
  84.197 -    }
  84.198 -    private StaticText staticText1 = new StaticText();
  84.199 -
  84.200 -    public StaticText getStaticText1() {
  84.201 -        return staticText1;
  84.202 -    }
  84.203 -
  84.204 -    public void setStaticText1(StaticText st) {
  84.205 -        this.staticText1 = st;
  84.206 -    }
  84.207 -
  84.208 -    // </editor-fold>
  84.209 -
  84.210 -    /**
  84.211 -     * <p>Construct a new Page bean instance.</p>
  84.212 -     */
  84.213 -    public ${name}() {
  84.214 -    }
  84.215 -
  84.216 -    /**
  84.217 -     * <p>Callback method that is called whenever a page is navigated to,
  84.218 -     * either directly via a URL, or indirectly via page navigation.
  84.219 -     * Customize this method to acquire resources that will be needed
  84.220 -     * for event handlers and lifecycle methods, whether or not this
  84.221 -     * page is performing post back processing.</p>
  84.222 -     * 
  84.223 -     * <p>Note that, if the current request is a postback, the property
  84.224 -     * values of the components do <strong>not</strong> represent any
  84.225 -     * values submitted with this request.  Instead, they represent the
  84.226 -     * property values that were saved for this view when it was rendered.</p>
  84.227 -     */
  84.228 -    public void init() {
  84.229 -        // Perform initializations inherited from our superclass
  84.230 -        super.init();
  84.231 -        // Perform application initialization that must complete
  84.232 -        // *before* managed components are initialized
  84.233 -        // TODO - add your own initialiation code here
  84.234 -            
  84.235 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  84.236 -        // Initialize automatically managed components
  84.237 -        // *Note* - this logic should NOT be modified
  84.238 -        try {
  84.239 -            _init();
  84.240 -        } catch (Exception e) {
  84.241 -            log("Page1 Initialization Failure", e);
  84.242 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  84.243 -        }
  84.244 -        
  84.245 -        // </editor-fold>
  84.246 -        // Perform application initialization that must complete
  84.247 -        // *after* managed components are initialized
  84.248 -        // TODO - add your own initialization code here
  84.249 -    }
  84.250 -
  84.251 -    /**
  84.252 -     * <p>Callback method that is called after the component tree has been
  84.253 -     * restored, but before any event processing takes place.  This method
  84.254 -     * will <strong>only</strong> be called on a postback request that
  84.255 -     * is processing a form submit.  Customize this method to allocate
  84.256 -     * resources that will be required in your event handlers.</p>
  84.257 -     */
  84.258 -    public void preprocess() {
  84.259 -    }
  84.260 -
  84.261 -    /**
  84.262 -     * <p>Callback method that is called just before rendering takes place.
  84.263 -     * This method will <strong>only</strong> be called for the page that
  84.264 -     * will actually be rendered (and not, for example, on a page that
  84.265 -     * handled a postback and then navigated to a different page).  Customize
  84.266 -     * this method to allocate resources that will be required for rendering
  84.267 -     * this page.</p>
  84.268 -     */
  84.269 -    public void prerender() {
  84.270 -    }
  84.271 -
  84.272 -    /**
  84.273 -     * <p>Callback method that is called after rendering is completed for
  84.274 -     * this request, if <code>init()</code> was called (regardless of whether
  84.275 -     * or not this was the page that was actually rendered).  Customize this
  84.276 -     * method to release resources acquired in the <code>init()</code>,
  84.277 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  84.278 -     * acquired during execution of an event handler).</p>
  84.279 -     */
  84.280 -    public void destroy() {
  84.281 -    }
  84.282 -
  84.283 -    /**
  84.284 -     * <p>Return a reference to the scoped data bean.</p>
  84.285 -     */
  84.286 -    protected RequestBean1 getRequestBean1() {
  84.287 -        return (RequestBean1) getBean("RequestBean1");
  84.288 -    }
  84.289 -
  84.290 -    /**
  84.291 -     * <p>Return a reference to the scoped data bean.</p>
  84.292 -     */
  84.293 -    protected SessionBean1 getSessionBean1() {
  84.294 -        return (SessionBean1) getBean("SessionBean1");
  84.295 -    }
  84.296 -
  84.297 -    /**
  84.298 -     * <p>Return a reference to the scoped data bean.</p>
  84.299 -     */
  84.300 -    protected ApplicationBean1 getApplicationBean1() {
  84.301 -        return (ApplicationBean1) getBean("ApplicationBean1");
  84.302 -    }
  84.303 -}
  84.304 -
    85.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate1.jsp.template	Wed Feb 23 20:05:40 2011 -0500
    85.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    85.3 @@ -1,37 +0,0 @@
    85.4 -<#assign pound = '#'>
    85.5 -<?xml version="1.0" encoding="${encoding}"?>
    85.6 -<!--
    85.7 -Document   : ${name}
    85.8 -Created on : ${date}, ${time}
    85.9 -Author     : ${user}
   85.10 --->
   85.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
   85.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
   85.13 -    <f:view>
   85.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
   85.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
   85.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
   85.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
   85.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout1.css"/>
   85.19 -                </webuijsf:head>
   85.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
   85.21 -                    <br/>
   85.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
   85.23 -                        <div id="container">
   85.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
   85.25 -                            <!-- end ${pound}container -->
   85.26 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
   85.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
   85.28 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   85.29 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
   85.30 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   85.31 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   85.32 -                            </webuijsf:panelLayout>
   85.33 -                            <br class="clearfloat"/>
   85.34 -                        </div>
   85.35 -                    </webuijsf:form>
   85.36 -                </webuijsf:body>
   85.37 -            </webuijsf:html>
   85.38 -        </webuijsf:page>
   85.39 -    </f:view>
   85.40 -</jsp:root>
    86.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate10.java.template	Wed Feb 23 20:05:40 2011 -0500
    86.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.3 @@ -1,501 +0,0 @@
    86.4 -/*
    86.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    86.6 - *
    86.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    86.8 - *
    86.9 - * The contents of this file are subject to the terms of either the GNU
   86.10 - * General Public License Version 2 only ("GPL") or the Common
   86.11 - * Development and Distribution License("CDDL") (collectively, the
   86.12 - * "License"). You may not use this file except in compliance with the
   86.13 - * License. You can obtain a copy of the License at
   86.14 - * http://www.netbeans.org/cddl-gplv2.html
   86.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   86.16 - * specific language governing permissions and limitations under the
   86.17 - * License.  When distributing the software, include this License Header
   86.18 - * Notice in each file and include the License file at
   86.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   86.20 - * particular file as subject to the "Classpath" exception as provided
   86.21 - * by Sun in the GPL Version 2 section of the License file that
   86.22 - * accompanied this code. If applicable, add the following below the
   86.23 - * License Header, with the fields enclosed by brackets [] replaced by
   86.24 - * your own identifying information:
   86.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   86.26 - *
   86.27 - * Contributor(s):
   86.28 - *
   86.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   86.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   86.31 - * Microsystems, Inc. All Rights Reserved.
   86.32 - *
   86.33 - * If you wish your version of this file to be governed by only the CDDL
   86.34 - * or only the GPL Version 2, indicate your decision by adding
   86.35 - * "[Contributor] elects to include this software in this distribution
   86.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   86.37 - * single choice of license, a recipient has the option to distribute
   86.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   86.39 - * to extend the choice of license to its licensees as provided above.
   86.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   86.41 - * Version 2 license, then the option applies only if the new code is
   86.42 - * made subject to such option by the copyright holder.
   86.43 - */
   86.44 -
   86.45 -/*
   86.46 - * ${name}.java
   86.47 - *
   86.48 - * Created on ${date}, ${time}
   86.49 - * Copyright ${user}
   86.50 - */
   86.51 -<#if package?? && package != "">
   86.52 -package ${package};
   86.53 -</#if>
   86.54 -
   86.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   86.56 -import com.sun.webui.jsf.component.Body;
   86.57 -import com.sun.webui.jsf.component.Form;
   86.58 -import com.sun.webui.jsf.component.Head;
   86.59 -import com.sun.webui.jsf.component.Html;
   86.60 -import com.sun.webui.jsf.component.Hyperlink;
   86.61 -import com.sun.webui.jsf.component.Link;
   86.62 -import com.sun.webui.jsf.component.Page;
   86.63 -import com.sun.webui.jsf.component.PanelLayout;
   86.64 -import com.sun.webui.jsf.component.StaticText;
   86.65 -import javax.faces.FacesException;
   86.66 -import javax.faces.component.html.HtmlPanelGrid;
   86.67 -
   86.68 -/**
   86.69 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   86.70 - * class contains component definitions (and initialization code) for
   86.71 - * all components that you have defined on this page, as well as
   86.72 - * lifecycle methods and event handlers where you may add behavior
   86.73 - * to respond to incoming events.</p>
   86.74 - */
   86.75 -public class ${name} extends AbstractPageBean {
   86.76 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   86.77 -    private int __placeholder;
   86.78 -
   86.79 -    /**
   86.80 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   86.81 -     * This method is automatically generated, so any user-specified code inserted
   86.82 -     * here is subject to being replaced.</p>
   86.83 -     */
   86.84 -    private void _init() throws Exception {
   86.85 -    }
   86.86 -
   86.87 -    private Page page1 = new Page();
   86.88 -    
   86.89 -    public Page getPage1() {
   86.90 -        return page1;
   86.91 -    }
   86.92 -    
   86.93 -    public void setPage1(Page p) {
   86.94 -        this.page1 = p;
   86.95 -    }
   86.96 -    
   86.97 -    private Html html1 = new Html();
   86.98 -    
   86.99 -    public Html getHtml1() {
  86.100 -        return html1;
  86.101 -    }
  86.102 -    
  86.103 -    public void setHtml1(Html h) {
  86.104 -        this.html1 = h;
  86.105 -    }
  86.106 -    
  86.107 -    private Head head1 = new Head();
  86.108 -    
  86.109 -    public Head getHead1() {
  86.110 -        return head1;
  86.111 -    }
  86.112 -    
  86.113 -    public void setHead1(Head h) {
  86.114 -        this.head1 = h;
  86.115 -    }
  86.116 -    
  86.117 -    private Link link1 = new Link();
  86.118 -    
  86.119 -    public Link getLink1() {
  86.120 -        return link1;
  86.121 -    }
  86.122 -    
  86.123 -    public void setLink1(Link l) {
  86.124 -        this.link1 = l;
  86.125 -    }
  86.126 -    
  86.127 -    private Body body1 = new Body();
  86.128 -    
  86.129 -    public Body getBody1() {
  86.130 -        return body1;
  86.131 -    }
  86.132 -    
  86.133 -    public void setBody1(Body b) {
  86.134 -        this.body1 = b;
  86.135 -    }
  86.136 -    
  86.137 -    private Form form1 = new Form();
  86.138 -    
  86.139 -    public Form getForm1() {
  86.140 -        return form1;
  86.141 -    }
  86.142 -    
  86.143 -    public void setForm1(Form f) {
  86.144 -        this.form1 = f;
  86.145 -    }
  86.146 -    private Link link2 = new Link();
  86.147 -
  86.148 -    public Link getLink2() {
  86.149 -        return link2;
  86.150 -    }
  86.151 -
  86.152 -    public void setLink2(Link l) {
  86.153 -        this.link2 = l;
  86.154 -    }
  86.155 -    private PanelLayout headerPanel = new PanelLayout();
  86.156 -
  86.157 -    public PanelLayout getHeaderPanel() {
  86.158 -        return headerPanel;
  86.159 -    }
  86.160 -
  86.161 -    public void setHeaderPanel(PanelLayout pl) {
  86.162 -        this.headerPanel = pl;
  86.163 -    }
  86.164 -    private StaticText staticText1 = new StaticText();
  86.165 -
  86.166 -    public StaticText getStaticText1() {
  86.167 -        return staticText1;
  86.168 -    }
  86.169 -
  86.170 -    public void setStaticText1(StaticText st) {
  86.171 -        this.staticText1 = st;
  86.172 -    }
  86.173 -    private PanelLayout leftSidebarPanel = new PanelLayout();
  86.174 -
  86.175 -    public PanelLayout getLeftSidebarPanel() {
  86.176 -        return leftSidebarPanel;
  86.177 -    }
  86.178 -
  86.179 -    public void setLeftSidebarPanel(PanelLayout pl) {
  86.180 -        this.leftSidebarPanel = pl;
  86.181 -    }
  86.182 -    private StaticText staticText2 = new StaticText();
  86.183 -
  86.184 -    public StaticText getStaticText2() {
  86.185 -        return staticText2;
  86.186 -    }
  86.187 -
  86.188 -    public void setStaticText2(StaticText st) {
  86.189 -        this.staticText2 = st;
  86.190 -    }
  86.191 -    private StaticText staticText3 = new StaticText();
  86.192 -
  86.193 -    public StaticText getStaticText3() {
  86.194 -        return staticText3;
  86.195 -    }
  86.196 -
  86.197 -    public void setStaticText3(StaticText st) {
  86.198 -        this.staticText3 = st;
  86.199 -    }
  86.200 -    private StaticText staticText4 = new StaticText();
  86.201 -
  86.202 -    public StaticText getStaticText4() {
  86.203 -        return staticText4;
  86.204 -    }
  86.205 -
  86.206 -    public void setStaticText4(StaticText st) {
  86.207 -        this.staticText4 = st;
  86.208 -    }
  86.209 -    private StaticText staticText5 = new StaticText();
  86.210 -
  86.211 -    public StaticText getStaticText5() {
  86.212 -        return staticText5;
  86.213 -    }
  86.214 -
  86.215 -    public void setStaticText5(StaticText st) {
  86.216 -        this.staticText5 = st;
  86.217 -    }
  86.218 -    private PanelLayout rightSidebarPanel = new PanelLayout();
  86.219 -
  86.220 -    public PanelLayout getRightSidebarPanel() {
  86.221 -        return rightSidebarPanel;
  86.222 -    }
  86.223 -
  86.224 -    public void setRightSidebarPanel(PanelLayout pl) {
  86.225 -        this.rightSidebarPanel = pl;
  86.226 -    }
  86.227 -    private StaticText staticText6 = new StaticText();
  86.228 -
  86.229 -    public StaticText getStaticText6() {
  86.230 -        return staticText6;
  86.231 -    }
  86.232 -
  86.233 -    public void setStaticText6(StaticText st) {
  86.234 -        this.staticText6 = st;
  86.235 -    }
  86.236 -    private StaticText staticText7 = new StaticText();
  86.237 -
  86.238 -    public StaticText getStaticText7() {
  86.239 -        return staticText7;
  86.240 -    }
  86.241 -
  86.242 -    public void setStaticText7(StaticText st) {
  86.243 -        this.staticText7 = st;
  86.244 -    }
  86.245 -    private StaticText staticText8 = new StaticText();
  86.246 -
  86.247 -    public StaticText getStaticText8() {
  86.248 -        return staticText8;
  86.249 -    }
  86.250 -
  86.251 -    public void setStaticText8(StaticText st) {
  86.252 -        this.staticText8 = st;
  86.253 -    }
  86.254 -    private PanelLayout footerPanel = new PanelLayout();
  86.255 -
  86.256 -    public PanelLayout getFooterPanel() {
  86.257 -        return footerPanel;
  86.258 -    }
  86.259 -
  86.260 -    public void setFooterPanel(PanelLayout pl) {
  86.261 -        this.footerPanel = pl;
  86.262 -    }
  86.263 -    private StaticText staticText10 = new StaticText();
  86.264 -
  86.265 -    public StaticText getStaticText10() {
  86.266 -        return staticText10;
  86.267 -    }
  86.268 -
  86.269 -    public void setStaticText10(StaticText st) {
  86.270 -        this.staticText10 = st;
  86.271 -    }
  86.272 -    private PanelLayout mainContentPanel = new PanelLayout();
  86.273 -
  86.274 -    public PanelLayout getMainContentPanel() {
  86.275 -        return mainContentPanel;
  86.276 -    }
  86.277 -
  86.278 -    public void setMainContentPanel(PanelLayout pl) {
  86.279 -        this.mainContentPanel = pl;
  86.280 -    }
  86.281 -    private StaticText staticText11 = new StaticText();
  86.282 -
  86.283 -    public StaticText getStaticText11() {
  86.284 -        return staticText11;
  86.285 -    }
  86.286 -
  86.287 -    public void setStaticText11(StaticText st) {
  86.288 -        this.staticText11 = st;
  86.289 -    }
  86.290 -    private StaticText staticText12 = new StaticText();
  86.291 -
  86.292 -    public StaticText getStaticText12() {
  86.293 -        return staticText12;
  86.294 -    }
  86.295 -
  86.296 -    public void setStaticText12(StaticText st) {
  86.297 -        this.staticText12 = st;
  86.298 -    }
  86.299 -    private StaticText staticText13 = new StaticText();
  86.300 -
  86.301 -    public StaticText getStaticText13() {
  86.302 -        return staticText13;
  86.303 -    }
  86.304 -
  86.305 -    public void setStaticText13(StaticText st) {
  86.306 -        this.staticText13 = st;
  86.307 -    }
  86.308 -    private StaticText staticText14 = new StaticText();
  86.309 -
  86.310 -    public StaticText getStaticText14() {
  86.311 -        return staticText14;
  86.312 -    }
  86.313 -
  86.314 -    public void setStaticText14(StaticText st) {
  86.315 -        this.staticText14 = st;
  86.316 -    }
  86.317 -    private StaticText staticText15 = new StaticText();
  86.318 -
  86.319 -    public StaticText getStaticText15() {
  86.320 -        return staticText15;
  86.321 -    }
  86.322 -
  86.323 -    public void setStaticText15(StaticText st) {
  86.324 -        this.staticText15 = st;
  86.325 -    }
  86.326 -    private StaticText staticText16 = new StaticText();
  86.327 -
  86.328 -    public StaticText getStaticText16() {
  86.329 -        return staticText16;
  86.330 -    }
  86.331 -
  86.332 -    public void setStaticText16(StaticText st) {
  86.333 -        this.staticText16 = st;
  86.334 -    }
  86.335 -    private StaticText staticText17 = new StaticText();
  86.336 -
  86.337 -    public StaticText getStaticText17() {
  86.338 -        return staticText17;
  86.339 -    }
  86.340 -
  86.341 -    public void setStaticText17(StaticText st) {
  86.342 -        this.staticText17 = st;
  86.343 -    }
  86.344 -    private PanelLayout topNavigationPanel = new PanelLayout();
  86.345 -
  86.346 -    public PanelLayout getTopNavigationPanel() {
  86.347 -        return topNavigationPanel;
  86.348 -    }
  86.349 -
  86.350 -    public void setTopNavigationPanel(PanelLayout pl) {
  86.351 -        this.topNavigationPanel = pl;
  86.352 -    }
  86.353 -    private HtmlPanelGrid topNavigationGrid = new HtmlPanelGrid();
  86.354 -
  86.355 -    public HtmlPanelGrid getTopNavigationGrid() {
  86.356 -        return topNavigationGrid;
  86.357 -    }
  86.358 -
  86.359 -    public void setTopNavigationGrid(HtmlPanelGrid hpg) {
  86.360 -        this.topNavigationGrid = hpg;
  86.361 -    }
  86.362 -    private Hyperlink hyperlink1 = new Hyperlink();
  86.363 -
  86.364 -    public Hyperlink getHyperlink1() {
  86.365 -        return hyperlink1;
  86.366 -    }
  86.367 -
  86.368 -    public void setHyperlink1(Hyperlink h) {
  86.369 -        this.hyperlink1 = h;
  86.370 -    }
  86.371 -    private Hyperlink hyperlink2 = new Hyperlink();
  86.372 -
  86.373 -    public Hyperlink getHyperlink2() {
  86.374 -        return hyperlink2;
  86.375 -    }
  86.376 -
  86.377 -    public void setHyperlink2(Hyperlink h) {
  86.378 -        this.hyperlink2 = h;
  86.379 -    }
  86.380 -    private Hyperlink hyperlink3 = new Hyperlink();
  86.381 -
  86.382 -    public Hyperlink getHyperlink3() {
  86.383 -        return hyperlink3;
  86.384 -    }
  86.385 -
  86.386 -    public void setHyperlink3(Hyperlink h) {
  86.387 -        this.hyperlink3 = h;
  86.388 -    }
  86.389 -    private Hyperlink hyperlink4 = new Hyperlink();
  86.390 -
  86.391 -    public Hyperlink getHyperlink4() {
  86.392 -        return hyperlink4;
  86.393 -    }
  86.394 -
  86.395 -    public void setHyperlink4(Hyperlink h) {
  86.396 -        this.hyperlink4 = h;
  86.397 -    }
  86.398 -    private Hyperlink hyperlink5 = new Hyperlink();
  86.399 -
  86.400 -    public Hyperlink getHyperlink5() {
  86.401 -        return hyperlink5;
  86.402 -    }
  86.403 -
  86.404 -    public void setHyperlink5(Hyperlink h) {
  86.405 -        this.hyperlink5 = h;
  86.406 -    }
  86.407 -
  86.408 -    // </editor-fold>
  86.409 -
  86.410 -    /**
  86.411 -     * <p>Construct a new Page bean instance.</p>
  86.412 -     */
  86.413 -    public ${name}() {
  86.414 -    }
  86.415 -
  86.416 -    /**
  86.417 -     * <p>Callback method that is called whenever a page is navigated to,
  86.418 -     * either directly via a URL, or indirectly via page navigation.
  86.419 -     * Customize this method to acquire resources that will be needed
  86.420 -     * for event handlers and lifecycle methods, whether or not this
  86.421 -     * page is performing post back processing.</p>
  86.422 -     * 
  86.423 -     * <p>Note that, if the current request is a postback, the property
  86.424 -     * values of the components do <strong>not</strong> represent any
  86.425 -     * values submitted with this request.  Instead, they represent the
  86.426 -     * property values that were saved for this view when it was rendered.</p>
  86.427 -     */
  86.428 -    public void init() {
  86.429 -        // Perform initializations inherited from our superclass
  86.430 -        super.init();
  86.431 -        // Perform application initialization that must complete
  86.432 -        // *before* managed components are initialized
  86.433 -        // TODO - add your own initialiation code here
  86.434 -            
  86.435 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  86.436 -        // Initialize automatically managed components
  86.437 -        // *Note* - this logic should NOT be modified
  86.438 -        try {
  86.439 -            _init();
  86.440 -        } catch (Exception e) {
  86.441 -            log("Page1 Initialization Failure", e);
  86.442 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  86.443 -        }
  86.444 -        
  86.445 -        // </editor-fold>
  86.446 -        // Perform application initialization that must complete
  86.447 -        // *after* managed components are initialized
  86.448 -        // TODO - add your own initialization code here
  86.449 -    }
  86.450 -
  86.451 -    /**
  86.452 -     * <p>Callback method that is called after the component tree has been
  86.453 -     * restored, but before any event processing takes place.  This method
  86.454 -     * will <strong>only</strong> be called on a postback request that
  86.455 -     * is processing a form submit.  Customize this method to allocate
  86.456 -     * resources that will be required in your event handlers.</p>
  86.457 -     */
  86.458 -    public void preprocess() {
  86.459 -    }
  86.460 -
  86.461 -    /**
  86.462 -     * <p>Callback method that is called just before rendering takes place.
  86.463 -     * This method will <strong>only</strong> be called for the page that
  86.464 -     * will actually be rendered (and not, for example, on a page that
  86.465 -     * handled a postback and then navigated to a different page).  Customize
  86.466 -     * this method to allocate resources that will be required for rendering
  86.467 -     * this page.</p>
  86.468 -     */
  86.469 -    public void prerender() {
  86.470 -    }
  86.471 -
  86.472 -    /**
  86.473 -     * <p>Callback method that is called after rendering is completed for
  86.474 -     * this request, if <code>init()</code> was called (regardless of whether
  86.475 -     * or not this was the page that was actually rendered).  Customize this
  86.476 -     * method to release resources acquired in the <code>init()</code>,
  86.477 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  86.478 -     * acquired during execution of an event handler).</p>
  86.479 -     */
  86.480 -    public void destroy() {
  86.481 -    }
  86.482 -
  86.483 -    /**
  86.484 -     * <p>Return a reference to the scoped data bean.</p>
  86.485 -     */
  86.486 -    protected RequestBean1 getRequestBean1() {
  86.487 -        return (RequestBean1) getBean("RequestBean1");
  86.488 -    }
  86.489 -
  86.490 -    /**
  86.491 -     * <p>Return a reference to the scoped data bean.</p>
  86.492 -     */
  86.493 -    protected SessionBean1 getSessionBean1() {
  86.494 -        return (SessionBean1) getBean("SessionBean1");
  86.495 -    }
  86.496 -
  86.497 -    /**
  86.498 -     * <p>Return a reference to the scoped data bean.</p>
  86.499 -     */
  86.500 -    protected ApplicationBean1 getApplicationBean1() {
  86.501 -        return (ApplicationBean1) getBean("ApplicationBean1");
  86.502 -    }
  86.503 -}
  86.504 -
    87.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate10.jsp.template	Wed Feb 23 20:05:40 2011 -0500
    87.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    87.3 @@ -1,65 +0,0 @@
    87.4 -<#assign pound = '#'>
    87.5 -<?xml version="1.0" encoding="${encoding}"?>
    87.6 -<!--
    87.7 -Document   : ${name}
    87.8 -Created on : ${date}, ${time}
    87.9 -Author     : ${user}
   87.10 --->
   87.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
   87.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
   87.13 -    <f:view>
   87.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
   87.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
   87.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
   87.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
   87.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout10.css"/>
   87.19 -                </webuijsf:head>
   87.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
   87.21 -                    <br/>
   87.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
   87.23 -                        <div id="container">
   87.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
   87.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
   87.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
   87.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.28 -                            </webuijsf:panelLayout>
   87.29 -                            <!-- end ${pound}container -->
   87.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.topNavigationPanel}" id="topNavigationPanel" panelLayout="flow" styleClass="topNavigationBar">
   87.31 -                                <h:panelGrid binding="${pound}{${folder}${name}.topNavigationGrid}" columns="5" id="topNavigationGrid">
   87.32 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink1}" id="hyperlink1" text="Hyperlink"/>
   87.33 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink2}" id="hyperlink2" text="Hyperlink"/>
   87.34 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink3}" id="hyperlink3" text="Hyperlink"/>
   87.35 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink4}" id="hyperlink4" text="Hyperlink"/>
   87.36 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink5}" id="hyperlink5" text="Hyperlink"/>
   87.37 -                                </h:panelGrid>
   87.38 -                            </webuijsf:panelLayout>
   87.39 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.leftSidebarPanel}" id="leftSidebarPanel" panelLayout="flow" styleClass="leftSidebar">
   87.40 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText2}" escape="false" id="staticText2" text="&lt;h2&gt;Left Sidebar&lt;/h2&gt;"/>
   87.41 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText3}" escape="false" id="staticText3" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.42 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText4}" escape="false" id="staticText4" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.43 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText5}" escape="false" id="staticText5" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.44 -                            </webuijsf:panelLayout>
   87.45 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.rightSidebarPanel}" id="rightSidebarPanel" panelLayout="flow" styleClass="rightSidebar">
   87.46 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText6}" escape="false" id="staticText6" text="&lt;h2&gt;Right Sidebar&lt;/h2&gt;"/>
   87.47 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText7}" escape="false" id="staticText7" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.48 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText8}" escape="false" id="staticText8" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.49 -                            </webuijsf:panelLayout>
   87.50 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
   87.51 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
   87.52 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.53 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
   87.54 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.55 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.56 -                            </webuijsf:panelLayout>
   87.57 -                            <br class="clearfloat"/>
   87.58 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.footerPanel}" id="footerPanel" panelLayout="flow" styleClass="footer">
   87.59 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText10}" escape="false" id="staticText10" text="&lt;h4&gt;Footer&lt;/h4&gt;"/>
   87.60 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText17}" escape="false" id="staticText17" text="Sub Footer&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   87.61 -                            </webuijsf:panelLayout>
   87.62 -                        </div>
   87.63 -                    </webuijsf:form>
   87.64 -                </webuijsf:body>
   87.65 -            </webuijsf:html>
   87.66 -        </webuijsf:page>
   87.67 -    </f:view>
   87.68 -</jsp:root>
    88.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate11.java.template	Wed Feb 23 20:05:40 2011 -0500
    88.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.3 @@ -1,528 +0,0 @@
    88.4 -/*
    88.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    88.6 - *
    88.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    88.8 - *
    88.9 - * The contents of this file are subject to the terms of either the GNU
   88.10 - * General Public License Version 2 only ("GPL") or the Common
   88.11 - * Development and Distribution License("CDDL") (collectively, the
   88.12 - * "License"). You may not use this file except in compliance with the
   88.13 - * License. You can obtain a copy of the License at
   88.14 - * http://www.netbeans.org/cddl-gplv2.html
   88.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   88.16 - * specific language governing permissions and limitations under the
   88.17 - * License.  When distributing the software, include this License Header
   88.18 - * Notice in each file and include the License file at
   88.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   88.20 - * particular file as subject to the "Classpath" exception as provided
   88.21 - * by Sun in the GPL Version 2 section of the License file that
   88.22 - * accompanied this code. If applicable, add the following below the
   88.23 - * License Header, with the fields enclosed by brackets [] replaced by
   88.24 - * your own identifying information:
   88.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   88.26 - *
   88.27 - * Contributor(s):
   88.28 - *
   88.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   88.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   88.31 - * Microsystems, Inc. All Rights Reserved.
   88.32 - *
   88.33 - * If you wish your version of this file to be governed by only the CDDL
   88.34 - * or only the GPL Version 2, indicate your decision by adding
   88.35 - * "[Contributor] elects to include this software in this distribution
   88.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   88.37 - * single choice of license, a recipient has the option to distribute
   88.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   88.39 - * to extend the choice of license to its licensees as provided above.
   88.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   88.41 - * Version 2 license, then the option applies only if the new code is
   88.42 - * made subject to such option by the copyright holder.
   88.43 - */
   88.44 -
   88.45 -/*
   88.46 - * ${name}.java
   88.47 - *
   88.48 - * Created on ${date}, ${time}
   88.49 - * Copyright ${user}
   88.50 - */
   88.51 -<#if package?? && package != "">
   88.52 -package ${package};
   88.53 -</#if>
   88.54 -
   88.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   88.56 -import com.sun.webui.jsf.component.Body;
   88.57 -import com.sun.webui.jsf.component.Form;
   88.58 -import com.sun.webui.jsf.component.Head;
   88.59 -import com.sun.webui.jsf.component.Html;
   88.60 -import com.sun.webui.jsf.component.Hyperlink;
   88.61 -import com.sun.webui.jsf.component.Link;
   88.62 -import com.sun.webui.jsf.component.Page;
   88.63 -import com.sun.webui.jsf.component.PanelLayout;
   88.64 -import com.sun.webui.jsf.component.StaticText;
   88.65 -import javax.faces.FacesException;
   88.66 -import javax.faces.component.html.HtmlPanelGrid;
   88.67 -
   88.68 -/**
   88.69 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   88.70 - * class contains component definitions (and initialization code) for
   88.71 - * all components that you have defined on this page, as well as
   88.72 - * lifecycle methods and event handlers where you may add behavior
   88.73 - * to respond to incoming events.</p>
   88.74 - */
   88.75 -public class ${name} extends AbstractPageBean {
   88.76 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   88.77 -    private int __placeholder;
   88.78 -
   88.79 -    /**
   88.80 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   88.81 -     * This method is automatically generated, so any user-specified code inserted
   88.82 -     * here is subject to being replaced.</p>
   88.83 -     */
   88.84 -    private void _init() throws Exception {
   88.85 -    }
   88.86 -
   88.87 -    private Page page1 = new Page();
   88.88 -    
   88.89 -    public Page getPage1() {
   88.90 -        return page1;
   88.91 -    }
   88.92 -    
   88.93 -    public void setPage1(Page p) {
   88.94 -        this.page1 = p;
   88.95 -    }
   88.96 -    
   88.97 -    private Html html1 = new Html();
   88.98 -    
   88.99 -    public Html getHtml1() {
  88.100 -        return html1;
  88.101 -    }
  88.102 -    
  88.103 -    public void setHtml1(Html h) {
  88.104 -        this.html1 = h;
  88.105 -    }
  88.106 -    
  88.107 -    private Head head1 = new Head();
  88.108 -    
  88.109 -    public Head getHead1() {
  88.110 -        return head1;
  88.111 -    }
  88.112 -    
  88.113 -    public void setHead1(Head h) {
  88.114 -        this.head1 = h;
  88.115 -    }
  88.116 -    
  88.117 -    private Link link1 = new Link();
  88.118 -    
  88.119 -    public Link getLink1() {
  88.120 -        return link1;
  88.121 -    }
  88.122 -    
  88.123 -    public void setLink1(Link l) {
  88.124 -        this.link1 = l;
  88.125 -    }
  88.126 -    
  88.127 -    private Body body1 = new Body();
  88.128 -    
  88.129 -    public Body getBody1() {
  88.130 -        return body1;
  88.131 -    }
  88.132 -    
  88.133 -    public void setBody1(Body b) {
  88.134 -        this.body1 = b;
  88.135 -    }
  88.136 -    
  88.137 -    private Form form1 = new Form();
  88.138 -    
  88.139 -    public Form getForm1() {
  88.140 -        return form1;
  88.141 -    }
  88.142 -    
  88.143 -    public void setForm1(Form f) {
  88.144 -        this.form1 = f;
  88.145 -    }
  88.146 -    private Link link2 = new Link();
  88.147 -
  88.148 -    public Link getLink2() {
  88.149 -        return link2;
  88.150 -    }
  88.151 -
  88.152 -    public void setLink2(Link l) {
  88.153 -        this.link2 = l;
  88.154 -    }
  88.155 -    private PanelLayout headerPanel = new PanelLayout();
  88.156 -
  88.157 -    public PanelLayout getHeaderPanel() {
  88.158 -        return headerPanel;
  88.159 -    }
  88.160 -
  88.161 -    public void setHeaderPanel(PanelLayout pl) {
  88.162 -        this.headerPanel = pl;
  88.163 -    }
  88.164 -    private StaticText staticText1 = new StaticText();
  88.165 -
  88.166 -    public StaticText getStaticText1() {
  88.167 -        return staticText1;
  88.168 -    }
  88.169 -
  88.170 -    public void setStaticText1(StaticText st) {
  88.171 -        this.staticText1 = st;
  88.172 -    }
  88.173 -    private PanelLayout leftSidebarPanel = new PanelLayout();
  88.174 -
  88.175 -    public PanelLayout getLeftSidebarPanel() {
  88.176 -        return leftSidebarPanel;
  88.177 -    }
  88.178 -
  88.179 -    public void setLeftSidebarPanel(PanelLayout pl) {
  88.180 -        this.leftSidebarPanel = pl;
  88.181 -    }
  88.182 -    private StaticText staticText2 = new StaticText();
  88.183 -
  88.184 -    public StaticText getStaticText2() {
  88.185 -        return staticText2;
  88.186 -    }
  88.187 -
  88.188 -    public void setStaticText2(StaticText st) {
  88.189 -        this.staticText2 = st;
  88.190 -    }
  88.191 -    private PanelLayout rightSidebarPanel = new PanelLayout();
  88.192 -
  88.193 -    public PanelLayout getRightSidebarPanel() {
  88.194 -        return rightSidebarPanel;
  88.195 -    }
  88.196 -
  88.197 -    public void setRightSidebarPanel(PanelLayout pl) {
  88.198 -        this.rightSidebarPanel = pl;
  88.199 -    }
  88.200 -    private StaticText staticText6 = new StaticText();
  88.201 -
  88.202 -    public StaticText getStaticText6() {
  88.203 -        return staticText6;
  88.204 -    }
  88.205 -
  88.206 -    public void setStaticText6(StaticText st) {
  88.207 -        this.staticText6 = st;
  88.208 -    }
  88.209 -    private StaticText staticText7 = new StaticText();
  88.210 -
  88.211 -    public StaticText getStaticText7() {
  88.212 -        return staticText7;
  88.213 -    }
  88.214 -
  88.215 -    public void setStaticText7(StaticText st) {
  88.216 -        this.staticText7 = st;
  88.217 -    }
  88.218 -    private StaticText staticText8 = new StaticText();
  88.219 -
  88.220 -    public StaticText getStaticText8() {
  88.221 -        return staticText8;
  88.222 -    }
  88.223 -
  88.224 -    public void setStaticText8(StaticText st) {
  88.225 -        this.staticText8 = st;
  88.226 -    }
  88.227 -    private PanelLayout footerPanel = new PanelLayout();
  88.228 -
  88.229 -    public PanelLayout getFooterPanel() {
  88.230 -        return footerPanel;
  88.231 -    }
  88.232 -
  88.233 -    public void setFooterPanel(PanelLayout pl) {
  88.234 -        this.footerPanel = pl;
  88.235 -    }
  88.236 -    private StaticText staticText10 = new StaticText();
  88.237 -
  88.238 -    public StaticText getStaticText10() {
  88.239 -        return staticText10;
  88.240 -    }
  88.241 -
  88.242 -    public void setStaticText10(StaticText st) {
  88.243 -        this.staticText10 = st;
  88.244 -    }
  88.245 -    private PanelLayout mainContentPanel = new PanelLayout();
  88.246 -
  88.247 -    public PanelLayout getMainContentPanel() {
  88.248 -        return mainContentPanel;
  88.249 -    }
  88.250 -
  88.251 -    public void setMainContentPanel(PanelLayout pl) {
  88.252 -        this.mainContentPanel = pl;
  88.253 -    }
  88.254 -    private StaticText staticText11 = new StaticText();
  88.255 -
  88.256 -    public StaticText getStaticText11() {
  88.257 -        return staticText11;
  88.258 -    }
  88.259 -
  88.260 -    public void setStaticText11(StaticText st) {
  88.261 -        this.staticText11 = st;
  88.262 -    }
  88.263 -    private StaticText staticText12 = new StaticText();
  88.264 -
  88.265 -    public StaticText getStaticText12() {
  88.266 -        return staticText12;
  88.267 -    }
  88.268 -
  88.269 -    public void setStaticText12(StaticText st) {
  88.270 -        this.staticText12 = st;
  88.271 -    }
  88.272 -    private StaticText staticText13 = new StaticText();
  88.273 -
  88.274 -    public StaticText getStaticText13() {
  88.275 -        return staticText13;
  88.276 -    }
  88.277 -
  88.278 -    public void setStaticText13(StaticText st) {
  88.279 -        this.staticText13 = st;
  88.280 -    }
  88.281 -    private StaticText staticText14 = new StaticText();
  88.282 -
  88.283 -    public StaticText getStaticText14() {
  88.284 -        return staticText14;
  88.285 -    }
  88.286 -
  88.287 -    public void setStaticText14(StaticText st) {
  88.288 -        this.staticText14 = st;
  88.289 -    }
  88.290 -    private StaticText staticText15 = new StaticText();
  88.291 -
  88.292 -    public StaticText getStaticText15() {
  88.293 -        return staticText15;
  88.294 -    }
  88.295 -
  88.296 -    public void setStaticText15(StaticText st) {
  88.297 -        this.staticText15 = st;
  88.298 -    }
  88.299 -    private StaticText staticText16 = new StaticText();
  88.300 -
  88.301 -    public StaticText getStaticText16() {
  88.302 -        return staticText16;
  88.303 -    }
  88.304 -
  88.305 -    public void setStaticText16(StaticText st) {
  88.306 -        this.staticText16 = st;
  88.307 -    }
  88.308 -    private StaticText staticText17 = new StaticText();
  88.309 -
  88.310 -    public StaticText getStaticText17() {
  88.311 -        return staticText17;
  88.312 -    }
  88.313 -
  88.314 -    public void setStaticText17(StaticText st) {
  88.315 -        this.staticText17 = st;
  88.316 -    }
  88.317 -    private PanelLayout topNavigationPanel = new PanelLayout();
  88.318 -
  88.319 -    public PanelLayout getTopNavigationPanel() {
  88.320 -        return topNavigationPanel;
  88.321 -    }
  88.322 -
  88.323 -    public void setTopNavigationPanel(PanelLayout pl) {
  88.324 -        this.topNavigationPanel = pl;
  88.325 -    }
  88.326 -    private HtmlPanelGrid topNavigationGrid = new HtmlPanelGrid();
  88.327 -
  88.328 -    public HtmlPanelGrid getTopNavigationGrid() {
  88.329 -        return topNavigationGrid;
  88.330 -    }
  88.331 -
  88.332 -    public void setTopNavigationGrid(HtmlPanelGrid hpg) {
  88.333 -        this.topNavigationGrid = hpg;
  88.334 -    }
  88.335 -    private Hyperlink hyperlink1 = new Hyperlink();
  88.336 -
  88.337 -    public Hyperlink getHyperlink1() {
  88.338 -        return hyperlink1;
  88.339 -    }
  88.340 -
  88.341 -    public void setHyperlink1(Hyperlink h) {
  88.342 -        this.hyperlink1 = h;
  88.343 -    }
  88.344 -    private Hyperlink hyperlink2 = new Hyperlink();
  88.345 -
  88.346 -    public Hyperlink getHyperlink2() {
  88.347 -        return hyperlink2;
  88.348 -    }
  88.349 -
  88.350 -    public void setHyperlink2(Hyperlink h) {
  88.351 -        this.hyperlink2 = h;
  88.352 -    }
  88.353 -    private Hyperlink hyperlink3 = new Hyperlink();
  88.354 -
  88.355 -    public Hyperlink getHyperlink3() {
  88.356 -        return hyperlink3;
  88.357 -    }
  88.358 -
  88.359 -    public void setHyperlink3(Hyperlink h) {
  88.360 -        this.hyperlink3 = h;
  88.361 -    }
  88.362 -    private Hyperlink hyperlink4 = new Hyperlink();
  88.363 -
  88.364 -    public Hyperlink getHyperlink4() {
  88.365 -        return hyperlink4;
  88.366 -    }
  88.367 -
  88.368 -    public void setHyperlink4(Hyperlink h) {
  88.369 -        this.hyperlink4 = h;
  88.370 -    }
  88.371 -    private Hyperlink hyperlink5 = new Hyperlink();
  88.372 -
  88.373 -    public Hyperlink getHyperlink5() {
  88.374 -        return hyperlink5;
  88.375 -    }
  88.376 -
  88.377 -    public void setHyperlink5(Hyperlink h) {
  88.378 -        this.hyperlink5 = h;
  88.379 -    }
  88.380 -    private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
  88.381 -
  88.382 -    public HtmlPanelGrid getGridPanel1() {
  88.383 -        return gridPanel1;
  88.384 -    }
  88.385 -
  88.386 -    public void setGridPanel1(HtmlPanelGrid hpg) {
  88.387 -        this.gridPanel1 = hpg;
  88.388 -    }
  88.389 -    private Hyperlink hyperlink6 = new Hyperlink();
  88.390 -
  88.391 -    public Hyperlink getHyperlink6() {
  88.392 -        return hyperlink6;
  88.393 -    }
  88.394 -
  88.395 -    public void setHyperlink6(Hyperlink h) {
  88.396 -        this.hyperlink6 = h;
  88.397 -    }
  88.398 -    private Hyperlink hyperlink7 = new Hyperlink();
  88.399 -
  88.400 -    public Hyperlink getHyperlink7() {
  88.401 -        return hyperlink7;
  88.402 -    }
  88.403 -
  88.404 -    public void setHyperlink7(Hyperlink h) {
  88.405 -        this.hyperlink7 = h;
  88.406 -    }
  88.407 -    private Hyperlink hyperlink8 = new Hyperlink();
  88.408 -
  88.409 -    public Hyperlink getHyperlink8() {
  88.410 -        return hyperlink8;
  88.411 -    }
  88.412 -
  88.413 -    public void setHyperlink8(Hyperlink h) {
  88.414 -        this.hyperlink8 = h;
  88.415 -    }
  88.416 -    private Hyperlink hyperlink9 = new Hyperlink();
  88.417 -
  88.418 -    public Hyperlink getHyperlink9() {
  88.419 -        return hyperlink9;
  88.420 -    }
  88.421 -
  88.422 -    public void setHyperlink9(Hyperlink h) {
  88.423 -        this.hyperlink9 = h;
  88.424 -    }
  88.425 -    private Hyperlink hyperlink10 = new Hyperlink();
  88.426 -
  88.427 -    public Hyperlink getHyperlink10() {
  88.428 -        return hyperlink10;
  88.429 -    }
  88.430 -
  88.431 -    public void setHyperlink10(Hyperlink h) {
  88.432 -        this.hyperlink10 = h;
  88.433 -    }
  88.434 -
  88.435 -    // </editor-fold>
  88.436 -
  88.437 -    /**
  88.438 -     * <p>Construct a new Page bean instance.</p>
  88.439 -     */
  88.440 -    public ${name}() {
  88.441 -    }
  88.442 -
  88.443 -    /**
  88.444 -     * <p>Callback method that is called whenever a page is navigated to,
  88.445 -     * either directly via a URL, or indirectly via page navigation.
  88.446 -     * Customize this method to acquire resources that will be needed
  88.447 -     * for event handlers and lifecycle methods, whether or not this
  88.448 -     * page is performing post back processing.</p>
  88.449 -     * 
  88.450 -     * <p>Note that, if the current request is a postback, the property
  88.451 -     * values of the components do <strong>not</strong> represent any
  88.452 -     * values submitted with this request.  Instead, they represent the
  88.453 -     * property values that were saved for this view when it was rendered.</p>
  88.454 -     */
  88.455 -    public void init() {
  88.456 -        // Perform initializations inherited from our superclass
  88.457 -        super.init();
  88.458 -        // Perform application initialization that must complete
  88.459 -        // *before* managed components are initialized
  88.460 -        // TODO - add your own initialiation code here
  88.461 -            
  88.462 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  88.463 -        // Initialize automatically managed components
  88.464 -        // *Note* - this logic should NOT be modified
  88.465 -        try {
  88.466 -            _init();
  88.467 -        } catch (Exception e) {
  88.468 -            log("Page1 Initialization Failure", e);
  88.469 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  88.470 -        }
  88.471 -        
  88.472 -        // </editor-fold>
  88.473 -        // Perform application initialization that must complete
  88.474 -        // *after* managed components are initialized
  88.475 -        // TODO - add your own initialization code here
  88.476 -    }
  88.477 -
  88.478 -    /**
  88.479 -     * <p>Callback method that is called after the component tree has been
  88.480 -     * restored, but before any event processing takes place.  This method
  88.481 -     * will <strong>only</strong> be called on a postback request that
  88.482 -     * is processing a form submit.  Customize this method to allocate
  88.483 -     * resources that will be required in your event handlers.</p>
  88.484 -     */
  88.485 -    public void preprocess() {
  88.486 -    }
  88.487 -
  88.488 -    /**
  88.489 -     * <p>Callback method that is called just before rendering takes place.
  88.490 -     * This method will <strong>only</strong> be called for the page that
  88.491 -     * will actually be rendered (and not, for example, on a page that
  88.492 -     * handled a postback and then navigated to a different page).  Customize
  88.493 -     * this method to allocate resources that will be required for rendering
  88.494 -     * this page.</p>
  88.495 -     */
  88.496 -    public void prerender() {
  88.497 -    }
  88.498 -
  88.499 -    /**
  88.500 -     * <p>Callback method that is called after rendering is completed for
  88.501 -     * this request, if <code>init()</code> was called (regardless of whether
  88.502 -     * or not this was the page that was actually rendered).  Customize this
  88.503 -     * method to release resources acquired in the <code>init()</code>,
  88.504 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  88.505 -     * acquired during execution of an event handler).</p>
  88.506 -     */
  88.507 -    public void destroy() {
  88.508 -    }
  88.509 -
  88.510 -    /**
  88.511 -     * <p>Return a reference to the scoped data bean.</p>
  88.512 -     */
  88.513 -    protected RequestBean1 getRequestBean1() {
  88.514 -        return (RequestBean1) getBean("RequestBean1");
  88.515 -    }
  88.516 -
  88.517 -    /**
  88.518 -     * <p>Return a reference to the scoped data bean.</p>
  88.519 -     */
  88.520 -    protected SessionBean1 getSessionBean1() {
  88.521 -        return (SessionBean1) getBean("SessionBean1");
  88.522 -    }
  88.523 -
  88.524 -    /**
  88.525 -     * <p>Return a reference to the scoped data bean.</p>
  88.526 -     */
  88.527 -    protected ApplicationBean1 getApplicationBean1() {
  88.528 -        return (ApplicationBean1) getBean("ApplicationBean1");
  88.529 -    }
  88.530 -}
  88.531 -
    89.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate11.jsp.template	Wed Feb 23 20:05:40 2011 -0500
    89.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    89.3 @@ -1,69 +0,0 @@
    89.4 -<#assign pound = '#'>
    89.5 -<?xml version="1.0" encoding="${encoding}"?>
    89.6 -<!--
    89.7 -Document   : ${name}
    89.8 -Created on : ${date}, ${time}
    89.9 -Author     : ${user}
   89.10 --->
   89.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
   89.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
   89.13 -    <f:view>
   89.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
   89.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
   89.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
   89.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
   89.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout11.css"/>
   89.19 -                </webuijsf:head>
   89.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
   89.21 -                    <br/>
   89.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
   89.23 -                        <div id="container">
   89.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
   89.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
   89.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
   89.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   89.28 -                            </webuijsf:panelLayout>
   89.29 -                            <!-- end ${pound}container -->
   89.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.topNavigationPanel}" id="topNavigationPanel" panelLayout="flow" styleClass="topNavigationBar">
   89.31 -                                <h:panelGrid binding="${pound}{${folder}${name}.topNavigationGrid}" columns="5" id="topNavigationGrid">
   89.32 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink1}" id="hyperlink1" text="Hyperlink"/>
   89.33 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink2}" id="hyperlink2" text="Hyperlink"/>
   89.34 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink3}" id="hyperlink3" text="Hyperlink"/>
   89.35 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink4}" id="hyperlink4" text="Hyperlink"/>
   89.36 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink5}" id="hyperlink5" text="Hyperlink"/>
   89.37 -                                </h:panelGrid>
   89.38 -                            </webuijsf:panelLayout>
   89.39 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.leftSidebarPanel}" id="leftSidebarPanel" panelLayout="flow" styleClass="leftNavigationBar">
   89.40 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText2}" escape="false" id="staticText2" text="&lt;h3&gt;Left Navigation Bar&lt;/h3&gt;"/>
   89.41 -                                <h:panelGrid binding="${pound}{${folder}${name}.gridPanel1}" id="gridPanel1" style="width: 100%" styleClass="navigation">
   89.42 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink6}" id="hyperlink6" text="Hyperlink1"/>
   89.43 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink7}" id="hyperlink7" text="Hyperlink2"/>
   89.44 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink8}" id="hyperlink8" text="Hyperlink3"/>
   89.45 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink9}" id="hyperlink9" text="Hyperlink4"/>
   89.46 -                                    <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink10}" id="hyperlink10" text="Hyperlink5"/>
   89.47 -                                </h:panelGrid>
   89.48 -                            </webuijsf:panelLayout>
   89.49 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.rightSidebarPanel}" id="rightSidebarPanel" panelLayout="flow" styleClass="rightSidebar">
   89.50 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText6}" escape="false" id="staticText6" text="&lt;h2&gt;Right Sidebar&lt;/h2&gt;"/>
   89.51 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText7}" escape="false" id="staticText7" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   89.52 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText8}" escape="false" id="staticText8" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   89.53 -                            </webuijsf:panelLayout>
   89.54 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
   89.55 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
   89.56 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   89.57 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
   89.58 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   89.59 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   89.60 -                            </webuijsf:panelLayout>
   89.61 -                            <br class="clearfloat"/>
   89.62 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.footerPanel}" id="footerPanel" panelLayout="flow" styleClass="footer">
   89.63 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText10}" escape="false" id="staticText10" text="&lt;h4&gt;Footer&lt;/h4&gt;"/>
   89.64 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText17}" escape="false" id="staticText17" text="Sub Footer&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   89.65 -                            </webuijsf:panelLayout>
   89.66 -                        </div>
   89.67 -                    </webuijsf:form>
   89.68 -                </webuijsf:body>
   89.69 -            </webuijsf:html>
   89.70 -        </webuijsf:page>
   89.71 -    </f:view>
   89.72 -</jsp:root>
    90.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate2.java.template	Wed Feb 23 20:05:40 2011 -0500
    90.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    90.3 @@ -1,328 +0,0 @@
    90.4 -/*
    90.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    90.6 - *
    90.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    90.8 - *
    90.9 - * The contents of this file are subject to the terms of either the GNU
   90.10 - * General Public License Version 2 only ("GPL") or the Common
   90.11 - * Development and Distribution License("CDDL") (collectively, the
   90.12 - * "License"). You may not use this file except in compliance with the
   90.13 - * License. You can obtain a copy of the License at
   90.14 - * http://www.netbeans.org/cddl-gplv2.html
   90.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   90.16 - * specific language governing permissions and limitations under the
   90.17 - * License.  When distributing the software, include this License Header
   90.18 - * Notice in each file and include the License file at
   90.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   90.20 - * particular file as subject to the "Classpath" exception as provided
   90.21 - * by Sun in the GPL Version 2 section of the License file that
   90.22 - * accompanied this code. If applicable, add the following below the
   90.23 - * License Header, with the fields enclosed by brackets [] replaced by
   90.24 - * your own identifying information:
   90.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   90.26 - *
   90.27 - * Contributor(s):
   90.28 - *
   90.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   90.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   90.31 - * Microsystems, Inc. All Rights Reserved.
   90.32 - *
   90.33 - * If you wish your version of this file to be governed by only the CDDL
   90.34 - * or only the GPL Version 2, indicate your decision by adding
   90.35 - * "[Contributor] elects to include this software in this distribution
   90.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   90.37 - * single choice of license, a recipient has the option to distribute
   90.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   90.39 - * to extend the choice of license to its licensees as provided above.
   90.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   90.41 - * Version 2 license, then the option applies only if the new code is
   90.42 - * made subject to such option by the copyright holder.
   90.43 - */
   90.44 -
   90.45 -/*
   90.46 - * ${name}.java
   90.47 - *
   90.48 - * Created on ${date}, ${time}
   90.49 - * Copyright ${user}
   90.50 - */
   90.51 -<#if package?? && package != "">
   90.52 -package ${package};
   90.53 -</#if>
   90.54 -
   90.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   90.56 -import com.sun.webui.jsf.component.Body;
   90.57 -import com.sun.webui.jsf.component.Form;
   90.58 -import com.sun.webui.jsf.component.Head;
   90.59 -import com.sun.webui.jsf.component.Html;
   90.60 -import com.sun.webui.jsf.component.Link;
   90.61 -import com.sun.webui.jsf.component.Page;
   90.62 -import com.sun.webui.jsf.component.PanelLayout;
   90.63 -import com.sun.webui.jsf.component.StaticText;
   90.64 -import javax.faces.FacesException;
   90.65 -
   90.66 -/**
   90.67 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   90.68 - * class contains component definitions (and initialization code) for
   90.69 - * all components that you have defined on this page, as well as
   90.70 - * lifecycle methods and event handlers where you may add behavior
   90.71 - * to respond to incoming events.</p>
   90.72 - */
   90.73 -public class ${name} extends AbstractPageBean {
   90.74 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   90.75 -    private int __placeholder;
   90.76 -
   90.77 -    /**
   90.78 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   90.79 -     * This method is automatically generated, so any user-specified code inserted
   90.80 -     * here is subject to being replaced.</p>
   90.81 -     */
   90.82 -    private void _init() throws Exception {
   90.83 -    }
   90.84 -
   90.85 -    private Page page1 = new Page();
   90.86 -    
   90.87 -    public Page getPage1() {
   90.88 -        return page1;
   90.89 -    }
   90.90 -    
   90.91 -    public void setPage1(Page p) {
   90.92 -        this.page1 = p;
   90.93 -    }
   90.94 -    
   90.95 -    private Html html1 = new Html();
   90.96 -    
   90.97 -    public Html getHtml1() {
   90.98 -        return html1;
   90.99 -    }
  90.100 -    
  90.101 -    public void setHtml1(Html h) {
  90.102 -        this.html1 = h;
  90.103 -    }
  90.104 -    
  90.105 -    private Head head1 = new Head();
  90.106 -    
  90.107 -    public Head getHead1() {
  90.108 -        return head1;
  90.109 -    }
  90.110 -    
  90.111 -    public void setHead1(Head h) {
  90.112 -        this.head1 = h;
  90.113 -    }
  90.114 -    
  90.115 -    private Link link1 = new Link();
  90.116 -    
  90.117 -    public Link getLink1() {
  90.118 -        return link1;
  90.119 -    }
  90.120 -    
  90.121 -    public void setLink1(Link l) {
  90.122 -        this.link1 = l;
  90.123 -    }
  90.124 -    
  90.125 -    private Body body1 = new Body();
  90.126 -    
  90.127 -    public Body getBody1() {
  90.128 -        return body1;
  90.129 -    }
  90.130 -    
  90.131 -    public void setBody1(Body b) {
  90.132 -        this.body1 = b;
  90.133 -    }
  90.134 -    
  90.135 -    private Form form1 = new Form();
  90.136 -    
  90.137 -    public Form getForm1() {
  90.138 -        return form1;
  90.139 -    }
  90.140 -    
  90.141 -    public void setForm1(Form f) {
  90.142 -        this.form1 = f;
  90.143 -    }
  90.144 -    private Link link2 = new Link();
  90.145 -
  90.146 -    public Link getLink2() {
  90.147 -        return link2;
  90.148 -    }
  90.149 -
  90.150 -    public void setLink2(Link l) {
  90.151 -        this.link2 = l;
  90.152 -    }
  90.153 -    private PanelLayout headerPanel = new PanelLayout();
  90.154 -
  90.155 -    public PanelLayout getHeaderPanel() {
  90.156 -        return headerPanel;
  90.157 -    }
  90.158 -
  90.159 -    public void setHeaderPanel(PanelLayout pl) {
  90.160 -        this.headerPanel = pl;
  90.161 -    }
  90.162 -    private StaticText staticText1 = new StaticText();
  90.163 -
  90.164 -    public StaticText getStaticText1() {
  90.165 -        return staticText1;
  90.166 -    }
  90.167 -
  90.168 -    public void setStaticText1(StaticText st) {
  90.169 -        this.staticText1 = st;
  90.170 -    }
  90.171 -    private PanelLayout mainContentPanel = new PanelLayout();
  90.172 -
  90.173 -    public PanelLayout getMainContentPanel() {
  90.174 -        return mainContentPanel;
  90.175 -    }
  90.176 -
  90.177 -    public void setMainContentPanel(PanelLayout pl) {
  90.178 -        this.mainContentPanel = pl;
  90.179 -    }
  90.180 -    private StaticText staticText11 = new StaticText();
  90.181 -
  90.182 -    public StaticText getStaticText11() {
  90.183 -        return staticText11;
  90.184 -    }
  90.185 -
  90.186 -    public void setStaticText11(StaticText st) {
  90.187 -        this.staticText11 = st;
  90.188 -    }
  90.189 -    private StaticText staticText12 = new StaticText();
  90.190 -
  90.191 -    public StaticText getStaticText12() {
  90.192 -        return staticText12;
  90.193 -    }
  90.194 -
  90.195 -    public void setStaticText12(StaticText st) {
  90.196 -        this.staticText12 = st;
  90.197 -    }
  90.198 -    private StaticText staticText13 = new StaticText();
  90.199 -
  90.200 -    public StaticText getStaticText13() {
  90.201 -        return staticText13;
  90.202 -    }
  90.203 -
  90.204 -    public void setStaticText13(StaticText st) {
  90.205 -        this.staticText13 = st;
  90.206 -    }
  90.207 -    private StaticText staticText14 = new StaticText();
  90.208 -
  90.209 -    public StaticText getStaticText14() {
  90.210 -        return staticText14;
  90.211 -    }
  90.212 -
  90.213 -    public void setStaticText14(StaticText st) {
  90.214 -        this.staticText14 = st;
  90.215 -    }
  90.216 -    private StaticText staticText15 = new StaticText();
  90.217 -
  90.218 -    public StaticText getStaticText15() {
  90.219 -        return staticText15;
  90.220 -    }
  90.221 -
  90.222 -    public void setStaticText15(StaticText st) {
  90.223 -        this.staticText15 = st;
  90.224 -    }
  90.225 -    private StaticText staticText2 = new StaticText();
  90.226 -
  90.227 -    public StaticText getStaticText2() {
  90.228 -        return staticText2;
  90.229 -    }
  90.230 -
  90.231 -    public void setStaticText2(StaticText st) {
  90.232 -        this.staticText2 = st;
  90.233 -    }
  90.234 -
  90.235 -    // </editor-fold>
  90.236 -
  90.237 -    /**
  90.238 -     * <p>Construct a new Page bean instance.</p>
  90.239 -     */
  90.240 -    public ${name}() {
  90.241 -    }
  90.242 -
  90.243 -    /**
  90.244 -     * <p>Callback method that is called whenever a page is navigated to,
  90.245 -     * either directly via a URL, or indirectly via page navigation.
  90.246 -     * Customize this method to acquire resources that will be needed
  90.247 -     * for event handlers and lifecycle methods, whether or not this
  90.248 -     * page is performing post back processing.</p>
  90.249 -     * 
  90.250 -     * <p>Note that, if the current request is a postback, the property
  90.251 -     * values of the components do <strong>not</strong> represent any
  90.252 -     * values submitted with this request.  Instead, they represent the
  90.253 -     * property values that were saved for this view when it was rendered.</p>
  90.254 -     */
  90.255 -    public void init() {
  90.256 -        // Perform initializations inherited from our superclass
  90.257 -        super.init();
  90.258 -        // Perform application initialization that must complete
  90.259 -        // *before* managed components are initialized
  90.260 -        // TODO - add your own initialiation code here
  90.261 -            
  90.262 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  90.263 -        // Initialize automatically managed components
  90.264 -        // *Note* - this logic should NOT be modified
  90.265 -        try {
  90.266 -            _init();
  90.267 -        } catch (Exception e) {
  90.268 -            log("Page1 Initialization Failure", e);
  90.269 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  90.270 -        }
  90.271 -        
  90.272 -        // </editor-fold>
  90.273 -        // Perform application initialization that must complete
  90.274 -        // *after* managed components are initialized
  90.275 -        // TODO - add your own initialization code here
  90.276 -    }
  90.277 -
  90.278 -    /**
  90.279 -     * <p>Callback method that is called after the component tree has been
  90.280 -     * restored, but before any event processing takes place.  This method
  90.281 -     * will <strong>only</strong> be called on a postback request that
  90.282 -     * is processing a form submit.  Customize this method to allocate
  90.283 -     * resources that will be required in your event handlers.</p>
  90.284 -     */
  90.285 -    public void preprocess() {
  90.286 -    }
  90.287 -
  90.288 -    /**
  90.289 -     * <p>Callback method that is called just before rendering takes place.
  90.290 -     * This method will <strong>only</strong> be called for the page that
  90.291 -     * will actually be rendered (and not, for example, on a page that
  90.292 -     * handled a postback and then navigated to a different page).  Customize
  90.293 -     * this method to allocate resources that will be required for rendering
  90.294 -     * this page.</p>
  90.295 -     */
  90.296 -    public void prerender() {
  90.297 -    }
  90.298 -
  90.299 -    /**
  90.300 -     * <p>Callback method that is called after rendering is completed for
  90.301 -     * this request, if <code>init()</code> was called (regardless of whether
  90.302 -     * or not this was the page that was actually rendered).  Customize this
  90.303 -     * method to release resources acquired in the <code>init()</code>,
  90.304 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  90.305 -     * acquired during execution of an event handler).</p>
  90.306 -     */
  90.307 -    public void destroy() {
  90.308 -    }
  90.309 -
  90.310 -    /**
  90.311 -     * <p>Return a reference to the scoped data bean.</p>
  90.312 -     */
  90.313 -    protected RequestBean1 getRequestBean1() {
  90.314 -        return (RequestBean1) getBean("RequestBean1");
  90.315 -    }
  90.316 -
  90.317 -    /**
  90.318 -     * <p>Return a reference to the scoped data bean.</p>
  90.319 -     */
  90.320 -    protected SessionBean1 getSessionBean1() {
  90.321 -        return (SessionBean1) getBean("SessionBean1");
  90.322 -    }
  90.323 -
  90.324 -    /**
  90.325 -     * <p>Return a reference to the scoped data bean.</p>
  90.326 -     */
  90.327 -    protected ApplicationBean1 getApplicationBean1() {
  90.328 -        return (ApplicationBean1) getBean("ApplicationBean1");
  90.329 -    }
  90.330 -}
  90.331 -
    91.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate2.jsp.template	Wed Feb 23 20:05:40 2011 -0500
    91.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    91.3 @@ -1,41 +0,0 @@
    91.4 -<#assign pound = '#'>
    91.5 -<?xml version="1.0" encoding="${encoding}"?>
    91.6 -<!--
    91.7 -Document   : ${name}
    91.8 -Created on : ${date}, ${time}
    91.9 -Author     : ${user}
   91.10 --->
   91.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
   91.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
   91.13 -    <f:view>
   91.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
   91.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
   91.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
   91.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
   91.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout2.css"/>
   91.19 -                </webuijsf:head>
   91.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
   91.21 -                    <br/>
   91.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
   91.23 -                        <div id="container">
   91.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
   91.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
   91.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
   91.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText2}" escape="false" id="staticText2" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   91.28 -                            </webuijsf:panelLayout>
   91.29 -                            <!-- end ${pound}container -->
   91.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
   91.31 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
   91.32 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   91.33 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
   91.34 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   91.35 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   91.36 -                            </webuijsf:panelLayout>
   91.37 -                            <br class="clearfloat"/>
   91.38 -                        </div>
   91.39 -                    </webuijsf:form>
   91.40 -                </webuijsf:body>
   91.41 -            </webuijsf:html>
   91.42 -        </webuijsf:page>
   91.43 -    </f:view>
   91.44 -</jsp:root>
    92.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate3.java.template	Wed Feb 23 20:05:40 2011 -0500
    92.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    92.3 @@ -1,355 +0,0 @@
    92.4 -/*
    92.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    92.6 - *
    92.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    92.8 - *
    92.9 - * The contents of this file are subject to the terms of either the GNU
   92.10 - * General Public License Version 2 only ("GPL") or the Common
   92.11 - * Development and Distribution License("CDDL") (collectively, the
   92.12 - * "License"). You may not use this file except in compliance with the
   92.13 - * License. You can obtain a copy of the License at
   92.14 - * http://www.netbeans.org/cddl-gplv2.html
   92.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   92.16 - * specific language governing permissions and limitations under the
   92.17 - * License.  When distributing the software, include this License Header
   92.18 - * Notice in each file and include the License file at
   92.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   92.20 - * particular file as subject to the "Classpath" exception as provided
   92.21 - * by Sun in the GPL Version 2 section of the License file that
   92.22 - * accompanied this code. If applicable, add the following below the
   92.23 - * License Header, with the fields enclosed by brackets [] replaced by
   92.24 - * your own identifying information:
   92.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   92.26 - *
   92.27 - * Contributor(s):
   92.28 - *
   92.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   92.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   92.31 - * Microsystems, Inc. All Rights Reserved.
   92.32 - *
   92.33 - * If you wish your version of this file to be governed by only the CDDL
   92.34 - * or only the GPL Version 2, indicate your decision by adding
   92.35 - * "[Contributor] elects to include this software in this distribution
   92.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   92.37 - * single choice of license, a recipient has the option to distribute
   92.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   92.39 - * to extend the choice of license to its licensees as provided above.
   92.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   92.41 - * Version 2 license, then the option applies only if the new code is
   92.42 - * made subject to such option by the copyright holder.
   92.43 - */
   92.44 -
   92.45 -/*
   92.46 - * ${name}.java
   92.47 - *
   92.48 - * Created on ${date}, ${time}
   92.49 - * Copyright ${user}
   92.50 - */
   92.51 -<#if package?? && package != "">
   92.52 -package ${package};
   92.53 -</#if>
   92.54 -
   92.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   92.56 -import com.sun.webui.jsf.component.Body;
   92.57 -import com.sun.webui.jsf.component.Form;
   92.58 -import com.sun.webui.jsf.component.Head;
   92.59 -import com.sun.webui.jsf.component.Html;
   92.60 -import com.sun.webui.jsf.component.Link;
   92.61 -import com.sun.webui.jsf.component.Page;
   92.62 -import com.sun.webui.jsf.component.PanelLayout;
   92.63 -import com.sun.webui.jsf.component.StaticText;
   92.64 -import javax.faces.FacesException;
   92.65 -
   92.66 -/**
   92.67 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   92.68 - * class contains component definitions (and initialization code) for
   92.69 - * all components that you have defined on this page, as well as
   92.70 - * lifecycle methods and event handlers where you may add behavior
   92.71 - * to respond to incoming events.</p>
   92.72 - */
   92.73 -public class ${name} extends AbstractPageBean {
   92.74 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   92.75 -    private int __placeholder;
   92.76 -
   92.77 -    /**
   92.78 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   92.79 -     * This method is automatically generated, so any user-specified code inserted
   92.80 -     * here is subject to being replaced.</p>
   92.81 -     */
   92.82 -    private void _init() throws Exception {
   92.83 -    }
   92.84 -
   92.85 -    private Page page1 = new Page();
   92.86 -    
   92.87 -    public Page getPage1() {
   92.88 -        return page1;
   92.89 -    }
   92.90 -    
   92.91 -    public void setPage1(Page p) {
   92.92 -        this.page1 = p;
   92.93 -    }
   92.94 -    
   92.95 -    private Html html1 = new Html();
   92.96 -    
   92.97 -    public Html getHtml1() {
   92.98 -        return html1;
   92.99 -    }
  92.100 -    
  92.101 -    public void setHtml1(Html h) {
  92.102 -        this.html1 = h;
  92.103 -    }
  92.104 -    
  92.105 -    private Head head1 = new Head();
  92.106 -    
  92.107 -    public Head getHead1() {
  92.108 -        return head1;
  92.109 -    }
  92.110 -    
  92.111 -    public void setHead1(Head h) {
  92.112 -        this.head1 = h;
  92.113 -    }
  92.114 -    
  92.115 -    private Link link1 = new Link();
  92.116 -    
  92.117 -    public Link getLink1() {
  92.118 -        return link1;
  92.119 -    }
  92.120 -    
  92.121 -    public void setLink1(Link l) {
  92.122 -        this.link1 = l;
  92.123 -    }
  92.124 -    
  92.125 -    private Body body1 = new Body();
  92.126 -    
  92.127 -    public Body getBody1() {
  92.128 -        return body1;
  92.129 -    }
  92.130 -    
  92.131 -    public void setBody1(Body b) {
  92.132 -        this.body1 = b;
  92.133 -    }
  92.134 -    
  92.135 -    private Form form1 = new Form();
  92.136 -    
  92.137 -    public Form getForm1() {
  92.138 -        return form1;
  92.139 -    }
  92.140 -    
  92.141 -    public void setForm1(Form f) {
  92.142 -        this.form1 = f;
  92.143 -    }
  92.144 -    private Link link2 = new Link();
  92.145 -
  92.146 -    public Link getLink2() {
  92.147 -        return link2;
  92.148 -    }
  92.149 -
  92.150 -    public void setLink2(Link l) {
  92.151 -        this.link2 = l;
  92.152 -    }
  92.153 -    private PanelLayout headerPanel = new PanelLayout();
  92.154 -
  92.155 -    public PanelLayout getHeaderPanel() {
  92.156 -        return headerPanel;
  92.157 -    }
  92.158 -
  92.159 -    public void setHeaderPanel(PanelLayout pl) {
  92.160 -        this.headerPanel = pl;
  92.161 -    }
  92.162 -    private StaticText staticText1 = new StaticText();
  92.163 -
  92.164 -    public StaticText getStaticText1() {
  92.165 -        return staticText1;
  92.166 -    }
  92.167 -
  92.168 -    public void setStaticText1(StaticText st) {
  92.169 -        this.staticText1 = st;
  92.170 -    }
  92.171 -    private PanelLayout footerPanel = new PanelLayout();
  92.172 -
  92.173 -    public PanelLayout getFooterPanel() {
  92.174 -        return footerPanel;
  92.175 -    }
  92.176 -
  92.177 -    public void setFooterPanel(PanelLayout pl) {
  92.178 -        this.footerPanel = pl;
  92.179 -    }
  92.180 -    private StaticText staticText10 = new StaticText();
  92.181 -
  92.182 -    public StaticText getStaticText10() {
  92.183 -        return staticText10;
  92.184 -    }
  92.185 -
  92.186 -    public void setStaticText10(StaticText st) {
  92.187 -        this.staticText10 = st;
  92.188 -    }
  92.189 -    private PanelLayout mainContentPanel = new PanelLayout();
  92.190 -
  92.191 -    public PanelLayout getMainContentPanel() {
  92.192 -        return mainContentPanel;
  92.193 -    }
  92.194 -
  92.195 -    public void setMainContentPanel(PanelLayout pl) {
  92.196 -        this.mainContentPanel = pl;
  92.197 -    }
  92.198 -    private StaticText staticText11 = new StaticText();
  92.199 -
  92.200 -    public StaticText getStaticText11() {
  92.201 -        return staticText11;
  92.202 -    }
  92.203 -
  92.204 -    public void setStaticText11(StaticText st) {
  92.205 -        this.staticText11 = st;
  92.206 -    }
  92.207 -    private StaticText staticText12 = new StaticText();
  92.208 -
  92.209 -    public StaticText getStaticText12() {
  92.210 -        return staticText12;
  92.211 -    }
  92.212 -
  92.213 -    public void setStaticText12(StaticText st) {
  92.214 -        this.staticText12 = st;
  92.215 -    }
  92.216 -    private StaticText staticText13 = new StaticText();
  92.217 -
  92.218 -    public StaticText getStaticText13() {
  92.219 -        return staticText13;
  92.220 -    }
  92.221 -
  92.222 -    public void setStaticText13(StaticText st) {
  92.223 -        this.staticText13 = st;
  92.224 -    }
  92.225 -    private StaticText staticText14 = new StaticText();
  92.226 -
  92.227 -    public StaticText getStaticText14() {
  92.228 -        return staticText14;
  92.229 -    }
  92.230 -
  92.231 -    public void setStaticText14(StaticText st) {
  92.232 -        this.staticText14 = st;
  92.233 -    }
  92.234 -    private StaticText staticText15 = new StaticText();
  92.235 -
  92.236 -    public StaticText getStaticText15() {
  92.237 -        return staticText15;
  92.238 -    }
  92.239 -
  92.240 -    public void setStaticText15(StaticText st) {
  92.241 -        this.staticText15 = st;
  92.242 -    }
  92.243 -    private StaticText staticText16 = new StaticText();
  92.244 -
  92.245 -    public StaticText getStaticText16() {
  92.246 -        return staticText16;
  92.247 -    }
  92.248 -
  92.249 -    public void setStaticText16(StaticText st) {
  92.250 -        this.staticText16 = st;
  92.251 -    }
  92.252 -    private StaticText staticText17 = new StaticText();
  92.253 -
  92.254 -    public StaticText getStaticText17() {
  92.255 -        return staticText17;
  92.256 -    }
  92.257 -
  92.258 -    public void setStaticText17(StaticText st) {
  92.259 -        this.staticText17 = st;
  92.260 -    }
  92.261 -
  92.262 -    // </editor-fold>
  92.263 -
  92.264 -    /**
  92.265 -     * <p>Construct a new Page bean instance.</p>
  92.266 -     */
  92.267 -    public ${name}() {
  92.268 -    }
  92.269 -
  92.270 -    /**
  92.271 -     * <p>Callback method that is called whenever a page is navigated to,
  92.272 -     * either directly via a URL, or indirectly via page navigation.
  92.273 -     * Customize this method to acquire resources that will be needed
  92.274 -     * for event handlers and lifecycle methods, whether or not this
  92.275 -     * page is performing post back processing.</p>
  92.276 -     * 
  92.277 -     * <p>Note that, if the current request is a postback, the property
  92.278 -     * values of the components do <strong>not</strong> represent any
  92.279 -     * values submitted with this request.  Instead, they represent the
  92.280 -     * property values that were saved for this view when it was rendered.</p>
  92.281 -     */
  92.282 -    public void init() {
  92.283 -        // Perform initializations inherited from our superclass
  92.284 -        super.init();
  92.285 -        // Perform application initialization that must complete
  92.286 -        // *before* managed components are initialized
  92.287 -        // TODO - add your own initialiation code here
  92.288 -            
  92.289 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  92.290 -        // Initialize automatically managed components
  92.291 -        // *Note* - this logic should NOT be modified
  92.292 -        try {
  92.293 -            _init();
  92.294 -        } catch (Exception e) {
  92.295 -            log("Page1 Initialization Failure", e);
  92.296 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  92.297 -        }
  92.298 -        
  92.299 -        // </editor-fold>
  92.300 -        // Perform application initialization that must complete
  92.301 -        // *after* managed components are initialized
  92.302 -        // TODO - add your own initialization code here
  92.303 -    }
  92.304 -
  92.305 -    /**
  92.306 -     * <p>Callback method that is called after the component tree has been
  92.307 -     * restored, but before any event processing takes place.  This method
  92.308 -     * will <strong>only</strong> be called on a postback request that
  92.309 -     * is processing a form submit.  Customize this method to allocate
  92.310 -     * resources that will be required in your event handlers.</p>
  92.311 -     */
  92.312 -    public void preprocess() {
  92.313 -    }
  92.314 -
  92.315 -    /**
  92.316 -     * <p>Callback method that is called just before rendering takes place.
  92.317 -     * This method will <strong>only</strong> be called for the page that
  92.318 -     * will actually be rendered (and not, for example, on a page that
  92.319 -     * handled a postback and then navigated to a different page).  Customize
  92.320 -     * this method to allocate resources that will be required for rendering
  92.321 -     * this page.</p>
  92.322 -     */
  92.323 -    public void prerender() {
  92.324 -    }
  92.325 -
  92.326 -    /**
  92.327 -     * <p>Callback method that is called after rendering is completed for
  92.328 -     * this request, if <code>init()</code> was called (regardless of whether
  92.329 -     * or not this was the page that was actually rendered).  Customize this
  92.330 -     * method to release resources acquired in the <code>init()</code>,
  92.331 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  92.332 -     * acquired during execution of an event handler).</p>
  92.333 -     */
  92.334 -    public void destroy() {
  92.335 -    }
  92.336 -
  92.337 -    /**
  92.338 -     * <p>Return a reference to the scoped data bean.</p>
  92.339 -     */
  92.340 -    protected RequestBean1 getRequestBean1() {
  92.341 -        return (RequestBean1) getBean("RequestBean1");
  92.342 -    }
  92.343 -
  92.344 -    /**
  92.345 -     * <p>Return a reference to the scoped data bean.</p>
  92.346 -     */
  92.347 -    protected SessionBean1 getSessionBean1() {
  92.348 -        return (SessionBean1) getBean("SessionBean1");
  92.349 -    }
  92.350 -
  92.351 -    /**
  92.352 -     * <p>Return a reference to the scoped data bean.</p>
  92.353 -     */
  92.354 -    protected ApplicationBean1 getApplicationBean1() {
  92.355 -        return (ApplicationBean1) getBean("ApplicationBean1");
  92.356 -    }
  92.357 -}
  92.358 -
    93.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate3.jsp.template	Wed Feb 23 20:05:40 2011 -0500
    93.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    93.3 @@ -1,45 +0,0 @@
    93.4 -<#assign pound = '#'>
    93.5 -<?xml version="1.0" encoding="${encoding}"?>
    93.6 -<!--
    93.7 -Document   : ${name}
    93.8 -Created on : ${date}, ${time}
    93.9 -Author     : ${user}
   93.10 --->
   93.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
   93.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
   93.13 -    <f:view>
   93.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
   93.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
   93.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
   93.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
   93.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout3.css"/>
   93.19 -                </webuijsf:head>
   93.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
   93.21 -                    <br/>
   93.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
   93.23 -                        <div id="container">
   93.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
   93.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
   93.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
   93.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   93.28 -                            </webuijsf:panelLayout>
   93.29 -                            <!-- end ${pound}container -->
   93.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
   93.31 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
   93.32 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   93.33 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
   93.34 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   93.35 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   93.36 -                            </webuijsf:panelLayout>
   93.37 -                            <br class="clearfloat"/>
   93.38 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.footerPanel}" id="footerPanel" panelLayout="flow" styleClass="footer">
   93.39 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText10}" escape="false" id="staticText10" text="&lt;h4&gt;Footer&lt;/h4&gt;"/>
   93.40 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText17}" escape="false" id="staticText17" text="Sub Footer&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   93.41 -                            </webuijsf:panelLayout>
   93.42 -                        </div>
   93.43 -                    </webuijsf:form>
   93.44 -                </webuijsf:body>
   93.45 -            </webuijsf:html>
   93.46 -        </webuijsf:page>
   93.47 -    </f:view>
   93.48 -</jsp:root>
    94.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate4.java.template	Wed Feb 23 20:05:40 2011 -0500
    94.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    94.3 @@ -1,373 +0,0 @@
    94.4 -/*
    94.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    94.6 - *
    94.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    94.8 - *
    94.9 - * The contents of this file are subject to the terms of either the GNU
   94.10 - * General Public License Version 2 only ("GPL") or the Common
   94.11 - * Development and Distribution License("CDDL") (collectively, the
   94.12 - * "License"). You may not use this file except in compliance with the
   94.13 - * License. You can obtain a copy of the License at
   94.14 - * http://www.netbeans.org/cddl-gplv2.html
   94.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   94.16 - * specific language governing permissions and limitations under the
   94.17 - * License.  When distributing the software, include this License Header
   94.18 - * Notice in each file and include the License file at
   94.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   94.20 - * particular file as subject to the "Classpath" exception as provided
   94.21 - * by Sun in the GPL Version 2 section of the License file that
   94.22 - * accompanied this code. If applicable, add the following below the
   94.23 - * License Header, with the fields enclosed by brackets [] replaced by
   94.24 - * your own identifying information:
   94.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   94.26 - *
   94.27 - * Contributor(s):
   94.28 - *
   94.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   94.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   94.31 - * Microsystems, Inc. All Rights Reserved.
   94.32 - *
   94.33 - * If you wish your version of this file to be governed by only the CDDL
   94.34 - * or only the GPL Version 2, indicate your decision by adding
   94.35 - * "[Contributor] elects to include this software in this distribution
   94.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   94.37 - * single choice of license, a recipient has the option to distribute
   94.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   94.39 - * to extend the choice of license to its licensees as provided above.
   94.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   94.41 - * Version 2 license, then the option applies only if the new code is
   94.42 - * made subject to such option by the copyright holder.
   94.43 - */
   94.44 -
   94.45 -/*
   94.46 - * ${name}.java
   94.47 - *
   94.48 - * Created on ${date}, ${time}
   94.49 - * Copyright ${user}
   94.50 - */
   94.51 -<#if package?? && package != "">
   94.52 -package ${package};
   94.53 -</#if>
   94.54 -
   94.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   94.56 -import com.sun.webui.jsf.component.Body;
   94.57 -import com.sun.webui.jsf.component.Form;
   94.58 -import com.sun.webui.jsf.component.Head;
   94.59 -import com.sun.webui.jsf.component.Html;
   94.60 -import com.sun.webui.jsf.component.Link;
   94.61 -import com.sun.webui.jsf.component.Page;
   94.62 -import com.sun.webui.jsf.component.PanelLayout;
   94.63 -import com.sun.webui.jsf.component.StaticText;
   94.64 -import javax.faces.FacesException;
   94.65 -
   94.66 -/**
   94.67 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   94.68 - * class contains component definitions (and initialization code) for
   94.69 - * all components that you have defined on this page, as well as
   94.70 - * lifecycle methods and event handlers where you may add behavior
   94.71 - * to respond to incoming events.</p>
   94.72 - */
   94.73 -public class ${name} extends AbstractPageBean {
   94.74 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   94.75 -    private int __placeholder;
   94.76 -
   94.77 -    /**
   94.78 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   94.79 -     * This method is automatically generated, so any user-specified code inserted
   94.80 -     * here is subject to being replaced.</p>
   94.81 -     */
   94.82 -    private void _init() throws Exception {
   94.83 -    }
   94.84 -
   94.85 -    private Page page1 = new Page();
   94.86 -    
   94.87 -    public Page getPage1() {
   94.88 -        return page1;
   94.89 -    }
   94.90 -    
   94.91 -    public void setPage1(Page p) {
   94.92 -        this.page1 = p;
   94.93 -    }
   94.94 -    
   94.95 -    private Html html1 = new Html();
   94.96 -    
   94.97 -    public Html getHtml1() {
   94.98 -        return html1;
   94.99 -    }
  94.100 -    
  94.101 -    public void setHtml1(Html h) {
  94.102 -        this.html1 = h;
  94.103 -    }
  94.104 -    
  94.105 -    private Head head1 = new Head();
  94.106 -    
  94.107 -    public Head getHead1() {
  94.108 -        return head1;
  94.109 -    }
  94.110 -    
  94.111 -    public void setHead1(Head h) {
  94.112 -        this.head1 = h;
  94.113 -    }
  94.114 -    
  94.115 -    private Link link1 = new Link();
  94.116 -    
  94.117 -    public Link getLink1() {
  94.118 -        return link1;
  94.119 -    }
  94.120 -    
  94.121 -    public void setLink1(Link l) {
  94.122 -        this.link1 = l;
  94.123 -    }
  94.124 -    
  94.125 -    private Body body1 = new Body();
  94.126 -    
  94.127 -    public Body getBody1() {
  94.128 -        return body1;
  94.129 -    }
  94.130 -    
  94.131 -    public void setBody1(Body b) {
  94.132 -        this.body1 = b;
  94.133 -    }
  94.134 -    
  94.135 -    private Form form1 = new Form();
  94.136 -    
  94.137 -    public Form getForm1() {
  94.138 -        return form1;
  94.139 -    }
  94.140 -    
  94.141 -    public void setForm1(Form f) {
  94.142 -        this.form1 = f;
  94.143 -    }
  94.144 -    private Link link2 = new Link();
  94.145 -
  94.146 -    public Link getLink2() {
  94.147 -        return link2;
  94.148 -    }
  94.149 -
  94.150 -    public void setLink2(Link l) {
  94.151 -        this.link2 = l;
  94.152 -    }
  94.153 -    private PanelLayout headerPanel = new PanelLayout();
  94.154 -
  94.155 -    public PanelLayout getHeaderPanel() {
  94.156 -        return headerPanel;
  94.157 -    }
  94.158 -
  94.159 -    public void setHeaderPanel(PanelLayout pl) {
  94.160 -        this.headerPanel = pl;
  94.161 -    }
  94.162 -    private StaticText staticText1 = new StaticText();
  94.163 -
  94.164 -    public StaticText getStaticText1() {
  94.165 -        return staticText1;
  94.166 -    }
  94.167 -
  94.168 -    public void setStaticText1(StaticText st) {
  94.169 -        this.staticText1 = st;
  94.170 -    }
  94.171 -    private PanelLayout leftSidebarPanel = new PanelLayout();
  94.172 -
  94.173 -    public PanelLayout getLeftSidebarPanel() {
  94.174 -        return leftSidebarPanel;
  94.175 -    }
  94.176 -
  94.177 -    public void setLeftSidebarPanel(PanelLayout pl) {
  94.178 -        this.leftSidebarPanel = pl;
  94.179 -    }
  94.180 -    private StaticText staticText2 = new StaticText();
  94.181 -
  94.182 -    public StaticText getStaticText2() {
  94.183 -        return staticText2;
  94.184 -    }
  94.185 -
  94.186 -    public void setStaticText2(StaticText st) {
  94.187 -        this.staticText2 = st;
  94.188 -    }
  94.189 -    private StaticText staticText3 = new StaticText();
  94.190 -
  94.191 -    public StaticText getStaticText3() {
  94.192 -        return staticText3;
  94.193 -    }
  94.194 -
  94.195 -    public void setStaticText3(StaticText st) {
  94.196 -        this.staticText3 = st;
  94.197 -    }
  94.198 -    private StaticText staticText4 = new StaticText();
  94.199 -
  94.200 -    public StaticText getStaticText4() {
  94.201 -        return staticText4;
  94.202 -    }
  94.203 -
  94.204 -    public void setStaticText4(StaticText st) {
  94.205 -        this.staticText4 = st;
  94.206 -    }
  94.207 -    private StaticText staticText5 = new StaticText();
  94.208 -
  94.209 -    public StaticText getStaticText5() {
  94.210 -        return staticText5;
  94.211 -    }
  94.212 -
  94.213 -    public void setStaticText5(StaticText st) {
  94.214 -        this.staticText5 = st;
  94.215 -    }
  94.216 -    private PanelLayout mainContentPanel = new PanelLayout();
  94.217 -
  94.218 -    public PanelLayout getMainContentPanel() {
  94.219 -        return mainContentPanel;
  94.220 -    }
  94.221 -
  94.222 -    public void setMainContentPanel(PanelLayout pl) {
  94.223 -        this.mainContentPanel = pl;
  94.224 -    }
  94.225 -    private StaticText staticText11 = new StaticText();
  94.226 -
  94.227 -    public StaticText getStaticText11() {
  94.228 -        return staticText11;
  94.229 -    }
  94.230 -
  94.231 -    public void setStaticText11(StaticText st) {
  94.232 -        this.staticText11 = st;
  94.233 -    }
  94.234 -    private StaticText staticText12 = new StaticText();
  94.235 -
  94.236 -    public StaticText getStaticText12() {
  94.237 -        return staticText12;
  94.238 -    }
  94.239 -
  94.240 -    public void setStaticText12(StaticText st) {
  94.241 -        this.staticText12 = st;
  94.242 -    }
  94.243 -    private StaticText staticText13 = new StaticText();
  94.244 -
  94.245 -    public StaticText getStaticText13() {
  94.246 -        return staticText13;
  94.247 -    }
  94.248 -
  94.249 -    public void setStaticText13(StaticText st) {
  94.250 -        this.staticText13 = st;
  94.251 -    }
  94.252 -    private StaticText staticText14 = new StaticText();
  94.253 -
  94.254 -    public StaticText getStaticText14() {
  94.255 -        return staticText14;
  94.256 -    }
  94.257 -
  94.258 -    public void setStaticText14(StaticText st) {
  94.259 -        this.staticText14 = st;
  94.260 -    }
  94.261 -    private StaticText staticText15 = new StaticText();
  94.262 -
  94.263 -    public StaticText getStaticText15() {
  94.264 -        return staticText15;
  94.265 -    }
  94.266 -
  94.267 -    public void setStaticText15(StaticText st) {
  94.268 -        this.staticText15 = st;
  94.269 -    }
  94.270 -    private StaticText staticText16 = new StaticText();
  94.271 -
  94.272 -    public StaticText getStaticText16() {
  94.273 -        return staticText16;
  94.274 -    }
  94.275 -
  94.276 -    public void setStaticText16(StaticText st) {
  94.277 -        this.staticText16 = st;
  94.278 -    }
  94.279 -
  94.280 -    // </editor-fold>
  94.281 -
  94.282 -    /**
  94.283 -     * <p>Construct a new Page bean instance.</p>
  94.284 -     */
  94.285 -    public ${name}() {
  94.286 -    }
  94.287 -
  94.288 -    /**
  94.289 -     * <p>Callback method that is called whenever a page is navigated to,
  94.290 -     * either directly via a URL, or indirectly via page navigation.
  94.291 -     * Customize this method to acquire resources that will be needed
  94.292 -     * for event handlers and lifecycle methods, whether or not this
  94.293 -     * page is performing post back processing.</p>
  94.294 -     * 
  94.295 -     * <p>Note that, if the current request is a postback, the property
  94.296 -     * values of the components do <strong>not</strong> represent any
  94.297 -     * values submitted with this request.  Instead, they represent the
  94.298 -     * property values that were saved for this view when it was rendered.</p>
  94.299 -     */
  94.300 -    public void init() {
  94.301 -        // Perform initializations inherited from our superclass
  94.302 -        super.init();
  94.303 -        // Perform application initialization that must complete
  94.304 -        // *before* managed components are initialized
  94.305 -        // TODO - add your own initialiation code here
  94.306 -            
  94.307 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  94.308 -        // Initialize automatically managed components
  94.309 -        // *Note* - this logic should NOT be modified
  94.310 -        try {
  94.311 -            _init();
  94.312 -        } catch (Exception e) {
  94.313 -            log("Page1 Initialization Failure", e);
  94.314 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  94.315 -        }
  94.316 -        
  94.317 -        // </editor-fold>
  94.318 -        // Perform application initialization that must complete
  94.319 -        // *after* managed components are initialized
  94.320 -        // TODO - add your own initialization code here
  94.321 -    }
  94.322 -
  94.323 -    /**
  94.324 -     * <p>Callback method that is called after the component tree has been
  94.325 -     * restored, but before any event processing takes place.  This method
  94.326 -     * will <strong>only</strong> be called on a postback request that
  94.327 -     * is processing a form submit.  Customize this method to allocate
  94.328 -     * resources that will be required in your event handlers.</p>
  94.329 -     */
  94.330 -    public void preprocess() {
  94.331 -    }
  94.332 -
  94.333 -    /**
  94.334 -     * <p>Callback method that is called just before rendering takes place.
  94.335 -     * This method will <strong>only</strong> be called for the page that
  94.336 -     * will actually be rendered (and not, for example, on a page that
  94.337 -     * handled a postback and then navigated to a different page).  Customize
  94.338 -     * this method to allocate resources that will be required for rendering
  94.339 -     * this page.</p>
  94.340 -     */
  94.341 -    public void prerender() {
  94.342 -    }
  94.343 -
  94.344 -    /**
  94.345 -     * <p>Callback method that is called after rendering is completed for
  94.346 -     * this request, if <code>init()</code> was called (regardless of whether
  94.347 -     * or not this was the page that was actually rendered).  Customize this
  94.348 -     * method to release resources acquired in the <code>init()</code>,
  94.349 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  94.350 -     * acquired during execution of an event handler).</p>
  94.351 -     */
  94.352 -    public void destroy() {
  94.353 -    }
  94.354 -
  94.355 -    /**
  94.356 -     * <p>Return a reference to the scoped data bean.</p>
  94.357 -     */
  94.358 -    protected RequestBean1 getRequestBean1() {
  94.359 -        return (RequestBean1) getBean("RequestBean1");
  94.360 -    }
  94.361 -
  94.362 -    /**
  94.363 -     * <p>Return a reference to the scoped data bean.</p>
  94.364 -     */
  94.365 -    protected SessionBean1 getSessionBean1() {
  94.366 -        return (SessionBean1) getBean("SessionBean1");
  94.367 -    }
  94.368 -
  94.369 -    /**
  94.370 -     * <p>Return a reference to the scoped data bean.</p>
  94.371 -     */
  94.372 -    protected ApplicationBean1 getApplicationBean1() {
  94.373 -        return (ApplicationBean1) getBean("ApplicationBean1");
  94.374 -    }
  94.375 -}
  94.376 -
    95.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate4.jsp.template	Wed Feb 23 20:05:40 2011 -0500
    95.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    95.3 @@ -1,47 +0,0 @@
    95.4 -<#assign pound = '#'>
    95.5 -<?xml version="1.0" encoding="${encoding}"?>
    95.6 -<!--
    95.7 -Document   : ${name}
    95.8 -Created on : ${date}, ${time}
    95.9 -Author     : ${user}
   95.10 --->
   95.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
   95.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
   95.13 -    <f:view>
   95.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
   95.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
   95.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
   95.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
   95.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout4.css"/>
   95.19 -                </webuijsf:head>
   95.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
   95.21 -                    <br/>
   95.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
   95.23 -                        <div id="container">
   95.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
   95.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
   95.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
   95.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   95.28 -                            </webuijsf:panelLayout>
   95.29 -                            <!-- end ${pound}container -->
   95.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.leftSidebarPanel}" id="leftSidebarPanel" panelLayout="flow" styleClass="leftSidebar">
   95.31 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText2}" escape="false" id="staticText2" text="&lt;h2&gt;Left Sidebar&lt;/h2&gt;"/>
   95.32 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText3}" escape="false" id="staticText3" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   95.33 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText4}" escape="false" id="staticText4" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   95.34 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText5}" escape="false" id="staticText5" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   95.35 -                            </webuijsf:panelLayout>
   95.36 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
   95.37 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
   95.38 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   95.39 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
   95.40 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   95.41 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   95.42 -                            </webuijsf:panelLayout>
   95.43 -                            <br class="clearfloat"/>
   95.44 -                        </div>
   95.45 -                    </webuijsf:form>
   95.46 -                </webuijsf:body>
   95.47 -            </webuijsf:html>
   95.48 -        </webuijsf:page>
   95.49 -    </f:view>
   95.50 -</jsp:root>
    96.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate5.java.template	Wed Feb 23 20:05:40 2011 -0500
    96.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    96.3 @@ -1,364 +0,0 @@
    96.4 -/*
    96.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    96.6 - *
    96.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    96.8 - *
    96.9 - * The contents of this file are subject to the terms of either the GNU
   96.10 - * General Public License Version 2 only ("GPL") or the Common
   96.11 - * Development and Distribution License("CDDL") (collectively, the
   96.12 - * "License"). You may not use this file except in compliance with the
   96.13 - * License. You can obtain a copy of the License at
   96.14 - * http://www.netbeans.org/cddl-gplv2.html
   96.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   96.16 - * specific language governing permissions and limitations under the
   96.17 - * License.  When distributing the software, include this License Header
   96.18 - * Notice in each file and include the License file at
   96.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   96.20 - * particular file as subject to the "Classpath" exception as provided
   96.21 - * by Sun in the GPL Version 2 section of the License file that
   96.22 - * accompanied this code. If applicable, add the following below the
   96.23 - * License Header, with the fields enclosed by brackets [] replaced by
   96.24 - * your own identifying information:
   96.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   96.26 - *
   96.27 - * Contributor(s):
   96.28 - *
   96.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   96.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   96.31 - * Microsystems, Inc. All Rights Reserved.
   96.32 - *
   96.33 - * If you wish your version of this file to be governed by only the CDDL
   96.34 - * or only the GPL Version 2, indicate your decision by adding
   96.35 - * "[Contributor] elects to include this software in this distribution
   96.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   96.37 - * single choice of license, a recipient has the option to distribute
   96.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   96.39 - * to extend the choice of license to its licensees as provided above.
   96.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   96.41 - * Version 2 license, then the option applies only if the new code is
   96.42 - * made subject to such option by the copyright holder.
   96.43 - */
   96.44 -
   96.45 -/*
   96.46 - * ${name}.java
   96.47 - *
   96.48 - * Created on ${date}, ${time}
   96.49 - * Copyright ${user}
   96.50 - */
   96.51 -<#if package?? && package != "">
   96.52 -package ${package};
   96.53 -</#if>
   96.54 -
   96.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   96.56 -import com.sun.webui.jsf.component.Body;
   96.57 -import com.sun.webui.jsf.component.Form;
   96.58 -import com.sun.webui.jsf.component.Head;
   96.59 -import com.sun.webui.jsf.component.Html;
   96.60 -import com.sun.webui.jsf.component.Link;
   96.61 -import com.sun.webui.jsf.component.Page;
   96.62 -import com.sun.webui.jsf.component.PanelLayout;
   96.63 -import com.sun.webui.jsf.component.StaticText;
   96.64 -import javax.faces.FacesException;
   96.65 -
   96.66 -/**
   96.67 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   96.68 - * class contains component definitions (and initialization code) for
   96.69 - * all components that you have defined on this page, as well as
   96.70 - * lifecycle methods and event handlers where you may add behavior
   96.71 - * to respond to incoming events.</p>
   96.72 - */
   96.73 -public class ${name} extends AbstractPageBean {
   96.74 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   96.75 -    private int __placeholder;
   96.76 -
   96.77 -    /**
   96.78 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   96.79 -     * This method is automatically generated, so any user-specified code inserted
   96.80 -     * here is subject to being replaced.</p>
   96.81 -     */
   96.82 -    private void _init() throws Exception {
   96.83 -    }
   96.84 -
   96.85 -    private Page page1 = new Page();
   96.86 -    
   96.87 -    public Page getPage1() {
   96.88 -        return page1;
   96.89 -    }
   96.90 -    
   96.91 -    public void setPage1(Page p) {
   96.92 -        this.page1 = p;
   96.93 -    }
   96.94 -    
   96.95 -    private Html html1 = new Html();
   96.96 -    
   96.97 -    public Html getHtml1() {
   96.98 -        return html1;
   96.99 -    }
  96.100 -    
  96.101 -    public void setHtml1(Html h) {
  96.102 -        this.html1 = h;
  96.103 -    }
  96.104 -    
  96.105 -    private Head head1 = new Head();
  96.106 -    
  96.107 -    public Head getHead1() {
  96.108 -        return head1;
  96.109 -    }
  96.110 -    
  96.111 -    public void setHead1(Head h) {
  96.112 -        this.head1 = h;
  96.113 -    }
  96.114 -    
  96.115 -    private Link link1 = new Link();
  96.116 -    
  96.117 -    public Link getLink1() {
  96.118 -        return link1;
  96.119 -    }
  96.120 -    
  96.121 -    public void setLink1(Link l) {
  96.122 -        this.link1 = l;
  96.123 -    }
  96.124 -    
  96.125 -    private Body body1 = new Body();
  96.126 -    
  96.127 -    public Body getBody1() {
  96.128 -        return body1;
  96.129 -    }
  96.130 -    
  96.131 -    public void setBody1(Body b) {
  96.132 -        this.body1 = b;
  96.133 -    }
  96.134 -    
  96.135 -    private Form form1 = new Form();
  96.136 -    
  96.137 -    public Form getForm1() {
  96.138 -        return form1;
  96.139 -    }
  96.140 -    
  96.141 -    public void setForm1(Form f) {
  96.142 -        this.form1 = f;
  96.143 -    }
  96.144 -    private Link link2 = new Link();
  96.145 -
  96.146 -    public Link getLink2() {
  96.147 -        return link2;
  96.148 -    }
  96.149 -
  96.150 -    public void setLink2(Link l) {
  96.151 -        this.link2 = l;
  96.152 -    }
  96.153 -    private PanelLayout headerPanel = new PanelLayout();
  96.154 -
  96.155 -    public PanelLayout getHeaderPanel() {
  96.156 -        return headerPanel;
  96.157 -    }
  96.158 -
  96.159 -    public void setHeaderPanel(PanelLayout pl) {
  96.160 -        this.headerPanel = pl;
  96.161 -    }
  96.162 -    private StaticText staticText1 = new StaticText();
  96.163 -
  96.164 -    public StaticText getStaticText1() {
  96.165 -        return staticText1;
  96.166 -    }
  96.167 -
  96.168 -    public void setStaticText1(StaticText st) {
  96.169 -        this.staticText1 = st;
  96.170 -    }
  96.171 -    private PanelLayout rightSidebarPanel = new PanelLayout();
  96.172 -
  96.173 -    public PanelLayout getRightSidebarPanel() {
  96.174 -        return rightSidebarPanel;
  96.175 -    }
  96.176 -
  96.177 -    public void setRightSidebarPanel(PanelLayout pl) {
  96.178 -        this.rightSidebarPanel = pl;
  96.179 -    }
  96.180 -    private StaticText staticText6 = new StaticText();
  96.181 -
  96.182 -    public StaticText getStaticText6() {
  96.183 -        return staticText6;
  96.184 -    }
  96.185 -
  96.186 -    public void setStaticText6(StaticText st) {
  96.187 -        this.staticText6 = st;
  96.188 -    }
  96.189 -    private StaticText staticText7 = new StaticText();
  96.190 -
  96.191 -    public StaticText getStaticText7() {
  96.192 -        return staticText7;
  96.193 -    }
  96.194 -
  96.195 -    public void setStaticText7(StaticText st) {
  96.196 -        this.staticText7 = st;
  96.197 -    }
  96.198 -    private StaticText staticText8 = new StaticText();
  96.199 -
  96.200 -    public StaticText getStaticText8() {
  96.201 -        return staticText8;
  96.202 -    }
  96.203 -
  96.204 -    public void setStaticText8(StaticText st) {
  96.205 -        this.staticText8 = st;
  96.206 -    }
  96.207 -    private PanelLayout mainContentPanel = new PanelLayout();
  96.208 -
  96.209 -    public PanelLayout getMainContentPanel() {
  96.210 -        return mainContentPanel;
  96.211 -    }
  96.212 -
  96.213 -    public void setMainContentPanel(PanelLayout pl) {
  96.214 -        this.mainContentPanel = pl;
  96.215 -    }
  96.216 -    private StaticText staticText11 = new StaticText();
  96.217 -
  96.218 -    public StaticText getStaticText11() {
  96.219 -        return staticText11;
  96.220 -    }
  96.221 -
  96.222 -    public void setStaticText11(StaticText st) {
  96.223 -        this.staticText11 = st;
  96.224 -    }
  96.225 -    private StaticText staticText12 = new StaticText();
  96.226 -
  96.227 -    public StaticText getStaticText12() {
  96.228 -        return staticText12;
  96.229 -    }
  96.230 -
  96.231 -    public void setStaticText12(StaticText st) {
  96.232 -        this.staticText12 = st;
  96.233 -    }
  96.234 -    private StaticText staticText13 = new StaticText();
  96.235 -
  96.236 -    public StaticText getStaticText13() {
  96.237 -        return staticText13;
  96.238 -    }
  96.239 -
  96.240 -    public void setStaticText13(StaticText st) {
  96.241 -        this.staticText13 = st;
  96.242 -    }
  96.243 -    private StaticText staticText14 = new StaticText();
  96.244 -
  96.245 -    public StaticText getStaticText14() {
  96.246 -        return staticText14;
  96.247 -    }
  96.248 -
  96.249 -    public void setStaticText14(StaticText st) {
  96.250 -        this.staticText14 = st;
  96.251 -    }
  96.252 -    private StaticText staticText15 = new StaticText();
  96.253 -
  96.254 -    public StaticText getStaticText15() {
  96.255 -        return staticText15;
  96.256 -    }
  96.257 -
  96.258 -    public void setStaticText15(StaticText st) {
  96.259 -        this.staticText15 = st;
  96.260 -    }
  96.261 -    private StaticText staticText16 = new StaticText();
  96.262 -
  96.263 -    public StaticText getStaticText16() {
  96.264 -        return staticText16;
  96.265 -    }
  96.266 -
  96.267 -    public void setStaticText16(StaticText st) {
  96.268 -        this.staticText16 = st;
  96.269 -    }
  96.270 -
  96.271 -    // </editor-fold>
  96.272 -
  96.273 -    /**
  96.274 -     * <p>Construct a new Page bean instance.</p>
  96.275 -     */
  96.276 -    public ${name}() {
  96.277 -    }
  96.278 -
  96.279 -    /**
  96.280 -     * <p>Callback method that is called whenever a page is navigated to,
  96.281 -     * either directly via a URL, or indirectly via page navigation.
  96.282 -     * Customize this method to acquire resources that will be needed
  96.283 -     * for event handlers and lifecycle methods, whether or not this
  96.284 -     * page is performing post back processing.</p>
  96.285 -     * 
  96.286 -     * <p>Note that, if the current request is a postback, the property
  96.287 -     * values of the components do <strong>not</strong> represent any
  96.288 -     * values submitted with this request.  Instead, they represent the
  96.289 -     * property values that were saved for this view when it was rendered.</p>
  96.290 -     */
  96.291 -    public void init() {
  96.292 -        // Perform initializations inherited from our superclass
  96.293 -        super.init();
  96.294 -        // Perform application initialization that must complete
  96.295 -        // *before* managed components are initialized
  96.296 -        // TODO - add your own initialiation code here
  96.297 -            
  96.298 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  96.299 -        // Initialize automatically managed components
  96.300 -        // *Note* - this logic should NOT be modified
  96.301 -        try {
  96.302 -            _init();
  96.303 -        } catch (Exception e) {
  96.304 -            log("Page1 Initialization Failure", e);
  96.305 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  96.306 -        }
  96.307 -        
  96.308 -        // </editor-fold>
  96.309 -        // Perform application initialization that must complete
  96.310 -        // *after* managed components are initialized
  96.311 -        // TODO - add your own initialization code here
  96.312 -    }
  96.313 -
  96.314 -    /**
  96.315 -     * <p>Callback method that is called after the component tree has been
  96.316 -     * restored, but before any event processing takes place.  This method
  96.317 -     * will <strong>only</strong> be called on a postback request that
  96.318 -     * is processing a form submit.  Customize this method to allocate
  96.319 -     * resources that will be required in your event handlers.</p>
  96.320 -     */
  96.321 -    public void preprocess() {
  96.322 -    }
  96.323 -
  96.324 -    /**
  96.325 -     * <p>Callback method that is called just before rendering takes place.
  96.326 -     * This method will <strong>only</strong> be called for the page that
  96.327 -     * will actually be rendered (and not, for example, on a page that
  96.328 -     * handled a postback and then navigated to a different page).  Customize
  96.329 -     * this method to allocate resources that will be required for rendering
  96.330 -     * this page.</p>
  96.331 -     */
  96.332 -    public void prerender() {
  96.333 -    }
  96.334 -
  96.335 -    /**
  96.336 -     * <p>Callback method that is called after rendering is completed for
  96.337 -     * this request, if <code>init()</code> was called (regardless of whether
  96.338 -     * or not this was the page that was actually rendered).  Customize this
  96.339 -     * method to release resources acquired in the <code>init()</code>,
  96.340 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  96.341 -     * acquired during execution of an event handler).</p>
  96.342 -     */
  96.343 -    public void destroy() {
  96.344 -    }
  96.345 -
  96.346 -    /**
  96.347 -     * <p>Return a reference to the scoped data bean.</p>
  96.348 -     */
  96.349 -    protected RequestBean1 getRequestBean1() {
  96.350 -        return (RequestBean1) getBean("RequestBean1");
  96.351 -    }
  96.352 -
  96.353 -    /**
  96.354 -     * <p>Return a reference to the scoped data bean.</p>
  96.355 -     */
  96.356 -    protected SessionBean1 getSessionBean1() {
  96.357 -        return (SessionBean1) getBean("SessionBean1");
  96.358 -    }
  96.359 -
  96.360 -    /**
  96.361 -     * <p>Return a reference to the scoped data bean.</p>
  96.362 -     */
  96.363 -    protected ApplicationBean1 getApplicationBean1() {
  96.364 -        return (ApplicationBean1) getBean("ApplicationBean1");
  96.365 -    }
  96.366 -}
  96.367 -
    97.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate5.jsp.template	Wed Feb 23 20:05:40 2011 -0500
    97.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    97.3 @@ -1,46 +0,0 @@
    97.4 -<#assign pound = '#'>
    97.5 -<?xml version="1.0" encoding="${encoding}"?>
    97.6 -<!--
    97.7 -Document   : ${name}
    97.8 -Created on : ${date}, ${time}
    97.9 -Author     : ${user}
   97.10 --->
   97.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
   97.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
   97.13 -    <f:view>
   97.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
   97.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
   97.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
   97.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
   97.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout5.css"/>
   97.19 -                </webuijsf:head>
   97.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
   97.21 -                    <br/>
   97.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
   97.23 -                        <div id="container">
   97.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
   97.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
   97.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
   97.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   97.28 -                            </webuijsf:panelLayout>
   97.29 -                            <!-- end ${pound}container -->
   97.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.rightSidebarPanel}" id="rightSidebarPanel" panelLayout="flow" styleClass="rightSidebar">
   97.31 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText6}" escape="false" id="staticText6" text="&lt;h2&gt;Right Sidebar&lt;/h2&gt;"/>
   97.32 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText7}" escape="false" id="staticText7" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   97.33 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText8}" escape="false" id="staticText8" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   97.34 -                            </webuijsf:panelLayout>
   97.35 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
   97.36 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
   97.37 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   97.38 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
   97.39 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   97.40 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   97.41 -                            </webuijsf:panelLayout>
   97.42 -                            <br class="clearfloat"/>
   97.43 -                        </div>
   97.44 -                    </webuijsf:form>
   97.45 -                </webuijsf:body>
   97.46 -            </webuijsf:html>
   97.47 -        </webuijsf:page>
   97.48 -    </f:view>
   97.49 -</jsp:root>
    98.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate6.java.template	Wed Feb 23 20:05:40 2011 -0500
    98.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    98.3 @@ -1,400 +0,0 @@
    98.4 -/*
    98.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    98.6 - *
    98.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    98.8 - *
    98.9 - * The contents of this file are subject to the terms of either the GNU
   98.10 - * General Public License Version 2 only ("GPL") or the Common
   98.11 - * Development and Distribution License("CDDL") (collectively, the
   98.12 - * "License"). You may not use this file except in compliance with the
   98.13 - * License. You can obtain a copy of the License at
   98.14 - * http://www.netbeans.org/cddl-gplv2.html
   98.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   98.16 - * specific language governing permissions and limitations under the
   98.17 - * License.  When distributing the software, include this License Header
   98.18 - * Notice in each file and include the License file at
   98.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   98.20 - * particular file as subject to the "Classpath" exception as provided
   98.21 - * by Sun in the GPL Version 2 section of the License file that
   98.22 - * accompanied this code. If applicable, add the following below the
   98.23 - * License Header, with the fields enclosed by brackets [] replaced by
   98.24 - * your own identifying information:
   98.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   98.26 - *
   98.27 - * Contributor(s):
   98.28 - *
   98.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   98.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   98.31 - * Microsystems, Inc. All Rights Reserved.
   98.32 - *
   98.33 - * If you wish your version of this file to be governed by only the CDDL
   98.34 - * or only the GPL Version 2, indicate your decision by adding
   98.35 - * "[Contributor] elects to include this software in this distribution
   98.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   98.37 - * single choice of license, a recipient has the option to distribute
   98.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   98.39 - * to extend the choice of license to its licensees as provided above.
   98.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   98.41 - * Version 2 license, then the option applies only if the new code is
   98.42 - * made subject to such option by the copyright holder.
   98.43 - */
   98.44 -
   98.45 -/*
   98.46 - * ${name}.java
   98.47 - *
   98.48 - * Created on ${date}, ${time}
   98.49 - * Copyright ${user}
   98.50 - */
   98.51 -<#if package?? && package != "">
   98.52 -package ${package};
   98.53 -</#if>
   98.54 -
   98.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
   98.56 -import com.sun.webui.jsf.component.Body;
   98.57 -import com.sun.webui.jsf.component.Form;
   98.58 -import com.sun.webui.jsf.component.Head;
   98.59 -import com.sun.webui.jsf.component.Html;
   98.60 -import com.sun.webui.jsf.component.Link;
   98.61 -import com.sun.webui.jsf.component.Page;
   98.62 -import com.sun.webui.jsf.component.PanelLayout;
   98.63 -import com.sun.webui.jsf.component.StaticText;
   98.64 -import javax.faces.FacesException;
   98.65 -
   98.66 -/**
   98.67 - * <p>Page bean that corresponds to a similarly named JSP page.  This
   98.68 - * class contains component definitions (and initialization code) for
   98.69 - * all components that you have defined on this page, as well as
   98.70 - * lifecycle methods and event handlers where you may add behavior
   98.71 - * to respond to incoming events.</p>
   98.72 - */
   98.73 -public class ${name} extends AbstractPageBean {
   98.74 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
   98.75 -    private int __placeholder;
   98.76 -
   98.77 -    /**
   98.78 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
   98.79 -     * This method is automatically generated, so any user-specified code inserted
   98.80 -     * here is subject to being replaced.</p>
   98.81 -     */
   98.82 -    private void _init() throws Exception {
   98.83 -    }
   98.84 -
   98.85 -    private Page page1 = new Page();
   98.86 -    
   98.87 -    public Page getPage1() {
   98.88 -        return page1;
   98.89 -    }
   98.90 -    
   98.91 -    public void setPage1(Page p) {
   98.92 -        this.page1 = p;
   98.93 -    }
   98.94 -    
   98.95 -    private Html html1 = new Html();
   98.96 -    
   98.97 -    public Html getHtml1() {
   98.98 -        return html1;
   98.99 -    }
  98.100 -    
  98.101 -    public void setHtml1(Html h) {
  98.102 -        this.html1 = h;
  98.103 -    }
  98.104 -    
  98.105 -    private Head head1 = new Head();
  98.106 -    
  98.107 -    public Head getHead1() {
  98.108 -        return head1;
  98.109 -    }
  98.110 -    
  98.111 -    public void setHead1(Head h) {
  98.112 -        this.head1 = h;
  98.113 -    }
  98.114 -    
  98.115 -    private Link link1 = new Link();
  98.116 -    
  98.117 -    public Link getLink1() {
  98.118 -        return link1;
  98.119 -    }
  98.120 -    
  98.121 -    public void setLink1(Link l) {
  98.122 -        this.link1 = l;
  98.123 -    }
  98.124 -    
  98.125 -    private Body body1 = new Body();
  98.126 -    
  98.127 -    public Body getBody1() {
  98.128 -        return body1;
  98.129 -    }
  98.130 -    
  98.131 -    public void setBody1(Body b) {
  98.132 -        this.body1 = b;
  98.133 -    }
  98.134 -    
  98.135 -    private Form form1 = new Form();
  98.136 -    
  98.137 -    public Form getForm1() {
  98.138 -        return form1;
  98.139 -    }
  98.140 -    
  98.141 -    public void setForm1(Form f) {
  98.142 -        this.form1 = f;
  98.143 -    }
  98.144 -    private Link link2 = new Link();
  98.145 -
  98.146 -    public Link getLink2() {
  98.147 -        return link2;
  98.148 -    }
  98.149 -
  98.150 -    public void setLink2(Link l) {
  98.151 -        this.link2 = l;
  98.152 -    }
  98.153 -    private PanelLayout headerPanel = new PanelLayout();
  98.154 -
  98.155 -    public PanelLayout getHeaderPanel() {
  98.156 -        return headerPanel;
  98.157 -    }
  98.158 -
  98.159 -    public void setHeaderPanel(PanelLayout pl) {
  98.160 -        this.headerPanel = pl;
  98.161 -    }
  98.162 -    private StaticText staticText1 = new StaticText();
  98.163 -
  98.164 -    public StaticText getStaticText1() {
  98.165 -        return staticText1;
  98.166 -    }
  98.167 -
  98.168 -    public void setStaticText1(StaticText st) {
  98.169 -        this.staticText1 = st;
  98.170 -    }
  98.171 -    private PanelLayout leftSidebarPanel = new PanelLayout();
  98.172 -
  98.173 -    public PanelLayout getLeftSidebarPanel() {
  98.174 -        return leftSidebarPanel;
  98.175 -    }
  98.176 -
  98.177 -    public void setLeftSidebarPanel(PanelLayout pl) {
  98.178 -        this.leftSidebarPanel = pl;
  98.179 -    }
  98.180 -    private StaticText staticText2 = new StaticText();
  98.181 -
  98.182 -    public StaticText getStaticText2() {
  98.183 -        return staticText2;
  98.184 -    }
  98.185 -
  98.186 -    public void setStaticText2(StaticText st) {
  98.187 -        this.staticText2 = st;
  98.188 -    }
  98.189 -    private StaticText staticText3 = new StaticText();
  98.190 -
  98.191 -    public StaticText getStaticText3() {
  98.192 -        return staticText3;
  98.193 -    }
  98.194 -
  98.195 -    public void setStaticText3(StaticText st) {
  98.196 -        this.staticText3 = st;
  98.197 -    }
  98.198 -    private StaticText staticText4 = new StaticText();
  98.199 -
  98.200 -    public StaticText getStaticText4() {
  98.201 -        return staticText4;
  98.202 -    }
  98.203 -
  98.204 -    public void setStaticText4(StaticText st) {
  98.205 -        this.staticText4 = st;
  98.206 -    }
  98.207 -    private StaticText staticText5 = new StaticText();
  98.208 -
  98.209 -    public StaticText getStaticText5() {
  98.210 -        return staticText5;
  98.211 -    }
  98.212 -
  98.213 -    public void setStaticText5(StaticText st) {
  98.214 -        this.staticText5 = st;
  98.215 -    }
  98.216 -    private PanelLayout footerPanel = new PanelLayout();
  98.217 -
  98.218 -    public PanelLayout getFooterPanel() {
  98.219 -        return footerPanel;
  98.220 -    }
  98.221 -
  98.222 -    public void setFooterPanel(PanelLayout pl) {
  98.223 -        this.footerPanel = pl;
  98.224 -    }
  98.225 -    private StaticText staticText10 = new StaticText();
  98.226 -
  98.227 -    public StaticText getStaticText10() {
  98.228 -        return staticText10;
  98.229 -    }
  98.230 -
  98.231 -    public void setStaticText10(StaticText st) {
  98.232 -        this.staticText10 = st;
  98.233 -    }
  98.234 -    private PanelLayout mainContentPanel = new PanelLayout();
  98.235 -
  98.236 -    public PanelLayout getMainContentPanel() {
  98.237 -        return mainContentPanel;
  98.238 -    }
  98.239 -
  98.240 -    public void setMainContentPanel(PanelLayout pl) {
  98.241 -        this.mainContentPanel = pl;
  98.242 -    }
  98.243 -    private StaticText staticText11 = new StaticText();
  98.244 -
  98.245 -    public StaticText getStaticText11() {
  98.246 -        return staticText11;
  98.247 -    }
  98.248 -
  98.249 -    public void setStaticText11(StaticText st) {
  98.250 -        this.staticText11 = st;
  98.251 -    }
  98.252 -    private StaticText staticText12 = new StaticText();
  98.253 -
  98.254 -    public StaticText getStaticText12() {
  98.255 -        return staticText12;
  98.256 -    }
  98.257 -
  98.258 -    public void setStaticText12(StaticText st) {
  98.259 -        this.staticText12 = st;
  98.260 -    }
  98.261 -    private StaticText staticText13 = new StaticText();
  98.262 -
  98.263 -    public StaticText getStaticText13() {
  98.264 -        return staticText13;
  98.265 -    }
  98.266 -
  98.267 -    public void setStaticText13(StaticText st) {
  98.268 -        this.staticText13 = st;
  98.269 -    }
  98.270 -    private StaticText staticText14 = new StaticText();
  98.271 -
  98.272 -    public StaticText getStaticText14() {
  98.273 -        return staticText14;
  98.274 -    }
  98.275 -
  98.276 -    public void setStaticText14(StaticText st) {
  98.277 -        this.staticText14 = st;
  98.278 -    }
  98.279 -    private StaticText staticText15 = new StaticText();
  98.280 -
  98.281 -    public StaticText getStaticText15() {
  98.282 -        return staticText15;
  98.283 -    }
  98.284 -
  98.285 -    public void setStaticText15(StaticText st) {
  98.286 -        this.staticText15 = st;
  98.287 -    }
  98.288 -    private StaticText staticText16 = new StaticText();
  98.289 -
  98.290 -    public StaticText getStaticText16() {
  98.291 -        return staticText16;
  98.292 -    }
  98.293 -
  98.294 -    public void setStaticText16(StaticText st) {
  98.295 -        this.staticText16 = st;
  98.296 -    }
  98.297 -    private StaticText staticText17 = new StaticText();
  98.298 -
  98.299 -    public StaticText getStaticText17() {
  98.300 -        return staticText17;
  98.301 -    }
  98.302 -
  98.303 -    public void setStaticText17(StaticText st) {
  98.304 -        this.staticText17 = st;
  98.305 -    }
  98.306 -
  98.307 -    // </editor-fold>
  98.308 -
  98.309 -    /**
  98.310 -     * <p>Construct a new Page bean instance.</p>
  98.311 -     */
  98.312 -    public ${name}() {
  98.313 -    }
  98.314 -
  98.315 -    /**
  98.316 -     * <p>Callback method that is called whenever a page is navigated to,
  98.317 -     * either directly via a URL, or indirectly via page navigation.
  98.318 -     * Customize this method to acquire resources that will be needed
  98.319 -     * for event handlers and lifecycle methods, whether or not this
  98.320 -     * page is performing post back processing.</p>
  98.321 -     * 
  98.322 -     * <p>Note that, if the current request is a postback, the property
  98.323 -     * values of the components do <strong>not</strong> represent any
  98.324 -     * values submitted with this request.  Instead, they represent the
  98.325 -     * property values that were saved for this view when it was rendered.</p>
  98.326 -     */
  98.327 -    public void init() {
  98.328 -        // Perform initializations inherited from our superclass
  98.329 -        super.init();
  98.330 -        // Perform application initialization that must complete
  98.331 -        // *before* managed components are initialized
  98.332 -        // TODO - add your own initialiation code here
  98.333 -            
  98.334 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
  98.335 -        // Initialize automatically managed components
  98.336 -        // *Note* - this logic should NOT be modified
  98.337 -        try {
  98.338 -            _init();
  98.339 -        } catch (Exception e) {
  98.340 -            log("Page1 Initialization Failure", e);
  98.341 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
  98.342 -        }
  98.343 -        
  98.344 -        // </editor-fold>
  98.345 -        // Perform application initialization that must complete
  98.346 -        // *after* managed components are initialized
  98.347 -        // TODO - add your own initialization code here
  98.348 -    }
  98.349 -
  98.350 -    /**
  98.351 -     * <p>Callback method that is called after the component tree has been
  98.352 -     * restored, but before any event processing takes place.  This method
  98.353 -     * will <strong>only</strong> be called on a postback request that
  98.354 -     * is processing a form submit.  Customize this method to allocate
  98.355 -     * resources that will be required in your event handlers.</p>
  98.356 -     */
  98.357 -    public void preprocess() {
  98.358 -    }
  98.359 -
  98.360 -    /**
  98.361 -     * <p>Callback method that is called just before rendering takes place.
  98.362 -     * This method will <strong>only</strong> be called for the page that
  98.363 -     * will actually be rendered (and not, for example, on a page that
  98.364 -     * handled a postback and then navigated to a different page).  Customize
  98.365 -     * this method to allocate resources that will be required for rendering
  98.366 -     * this page.</p>
  98.367 -     */
  98.368 -    public void prerender() {
  98.369 -    }
  98.370 -
  98.371 -    /**
  98.372 -     * <p>Callback method that is called after rendering is completed for
  98.373 -     * this request, if <code>init()</code> was called (regardless of whether
  98.374 -     * or not this was the page that was actually rendered).  Customize this
  98.375 -     * method to release resources acquired in the <code>init()</code>,
  98.376 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
  98.377 -     * acquired during execution of an event handler).</p>
  98.378 -     */
  98.379 -    public void destroy() {
  98.380 -    }
  98.381 -
  98.382 -    /**
  98.383 -     * <p>Return a reference to the scoped data bean.</p>
  98.384 -     */
  98.385 -    protected RequestBean1 getRequestBean1() {
  98.386 -        return (RequestBean1) getBean("RequestBean1");
  98.387 -    }
  98.388 -
  98.389 -    /**
  98.390 -     * <p>Return a reference to the scoped data bean.</p>
  98.391 -     */
  98.392 -    protected SessionBean1 getSessionBean1() {
  98.393 -        return (SessionBean1) getBean("SessionBean1");
  98.394 -    }
  98.395 -
  98.396 -    /**
  98.397 -     * <p>Return a reference to the scoped data bean.</p>
  98.398 -     */
  98.399 -    protected ApplicationBean1 getApplicationBean1() {
  98.400 -        return (ApplicationBean1) getBean("ApplicationBean1");
  98.401 -    }
  98.402 -}
  98.403 -
    99.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate6.jsp.template	Wed Feb 23 20:05:40 2011 -0500
    99.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    99.3 @@ -1,51 +0,0 @@
    99.4 -<#assign pound = '#'>
    99.5 -<?xml version="1.0" encoding="${encoding}"?>
    99.6 -<!--
    99.7 -Document   : ${name}
    99.8 -Created on : ${date}, ${time}
    99.9 -Author     : ${user}
   99.10 --->
   99.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
   99.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
   99.13 -    <f:view>
   99.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
   99.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
   99.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
   99.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
   99.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout6.css"/>
   99.19 -                </webuijsf:head>
   99.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
   99.21 -                    <br/>
   99.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
   99.23 -                        <div id="container">
   99.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
   99.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
   99.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
   99.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   99.28 -                            </webuijsf:panelLayout>
   99.29 -                            <!-- end ${pound}container -->
   99.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.leftSidebarPanel}" id="leftSidebarPanel" panelLayout="flow" styleClass="leftSidebar">
   99.31 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText2}" escape="false" id="staticText2" text="&lt;h2&gt;Left Sidebar&lt;/h2&gt;"/>
   99.32 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText3}" escape="false" id="staticText3" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   99.33 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText4}" escape="false" id="staticText4" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   99.34 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText5}" escape="false" id="staticText5" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   99.35 -                            </webuijsf:panelLayout>
   99.36 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
   99.37 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
   99.38 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   99.39 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
   99.40 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   99.41 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   99.42 -                            </webuijsf:panelLayout>
   99.43 -                            <br class="clearfloat"/>
   99.44 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.footerPanel}" id="footerPanel" panelLayout="flow" styleClass="footer">
   99.45 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText10}" escape="false" id="staticText10" text="&lt;h4&gt;Footer&lt;/h4&gt;"/>
   99.46 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText17}" escape="false" id="staticText17" text="Sub Footer&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
   99.47 -                            </webuijsf:panelLayout>
   99.48 -                        </div>
   99.49 -                    </webuijsf:form>
   99.50 -                </webuijsf:body>
   99.51 -            </webuijsf:html>
   99.52 -        </webuijsf:page>
   99.53 -    </f:view>
   99.54 -</jsp:root>
   100.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate7.java.template	Wed Feb 23 20:05:40 2011 -0500
   100.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   100.3 @@ -1,391 +0,0 @@
   100.4 -/*
   100.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   100.6 - *
   100.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   100.8 - *
   100.9 - * The contents of this file are subject to the terms of either the GNU
  100.10 - * General Public License Version 2 only ("GPL") or the Common
  100.11 - * Development and Distribution License("CDDL") (collectively, the
  100.12 - * "License"). You may not use this file except in compliance with the
  100.13 - * License. You can obtain a copy of the License at
  100.14 - * http://www.netbeans.org/cddl-gplv2.html
  100.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  100.16 - * specific language governing permissions and limitations under the
  100.17 - * License.  When distributing the software, include this License Header
  100.18 - * Notice in each file and include the License file at
  100.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  100.20 - * particular file as subject to the "Classpath" exception as provided
  100.21 - * by Sun in the GPL Version 2 section of the License file that
  100.22 - * accompanied this code. If applicable, add the following below the
  100.23 - * License Header, with the fields enclosed by brackets [] replaced by
  100.24 - * your own identifying information:
  100.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  100.26 - *
  100.27 - * Contributor(s):
  100.28 - *
  100.29 - * The Original Software is NetBeans. The Initial Developer of the Original
  100.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  100.31 - * Microsystems, Inc. All Rights Reserved.
  100.32 - *
  100.33 - * If you wish your version of this file to be governed by only the CDDL
  100.34 - * or only the GPL Version 2, indicate your decision by adding
  100.35 - * "[Contributor] elects to include this software in this distribution
  100.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  100.37 - * single choice of license, a recipient has the option to distribute
  100.38 - * your version of this file under either the CDDL, the GPL Version 2 or
  100.39 - * to extend the choice of license to its licensees as provided above.
  100.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  100.41 - * Version 2 license, then the option applies only if the new code is
  100.42 - * made subject to such option by the copyright holder.
  100.43 - */
  100.44 -
  100.45 -/*
  100.46 - * ${name}.java
  100.47 - *
  100.48 - * Created on ${date}, ${time}
  100.49 - * Copyright ${user}
  100.50 - */
  100.51 -<#if package?? && package != "">
  100.52 -package ${package};
  100.53 -</#if>
  100.54 -
  100.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
  100.56 -import com.sun.webui.jsf.component.Body;
  100.57 -import com.sun.webui.jsf.component.Form;
  100.58 -import com.sun.webui.jsf.component.Head;
  100.59 -import com.sun.webui.jsf.component.Html;
  100.60 -import com.sun.webui.jsf.component.Link;
  100.61 -import com.sun.webui.jsf.component.Page;
  100.62 -import com.sun.webui.jsf.component.PanelLayout;
  100.63 -import com.sun.webui.jsf.component.StaticText;
  100.64 -import javax.faces.FacesException;
  100.65 -
  100.66 -/**
  100.67 - * <p>Page bean that corresponds to a similarly named JSP page.  This
  100.68 - * class contains component definitions (and initialization code) for
  100.69 - * all components that you have defined on this page, as well as
  100.70 - * lifecycle methods and event handlers where you may add behavior
  100.71 - * to respond to incoming events.</p>
  100.72 - */
  100.73 -public class ${name} extends AbstractPageBean {
  100.74 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
  100.75 -    private int __placeholder;
  100.76 -
  100.77 -    /**
  100.78 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
  100.79 -     * This method is automatically generated, so any user-specified code inserted
  100.80 -     * here is subject to being replaced.</p>
  100.81 -     */
  100.82 -    private void _init() throws Exception {
  100.83 -    }
  100.84 -
  100.85 -    private Page page1 = new Page();
  100.86 -    
  100.87 -    public Page getPage1() {
  100.88 -        return page1;
  100.89 -    }
  100.90 -    
  100.91 -    public void setPage1(Page p) {
  100.92 -        this.page1 = p;
  100.93 -    }
  100.94 -    
  100.95 -    private Html html1 = new Html();
  100.96 -    
  100.97 -    public Html getHtml1() {
  100.98 -        return html1;
  100.99 -    }
 100.100 -    
 100.101 -    public void setHtml1(Html h) {
 100.102 -        this.html1 = h;
 100.103 -    }
 100.104 -    
 100.105 -    private Head head1 = new Head();
 100.106 -    
 100.107 -    public Head getHead1() {
 100.108 -        return head1;
 100.109 -    }
 100.110 -    
 100.111 -    public void setHead1(Head h) {
 100.112 -        this.head1 = h;
 100.113 -    }
 100.114 -    
 100.115 -    private Link link1 = new Link();
 100.116 -    
 100.117 -    public Link getLink1() {
 100.118 -        return link1;
 100.119 -    }
 100.120 -    
 100.121 -    public void setLink1(Link l) {
 100.122 -        this.link1 = l;
 100.123 -    }
 100.124 -    
 100.125 -    private Body body1 = new Body();
 100.126 -    
 100.127 -    public Body getBody1() {
 100.128 -        return body1;
 100.129 -    }
 100.130 -    
 100.131 -    public void setBody1(Body b) {
 100.132 -        this.body1 = b;
 100.133 -    }
 100.134 -    
 100.135 -    private Form form1 = new Form();
 100.136 -    
 100.137 -    public Form getForm1() {
 100.138 -        return form1;
 100.139 -    }
 100.140 -    
 100.141 -    public void setForm1(Form f) {
 100.142 -        this.form1 = f;
 100.143 -    }
 100.144 -    private Link link2 = new Link();
 100.145 -
 100.146 -    public Link getLink2() {
 100.147 -        return link2;
 100.148 -    }
 100.149 -
 100.150 -    public void setLink2(Link l) {
 100.151 -        this.link2 = l;
 100.152 -    }
 100.153 -    private PanelLayout headerPanel = new PanelLayout();
 100.154 -
 100.155 -    public PanelLayout getHeaderPanel() {
 100.156 -        return headerPanel;
 100.157 -    }
 100.158 -
 100.159 -    public void setHeaderPanel(PanelLayout pl) {
 100.160 -        this.headerPanel = pl;
 100.161 -    }
 100.162 -    private StaticText staticText1 = new StaticText();
 100.163 -
 100.164 -    public StaticText getStaticText1() {
 100.165 -        return staticText1;
 100.166 -    }
 100.167 -
 100.168 -    public void setStaticText1(StaticText st) {
 100.169 -        this.staticText1 = st;
 100.170 -    }
 100.171 -    private PanelLayout rightSidebarPanel = new PanelLayout();
 100.172 -
 100.173 -    public PanelLayout getRightSidebarPanel() {
 100.174 -        return rightSidebarPanel;
 100.175 -    }
 100.176 -
 100.177 -    public void setRightSidebarPanel(PanelLayout pl) {
 100.178 -        this.rightSidebarPanel = pl;
 100.179 -    }
 100.180 -    private StaticText staticText6 = new StaticText();
 100.181 -
 100.182 -    public StaticText getStaticText6() {
 100.183 -        return staticText6;
 100.184 -    }
 100.185 -
 100.186 -    public void setStaticText6(StaticText st) {
 100.187 -        this.staticText6 = st;
 100.188 -    }
 100.189 -    private StaticText staticText7 = new StaticText();
 100.190 -
 100.191 -    public StaticText getStaticText7() {
 100.192 -        return staticText7;
 100.193 -    }
 100.194 -
 100.195 -    public void setStaticText7(StaticText st) {
 100.196 -        this.staticText7 = st;
 100.197 -    }
 100.198 -    private StaticText staticText8 = new StaticText();
 100.199 -
 100.200 -    public StaticText getStaticText8() {
 100.201 -        return staticText8;
 100.202 -    }
 100.203 -
 100.204 -    public void setStaticText8(StaticText st) {
 100.205 -        this.staticText8 = st;
 100.206 -    }
 100.207 -    private PanelLayout footerPanel = new PanelLayout();
 100.208 -
 100.209 -    public PanelLayout getFooterPanel() {
 100.210 -        return footerPanel;
 100.211 -    }
 100.212 -
 100.213 -    public void setFooterPanel(PanelLayout pl) {
 100.214 -        this.footerPanel = pl;
 100.215 -    }
 100.216 -    private StaticText staticText10 = new StaticText();
 100.217 -
 100.218 -    public StaticText getStaticText10() {
 100.219 -        return staticText10;
 100.220 -    }
 100.221 -
 100.222 -    public void setStaticText10(StaticText st) {
 100.223 -        this.staticText10 = st;
 100.224 -    }
 100.225 -    private PanelLayout mainContentPanel = new PanelLayout();
 100.226 -
 100.227 -    public PanelLayout getMainContentPanel() {
 100.228 -        return mainContentPanel;
 100.229 -    }
 100.230 -
 100.231 -    public void setMainContentPanel(PanelLayout pl) {
 100.232 -        this.mainContentPanel = pl;
 100.233 -    }
 100.234 -    private StaticText staticText11 = new StaticText();
 100.235 -
 100.236 -    public StaticText getStaticText11() {
 100.237 -        return staticText11;
 100.238 -    }
 100.239 -
 100.240 -    public void setStaticText11(StaticText st) {
 100.241 -        this.staticText11 = st;
 100.242 -    }
 100.243 -    private StaticText staticText12 = new StaticText();
 100.244 -
 100.245 -    public StaticText getStaticText12() {
 100.246 -        return staticText12;
 100.247 -    }
 100.248 -
 100.249 -    public void setStaticText12(StaticText st) {
 100.250 -        this.staticText12 = st;
 100.251 -    }
 100.252 -    private StaticText staticText13 = new StaticText();
 100.253 -
 100.254 -    public StaticText getStaticText13() {
 100.255 -        return staticText13;
 100.256 -    }
 100.257 -
 100.258 -    public void setStaticText13(StaticText st) {
 100.259 -        this.staticText13 = st;
 100.260 -    }
 100.261 -    private StaticText staticText14 = new StaticText();
 100.262 -
 100.263 -    public StaticText getStaticText14() {
 100.264 -        return staticText14;
 100.265 -    }
 100.266 -
 100.267 -    public void setStaticText14(StaticText st) {
 100.268 -        this.staticText14 = st;
 100.269 -    }
 100.270 -    private StaticText staticText15 = new StaticText();
 100.271 -
 100.272 -    public StaticText getStaticText15() {
 100.273 -        return staticText15;
 100.274 -    }
 100.275 -
 100.276 -    public void setStaticText15(StaticText st) {
 100.277 -        this.staticText15 = st;
 100.278 -    }
 100.279 -    private StaticText staticText16 = new StaticText();
 100.280 -
 100.281 -    public StaticText getStaticText16() {
 100.282 -        return staticText16;
 100.283 -    }
 100.284 -
 100.285 -    public void setStaticText16(StaticText st) {
 100.286 -        this.staticText16 = st;
 100.287 -    }
 100.288 -    private StaticText staticText17 = new StaticText();
 100.289 -
 100.290 -    public StaticText getStaticText17() {
 100.291 -        return staticText17;
 100.292 -    }
 100.293 -
 100.294 -    public void setStaticText17(StaticText st) {
 100.295 -        this.staticText17 = st;
 100.296 -    }
 100.297 -
 100.298 -    // </editor-fold>
 100.299 -
 100.300 -    /**
 100.301 -     * <p>Construct a new Page bean instance.</p>
 100.302 -     */
 100.303 -    public ${name}() {
 100.304 -    }
 100.305 -
 100.306 -    /**
 100.307 -     * <p>Callback method that is called whenever a page is navigated to,
 100.308 -     * either directly via a URL, or indirectly via page navigation.
 100.309 -     * Customize this method to acquire resources that will be needed
 100.310 -     * for event handlers and lifecycle methods, whether or not this
 100.311 -     * page is performing post back processing.</p>
 100.312 -     * 
 100.313 -     * <p>Note that, if the current request is a postback, the property
 100.314 -     * values of the components do <strong>not</strong> represent any
 100.315 -     * values submitted with this request.  Instead, they represent the
 100.316 -     * property values that were saved for this view when it was rendered.</p>
 100.317 -     */
 100.318 -    public void init() {
 100.319 -        // Perform initializations inherited from our superclass
 100.320 -        super.init();
 100.321 -        // Perform application initialization that must complete
 100.322 -        // *before* managed components are initialized
 100.323 -        // TODO - add your own initialiation code here
 100.324 -            
 100.325 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 100.326 -        // Initialize automatically managed components
 100.327 -        // *Note* - this logic should NOT be modified
 100.328 -        try {
 100.329 -            _init();
 100.330 -        } catch (Exception e) {
 100.331 -            log("Page1 Initialization Failure", e);
 100.332 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
 100.333 -        }
 100.334 -        
 100.335 -        // </editor-fold>
 100.336 -        // Perform application initialization that must complete
 100.337 -        // *after* managed components are initialized
 100.338 -        // TODO - add your own initialization code here
 100.339 -    }
 100.340 -
 100.341 -    /**
 100.342 -     * <p>Callback method that is called after the component tree has been
 100.343 -     * restored, but before any event processing takes place.  This method
 100.344 -     * will <strong>only</strong> be called on a postback request that
 100.345 -     * is processing a form submit.  Customize this method to allocate
 100.346 -     * resources that will be required in your event handlers.</p>
 100.347 -     */
 100.348 -    public void preprocess() {
 100.349 -    }
 100.350 -
 100.351 -    /**
 100.352 -     * <p>Callback method that is called just before rendering takes place.
 100.353 -     * This method will <strong>only</strong> be called for the page that
 100.354 -     * will actually be rendered (and not, for example, on a page that
 100.355 -     * handled a postback and then navigated to a different page).  Customize
 100.356 -     * this method to allocate resources that will be required for rendering
 100.357 -     * this page.</p>
 100.358 -     */
 100.359 -    public void prerender() {
 100.360 -    }
 100.361 -
 100.362 -    /**
 100.363 -     * <p>Callback method that is called after rendering is completed for
 100.364 -     * this request, if <code>init()</code> was called (regardless of whether
 100.365 -     * or not this was the page that was actually rendered).  Customize this
 100.366 -     * method to release resources acquired in the <code>init()</code>,
 100.367 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
 100.368 -     * acquired during execution of an event handler).</p>
 100.369 -     */
 100.370 -    public void destroy() {
 100.371 -    }
 100.372 -
 100.373 -    /**
 100.374 -     * <p>Return a reference to the scoped data bean.</p>
 100.375 -     */
 100.376 -    protected RequestBean1 getRequestBean1() {
 100.377 -        return (RequestBean1) getBean("RequestBean1");
 100.378 -    }
 100.379 -
 100.380 -    /**
 100.381 -     * <p>Return a reference to the scoped data bean.</p>
 100.382 -     */
 100.383 -    protected SessionBean1 getSessionBean1() {
 100.384 -        return (SessionBean1) getBean("SessionBean1");
 100.385 -    }
 100.386 -
 100.387 -    /**
 100.388 -     * <p>Return a reference to the scoped data bean.</p>
 100.389 -     */
 100.390 -    protected ApplicationBean1 getApplicationBean1() {
 100.391 -        return (ApplicationBean1) getBean("ApplicationBean1");
 100.392 -    }
 100.393 -}
 100.394 -
   101.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate7.jsp.template	Wed Feb 23 20:05:40 2011 -0500
   101.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   101.3 @@ -1,50 +0,0 @@
   101.4 -<#assign pound = '#'>
   101.5 -<?xml version="1.0" encoding="${encoding}"?>
   101.6 -<!--
   101.7 -Document   : ${name}
   101.8 -Created on : ${date}, ${time}
   101.9 -Author     : ${user}
  101.10 --->
  101.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
  101.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
  101.13 -    <f:view>
  101.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
  101.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
  101.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
  101.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
  101.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout7.css"/>
  101.19 -                </webuijsf:head>
  101.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
  101.21 -                    <br/>
  101.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
  101.23 -                        <div id="container">
  101.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
  101.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
  101.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
  101.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  101.28 -                            </webuijsf:panelLayout>
  101.29 -                            <!-- end ${pound}container -->
  101.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.rightSidebarPanel}" id="rightSidebarPanel" panelLayout="flow" styleClass="rightSidebar">
  101.31 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText6}" escape="false" id="staticText6" text="&lt;h2&gt;Right Sidebar&lt;/h2&gt;"/>
  101.32 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText7}" escape="false" id="staticText7" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  101.33 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText8}" escape="false" id="staticText8" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  101.34 -                            </webuijsf:panelLayout>
  101.35 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
  101.36 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
  101.37 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  101.38 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
  101.39 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  101.40 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  101.41 -                            </webuijsf:panelLayout>
  101.42 -                            <br class="clearfloat"/>
  101.43 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.footerPanel}" id="footerPanel" panelLayout="flow" styleClass="footer">
  101.44 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText10}" escape="false" id="staticText10" text="&lt;h4&gt;Footer&lt;/h4&gt;"/>
  101.45 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText17}" escape="false" id="staticText17" text="Sub Footer&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  101.46 -                            </webuijsf:panelLayout>
  101.47 -                        </div>
  101.48 -                    </webuijsf:form>
  101.49 -                </webuijsf:body>
  101.50 -            </webuijsf:html>
  101.51 -        </webuijsf:page>
  101.52 -    </f:view>
  101.53 -</jsp:root>
   102.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate8.java.template	Wed Feb 23 20:05:40 2011 -0500
   102.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   102.3 @@ -1,436 +0,0 @@
   102.4 -/*
   102.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   102.6 - *
   102.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   102.8 - *
   102.9 - * The contents of this file are subject to the terms of either the GNU
  102.10 - * General Public License Version 2 only ("GPL") or the Common
  102.11 - * Development and Distribution License("CDDL") (collectively, the
  102.12 - * "License"). You may not use this file except in compliance with the
  102.13 - * License. You can obtain a copy of the License at
  102.14 - * http://www.netbeans.org/cddl-gplv2.html
  102.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  102.16 - * specific language governing permissions and limitations under the
  102.17 - * License.  When distributing the software, include this License Header
  102.18 - * Notice in each file and include the License file at
  102.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  102.20 - * particular file as subject to the "Classpath" exception as provided
  102.21 - * by Sun in the GPL Version 2 section of the License file that
  102.22 - * accompanied this code. If applicable, add the following below the
  102.23 - * License Header, with the fields enclosed by brackets [] replaced by
  102.24 - * your own identifying information:
  102.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  102.26 - *
  102.27 - * Contributor(s):
  102.28 - *
  102.29 - * The Original Software is NetBeans. The Initial Developer of the Original
  102.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  102.31 - * Microsystems, Inc. All Rights Reserved.
  102.32 - *
  102.33 - * If you wish your version of this file to be governed by only the CDDL
  102.34 - * or only the GPL Version 2, indicate your decision by adding
  102.35 - * "[Contributor] elects to include this software in this distribution
  102.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  102.37 - * single choice of license, a recipient has the option to distribute
  102.38 - * your version of this file under either the CDDL, the GPL Version 2 or
  102.39 - * to extend the choice of license to its licensees as provided above.
  102.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  102.41 - * Version 2 license, then the option applies only if the new code is
  102.42 - * made subject to such option by the copyright holder.
  102.43 - */
  102.44 -
  102.45 -/*
  102.46 - * ${name}.java
  102.47 - *
  102.48 - * Created on ${date}, ${time}
  102.49 - * Copyright ${user}
  102.50 - */
  102.51 -<#if package?? && package != "">
  102.52 -package ${package};
  102.53 -</#if>
  102.54 -
  102.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
  102.56 -import com.sun.webui.jsf.component.Body;
  102.57 -import com.sun.webui.jsf.component.Form;
  102.58 -import com.sun.webui.jsf.component.Head;
  102.59 -import com.sun.webui.jsf.component.Html;
  102.60 -import com.sun.webui.jsf.component.Link;
  102.61 -import com.sun.webui.jsf.component.Page;
  102.62 -import com.sun.webui.jsf.component.PanelLayout;
  102.63 -import com.sun.webui.jsf.component.StaticText;
  102.64 -import javax.faces.FacesException;
  102.65 -
  102.66 -/**
  102.67 - * <p>Page bean that corresponds to a similarly named JSP page.  This
  102.68 - * class contains component definitions (and initialization code) for
  102.69 - * all components that you have defined on this page, as well as
  102.70 - * lifecycle methods and event handlers where you may add behavior
  102.71 - * to respond to incoming events.</p>
  102.72 - */
  102.73 -public class ${name} extends AbstractPageBean {
  102.74 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
  102.75 -    private int __placeholder;
  102.76 -
  102.77 -    /**
  102.78 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
  102.79 -     * This method is automatically generated, so any user-specified code inserted
  102.80 -     * here is subject to being replaced.</p>
  102.81 -     */
  102.82 -    private void _init() throws Exception {
  102.83 -    }
  102.84 -
  102.85 -    private Page page1 = new Page();
  102.86 -    
  102.87 -    public Page getPage1() {
  102.88 -        return page1;
  102.89 -    }
  102.90 -    
  102.91 -    public void setPage1(Page p) {
  102.92 -        this.page1 = p;
  102.93 -    }
  102.94 -    
  102.95 -    private Html html1 = new Html();
  102.96 -    
  102.97 -    public Html getHtml1() {
  102.98 -        return html1;
  102.99 -    }
 102.100 -    
 102.101 -    public void setHtml1(Html h) {
 102.102 -        this.html1 = h;
 102.103 -    }
 102.104 -    
 102.105 -    private Head head1 = new Head();
 102.106 -    
 102.107 -    public Head getHead1() {
 102.108 -        return head1;
 102.109 -    }
 102.110 -    
 102.111 -    public void setHead1(Head h) {
 102.112 -        this.head1 = h;
 102.113 -    }
 102.114 -    
 102.115 -    private Link link1 = new Link();
 102.116 -    
 102.117 -    public Link getLink1() {
 102.118 -        return link1;
 102.119 -    }
 102.120 -    
 102.121 -    public void setLink1(Link l) {
 102.122 -        this.link1 = l;
 102.123 -    }
 102.124 -    
 102.125 -    private Body body1 = new Body();
 102.126 -    
 102.127 -    public Body getBody1() {
 102.128 -        return body1;
 102.129 -    }
 102.130 -    
 102.131 -    public void setBody1(Body b) {
 102.132 -        this.body1 = b;
 102.133 -    }
 102.134 -    
 102.135 -    private Form form1 = new Form();
 102.136 -    
 102.137 -    public Form getForm1() {
 102.138 -        return form1;
 102.139 -    }
 102.140 -    
 102.141 -    public void setForm1(Form f) {
 102.142 -        this.form1 = f;
 102.143 -    }
 102.144 -    private Link link2 = new Link();
 102.145 -
 102.146 -    public Link getLink2() {
 102.147 -        return link2;
 102.148 -    }
 102.149 -
 102.150 -    public void setLink2(Link l) {
 102.151 -        this.link2 = l;
 102.152 -    }
 102.153 -    private PanelLayout headerPanel = new PanelLayout();
 102.154 -
 102.155 -    public PanelLayout getHeaderPanel() {
 102.156 -        return headerPanel;
 102.157 -    }
 102.158 -
 102.159 -    public void setHeaderPanel(PanelLayout pl) {
 102.160 -        this.headerPanel = pl;
 102.161 -    }
 102.162 -    private StaticText staticText1 = new StaticText();
 102.163 -
 102.164 -    public StaticText getStaticText1() {
 102.165 -        return staticText1;
 102.166 -    }
 102.167 -
 102.168 -    public void setStaticText1(StaticText st) {
 102.169 -        this.staticText1 = st;
 102.170 -    }
 102.171 -    private PanelLayout leftSidebarPanel = new PanelLayout();
 102.172 -
 102.173 -    public PanelLayout getLeftSidebarPanel() {
 102.174 -        return leftSidebarPanel;
 102.175 -    }
 102.176 -
 102.177 -    public void setLeftSidebarPanel(PanelLayout pl) {
 102.178 -        this.leftSidebarPanel = pl;
 102.179 -    }
 102.180 -    private StaticText staticText2 = new StaticText();
 102.181 -
 102.182 -    public StaticText getStaticText2() {
 102.183 -        return staticText2;
 102.184 -    }
 102.185 -
 102.186 -    public void setStaticText2(StaticText st) {
 102.187 -        this.staticText2 = st;
 102.188 -    }
 102.189 -    private StaticText staticText3 = new StaticText();
 102.190 -
 102.191 -    public StaticText getStaticText3() {
 102.192 -        return staticText3;
 102.193 -    }
 102.194 -
 102.195 -    public void setStaticText3(StaticText st) {
 102.196 -        this.staticText3 = st;
 102.197 -    }
 102.198 -    private StaticText staticText4 = new StaticText();
 102.199 -
 102.200 -    public StaticText getStaticText4() {
 102.201 -        return staticText4;
 102.202 -    }
 102.203 -
 102.204 -    public void setStaticText4(StaticText st) {
 102.205 -        this.staticText4 = st;
 102.206 -    }
 102.207 -    private StaticText staticText5 = new StaticText();
 102.208 -
 102.209 -    public StaticText getStaticText5() {
 102.210 -        return staticText5;
 102.211 -    }
 102.212 -
 102.213 -    public void setStaticText5(StaticText st) {
 102.214 -        this.staticText5 = st;
 102.215 -    }
 102.216 -    private PanelLayout rightSidebarPanel = new PanelLayout();
 102.217 -
 102.218 -    public PanelLayout getRightSidebarPanel() {
 102.219 -        return rightSidebarPanel;
 102.220 -    }
 102.221 -
 102.222 -    public void setRightSidebarPanel(PanelLayout pl) {
 102.223 -        this.rightSidebarPanel = pl;
 102.224 -    }
 102.225 -    private StaticText staticText6 = new StaticText();
 102.226 -
 102.227 -    public StaticText getStaticText6() {
 102.228 -        return staticText6;
 102.229 -    }
 102.230 -
 102.231 -    public void setStaticText6(StaticText st) {
 102.232 -        this.staticText6 = st;
 102.233 -    }
 102.234 -    private StaticText staticText7 = new StaticText();
 102.235 -
 102.236 -    public StaticText getStaticText7() {
 102.237 -        return staticText7;
 102.238 -    }
 102.239 -
 102.240 -    public void setStaticText7(StaticText st) {
 102.241 -        this.staticText7 = st;
 102.242 -    }
 102.243 -    private StaticText staticText8 = new StaticText();
 102.244 -
 102.245 -    public StaticText getStaticText8() {
 102.246 -        return staticText8;
 102.247 -    }
 102.248 -
 102.249 -    public void setStaticText8(StaticText st) {
 102.250 -        this.staticText8 = st;
 102.251 -    }
 102.252 -    private PanelLayout footerPanel = new PanelLayout();
 102.253 -
 102.254 -    public PanelLayout getFooterPanel() {
 102.255 -        return footerPanel;
 102.256 -    }
 102.257 -
 102.258 -    public void setFooterPanel(PanelLayout pl) {
 102.259 -        this.footerPanel = pl;
 102.260 -    }
 102.261 -    private StaticText staticText10 = new StaticText();
 102.262 -
 102.263 -    public StaticText getStaticText10() {
 102.264 -        return staticText10;
 102.265 -    }
 102.266 -
 102.267 -    public void setStaticText10(StaticText st) {
 102.268 -        this.staticText10 = st;
 102.269 -    }
 102.270 -    private PanelLayout mainContentPanel = new PanelLayout();
 102.271 -
 102.272 -    public PanelLayout getMainContentPanel() {
 102.273 -        return mainContentPanel;
 102.274 -    }
 102.275 -
 102.276 -    public void setMainContentPanel(PanelLayout pl) {
 102.277 -        this.mainContentPanel = pl;
 102.278 -    }
 102.279 -    private StaticText staticText11 = new StaticText();
 102.280 -
 102.281 -    public StaticText getStaticText11() {
 102.282 -        return staticText11;
 102.283 -    }
 102.284 -
 102.285 -    public void setStaticText11(StaticText st) {
 102.286 -        this.staticText11 = st;
 102.287 -    }
 102.288 -    private StaticText staticText12 = new StaticText();
 102.289 -
 102.290 -    public StaticText getStaticText12() {
 102.291 -        return staticText12;
 102.292 -    }
 102.293 -
 102.294 -    public void setStaticText12(StaticText st) {
 102.295 -        this.staticText12 = st;
 102.296 -    }
 102.297 -    private StaticText staticText13 = new StaticText();
 102.298 -
 102.299 -    public StaticText getStaticText13() {
 102.300 -        return staticText13;
 102.301 -    }
 102.302 -
 102.303 -    public void setStaticText13(StaticText st) {
 102.304 -        this.staticText13 = st;
 102.305 -    }
 102.306 -    private StaticText staticText14 = new StaticText();
 102.307 -
 102.308 -    public StaticText getStaticText14() {
 102.309 -        return staticText14;
 102.310 -    }
 102.311 -
 102.312 -    public void setStaticText14(StaticText st) {
 102.313 -        this.staticText14 = st;
 102.314 -    }
 102.315 -    private StaticText staticText15 = new StaticText();
 102.316 -
 102.317 -    public StaticText getStaticText15() {
 102.318 -        return staticText15;
 102.319 -    }
 102.320 -
 102.321 -    public void setStaticText15(StaticText st) {
 102.322 -        this.staticText15 = st;
 102.323 -    }
 102.324 -    private StaticText staticText16 = new StaticText();
 102.325 -
 102.326 -    public StaticText getStaticText16() {
 102.327 -        return staticText16;
 102.328 -    }
 102.329 -
 102.330 -    public void setStaticText16(StaticText st) {
 102.331 -        this.staticText16 = st;
 102.332 -    }
 102.333 -    private StaticText staticText17 = new StaticText();
 102.334 -
 102.335 -    public StaticText getStaticText17() {
 102.336 -        return staticText17;
 102.337 -    }
 102.338 -
 102.339 -    public void setStaticText17(StaticText st) {
 102.340 -        this.staticText17 = st;
 102.341 -    }
 102.342 -
 102.343 -    // </editor-fold>
 102.344 -
 102.345 -    /**
 102.346 -     * <p>Construct a new Page bean instance.</p>
 102.347 -     */
 102.348 -    public ${name}() {
 102.349 -    }
 102.350 -
 102.351 -    /**
 102.352 -     * <p>Callback method that is called whenever a page is navigated to,
 102.353 -     * either directly via a URL, or indirectly via page navigation.
 102.354 -     * Customize this method to acquire resources that will be needed
 102.355 -     * for event handlers and lifecycle methods, whether or not this
 102.356 -     * page is performing post back processing.</p>
 102.357 -     * 
 102.358 -     * <p>Note that, if the current request is a postback, the property
 102.359 -     * values of the components do <strong>not</strong> represent any
 102.360 -     * values submitted with this request.  Instead, they represent the
 102.361 -     * property values that were saved for this view when it was rendered.</p>
 102.362 -     */
 102.363 -    public void init() {
 102.364 -        // Perform initializations inherited from our superclass
 102.365 -        super.init();
 102.366 -        // Perform application initialization that must complete
 102.367 -        // *before* managed components are initialized
 102.368 -        // TODO - add your own initialiation code here
 102.369 -            
 102.370 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 102.371 -        // Initialize automatically managed components
 102.372 -        // *Note* - this logic should NOT be modified
 102.373 -        try {
 102.374 -            _init();
 102.375 -        } catch (Exception e) {
 102.376 -            log("Page1 Initialization Failure", e);
 102.377 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
 102.378 -        }
 102.379 -        
 102.380 -        // </editor-fold>
 102.381 -        // Perform application initialization that must complete
 102.382 -        // *after* managed components are initialized
 102.383 -        // TODO - add your own initialization code here
 102.384 -    }
 102.385 -
 102.386 -    /**
 102.387 -     * <p>Callback method that is called after the component tree has been
 102.388 -     * restored, but before any event processing takes place.  This method
 102.389 -     * will <strong>only</strong> be called on a postback request that
 102.390 -     * is processing a form submit.  Customize this method to allocate
 102.391 -     * resources that will be required in your event handlers.</p>
 102.392 -     */
 102.393 -    public void preprocess() {
 102.394 -    }
 102.395 -
 102.396 -    /**
 102.397 -     * <p>Callback method that is called just before rendering takes place.
 102.398 -     * This method will <strong>only</strong> be called for the page that
 102.399 -     * will actually be rendered (and not, for example, on a page that
 102.400 -     * handled a postback and then navigated to a different page).  Customize
 102.401 -     * this method to allocate resources that will be required for rendering
 102.402 -     * this page.</p>
 102.403 -     */
 102.404 -    public void prerender() {
 102.405 -    }
 102.406 -
 102.407 -    /**
 102.408 -     * <p>Callback method that is called after rendering is completed for
 102.409 -     * this request, if <code>init()</code> was called (regardless of whether
 102.410 -     * or not this was the page that was actually rendered).  Customize this
 102.411 -     * method to release resources acquired in the <code>init()</code>,
 102.412 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
 102.413 -     * acquired during execution of an event handler).</p>
 102.414 -     */
 102.415 -    public void destroy() {
 102.416 -    }
 102.417 -
 102.418 -    /**
 102.419 -     * <p>Return a reference to the scoped data bean.</p>
 102.420 -     */
 102.421 -    protected RequestBean1 getRequestBean1() {
 102.422 -        return (RequestBean1) getBean("RequestBean1");
 102.423 -    }
 102.424 -
 102.425 -    /**
 102.426 -     * <p>Return a reference to the scoped data bean.</p>
 102.427 -     */
 102.428 -    protected SessionBean1 getSessionBean1() {
 102.429 -        return (SessionBean1) getBean("SessionBean1");
 102.430 -    }
 102.431 -
 102.432 -    /**
 102.433 -     * <p>Return a reference to the scoped data bean.</p>
 102.434 -     */
 102.435 -    protected ApplicationBean1 getApplicationBean1() {
 102.436 -        return (ApplicationBean1) getBean("ApplicationBean1");
 102.437 -    }
 102.438 -}
 102.439 -
   103.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate8.jsp.template	Wed Feb 23 20:05:40 2011 -0500
   103.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   103.3 @@ -1,56 +0,0 @@
   103.4 -<#assign pound = '#'>
   103.5 -<?xml version="1.0" encoding="${encoding}"?>
   103.6 -<!--
   103.7 -Document   : ${name}
   103.8 -Created on : ${date}, ${time}
   103.9 -Author     : ${user}
  103.10 --->
  103.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
  103.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
  103.13 -    <f:view>
  103.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
  103.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
  103.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
  103.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
  103.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout8.css"/>
  103.19 -                </webuijsf:head>
  103.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
  103.21 -                    <br/>
  103.22 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1">
  103.23 -                        <div id="container">
  103.24 -                            <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
  103.25 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
  103.26 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
  103.27 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.28 -                            </webuijsf:panelLayout>
  103.29 -                            <!-- end ${pound}container -->
  103.30 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.leftSidebarPanel}" id="leftSidebarPanel" panelLayout="flow" styleClass="leftSidebar">
  103.31 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText2}" escape="false" id="staticText2" text="&lt;h2&gt;Left Sidebar&lt;/h2&gt;"/>
  103.32 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText3}" escape="false" id="staticText3" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.33 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText4}" escape="false" id="staticText4" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.34 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText5}" escape="false" id="staticText5" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.35 -                            </webuijsf:panelLayout>
  103.36 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.rightSidebarPanel}" id="rightSidebarPanel" panelLayout="flow" styleClass="rightSidebar">
  103.37 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText6}" escape="false" id="staticText6" text="&lt;h2&gt;Right Sidebar&lt;/h2&gt;"/>
  103.38 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText7}" escape="false" id="staticText7" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.39 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText8}" escape="false" id="staticText8" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.40 -                            </webuijsf:panelLayout>
  103.41 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
  103.42 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
  103.43 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.44 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
  103.45 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.46 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.47 -                            </webuijsf:panelLayout>
  103.48 -                            <br class="clearfloat"/>
  103.49 -                            <webuijsf:panelLayout binding="${pound}{${folder}${name}.footerPanel}" id="footerPanel" panelLayout="flow" styleClass="footer">
  103.50 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText10}" escape="false" id="staticText10" text="&lt;h4&gt;Footer&lt;/h4&gt;"/>
  103.51 -                                <webuijsf:staticText binding="${pound}{${folder}${name}.staticText17}" escape="false" id="staticText17" text="Sub Footer&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  103.52 -                            </webuijsf:panelLayout>
  103.53 -                        </div>
  103.54 -                    </webuijsf:form>
  103.55 -                </webuijsf:body>
  103.56 -            </webuijsf:html>
  103.57 -        </webuijsf:page>
  103.58 -    </f:view>
  103.59 -</jsp:root>
   104.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate9.java.template	Wed Feb 23 20:05:40 2011 -0500
   104.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   104.3 @@ -1,456 +0,0 @@
   104.4 -/*
   104.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   104.6 - *
   104.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   104.8 - *
   104.9 - * The contents of this file are subject to the terms of either the GNU
  104.10 - * General Public License Version 2 only ("GPL") or the Common
  104.11 - * Development and Distribution License("CDDL") (collectively, the
  104.12 - * "License"). You may not use this file except in compliance with the
  104.13 - * License. You can obtain a copy of the License at
  104.14 - * http://www.netbeans.org/cddl-gplv2.html
  104.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  104.16 - * specific language governing permissions and limitations under the
  104.17 - * License.  When distributing the software, include this License Header
  104.18 - * Notice in each file and include the License file at
  104.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  104.20 - * particular file as subject to the "Classpath" exception as provided
  104.21 - * by Sun in the GPL Version 2 section of the License file that
  104.22 - * accompanied this code. If applicable, add the following below the
  104.23 - * License Header, with the fields enclosed by brackets [] replaced by
  104.24 - * your own identifying information:
  104.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  104.26 - *
  104.27 - * Contributor(s):
  104.28 - *
  104.29 - * The Original Software is NetBeans. The Initial Developer of the Original
  104.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  104.31 - * Microsystems, Inc. All Rights Reserved.
  104.32 - *
  104.33 - * If you wish your version of this file to be governed by only the CDDL
  104.34 - * or only the GPL Version 2, indicate your decision by adding
  104.35 - * "[Contributor] elects to include this software in this distribution
  104.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  104.37 - * single choice of license, a recipient has the option to distribute
  104.38 - * your version of this file under either the CDDL, the GPL Version 2 or
  104.39 - * to extend the choice of license to its licensees as provided above.
  104.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  104.41 - * Version 2 license, then the option applies only if the new code is
  104.42 - * made subject to such option by the copyright holder.
  104.43 - */
  104.44 -
  104.45 -/*
  104.46 - * ${name}.java
  104.47 - *
  104.48 - * Created on ${date}, ${time}
  104.49 - * Copyright ${user}
  104.50 - */
  104.51 -<#if package?? && package != "">
  104.52 -package ${package};
  104.53 -</#if>
  104.54 -
  104.55 -import com.sun.rave.web.ui.appbase.AbstractPageBean;
  104.56 -import com.sun.webui.jsf.component.Body;
  104.57 -import com.sun.webui.jsf.component.Form;
  104.58 -import com.sun.webui.jsf.component.Head;
  104.59 -import com.sun.webui.jsf.component.Html;
  104.60 -import com.sun.webui.jsf.component.Hyperlink;
  104.61 -import com.sun.webui.jsf.component.Link;
  104.62 -import com.sun.webui.jsf.component.Page;
  104.63 -import com.sun.webui.jsf.component.PanelLayout;
  104.64 -import com.sun.webui.jsf.component.StaticText;
  104.65 -import javax.faces.FacesException;
  104.66 -import javax.faces.component.html.HtmlPanelGrid;
  104.67 -
  104.68 -/**
  104.69 - * <p>Page bean that corresponds to a similarly named JSP page.  This
  104.70 - * class contains component definitions (and initialization code) for
  104.71 - * all components that you have defined on this page, as well as
  104.72 - * lifecycle methods and event handlers where you may add behavior
  104.73 - * to respond to incoming events.</p>
  104.74 - */
  104.75 -public class ${name} extends AbstractPageBean {
  104.76 -    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
  104.77 -    private int __placeholder;
  104.78 -
  104.79 -    /**
  104.80 -     * <p>Automatically managed component initialization.  <strong>WARNING:</strong>
  104.81 -     * This method is automatically generated, so any user-specified code inserted
  104.82 -     * here is subject to being replaced.</p>
  104.83 -     */
  104.84 -    private void _init() throws Exception {
  104.85 -    }
  104.86 -
  104.87 -    private Page page1 = new Page();
  104.88 -    
  104.89 -    public Page getPage1() {
  104.90 -        return page1;
  104.91 -    }
  104.92 -    
  104.93 -    public void setPage1(Page p) {
  104.94 -        this.page1 = p;
  104.95 -    }
  104.96 -    
  104.97 -    private Html html1 = new Html();
  104.98 -    
  104.99 -    public Html getHtml1() {
 104.100 -        return html1;
 104.101 -    }
 104.102 -    
 104.103 -    public void setHtml1(Html h) {
 104.104 -        this.html1 = h;
 104.105 -    }
 104.106 -    
 104.107 -    private Head head1 = new Head();
 104.108 -    
 104.109 -    public Head getHead1() {
 104.110 -        return head1;
 104.111 -    }
 104.112 -    
 104.113 -    public void setHead1(Head h) {
 104.114 -        this.head1 = h;
 104.115 -    }
 104.116 -    
 104.117 -    private Link link1 = new Link();
 104.118 -    
 104.119 -    public Link getLink1() {
 104.120 -        return link1;
 104.121 -    }
 104.122 -    
 104.123 -    public void setLink1(Link l) {
 104.124 -        this.link1 = l;
 104.125 -    }
 104.126 -    
 104.127 -    private Body body1 = new Body();
 104.128 -    
 104.129 -    public Body getBody1() {
 104.130 -        return body1;
 104.131 -    }
 104.132 -    
 104.133 -    public void setBody1(Body b) {
 104.134 -        this.body1 = b;
 104.135 -    }
 104.136 -    
 104.137 -    private Form form1 = new Form();
 104.138 -    
 104.139 -    public Form getForm1() {
 104.140 -        return form1;
 104.141 -    }
 104.142 -    
 104.143 -    public void setForm1(Form f) {
 104.144 -        this.form1 = f;
 104.145 -    }
 104.146 -    private Link link2 = new Link();
 104.147 -
 104.148 -    public Link getLink2() {
 104.149 -        return link2;
 104.150 -    }
 104.151 -
 104.152 -    public void setLink2(Link l) {
 104.153 -        this.link2 = l;
 104.154 -    }
 104.155 -    private PanelLayout headerPanel = new PanelLayout();
 104.156 -
 104.157 -    public PanelLayout getHeaderPanel() {
 104.158 -        return headerPanel;
 104.159 -    }
 104.160 -
 104.161 -    public void setHeaderPanel(PanelLayout pl) {
 104.162 -        this.headerPanel = pl;
 104.163 -    }
 104.164 -    private StaticText staticText1 = new StaticText();
 104.165 -
 104.166 -    public StaticText getStaticText1() {
 104.167 -        return staticText1;
 104.168 -    }
 104.169 -
 104.170 -    public void setStaticText1(StaticText st) {
 104.171 -        this.staticText1 = st;
 104.172 -    }
 104.173 -    private PanelLayout leftSidebarPanel = new PanelLayout();
 104.174 -
 104.175 -    public PanelLayout getLeftSidebarPanel() {
 104.176 -        return leftSidebarPanel;
 104.177 -    }
 104.178 -
 104.179 -    public void setLeftSidebarPanel(PanelLayout pl) {
 104.180 -        this.leftSidebarPanel = pl;
 104.181 -    }
 104.182 -    private PanelLayout rightSidebarPanel = new PanelLayout();
 104.183 -
 104.184 -    public PanelLayout getRightSidebarPanel() {
 104.185 -        return rightSidebarPanel;
 104.186 -    }
 104.187 -
 104.188 -    public void setRightSidebarPanel(PanelLayout pl) {
 104.189 -        this.rightSidebarPanel = pl;
 104.190 -    }
 104.191 -    private StaticText staticText6 = new StaticText();
 104.192 -
 104.193 -    public StaticText getStaticText6() {
 104.194 -        return staticText6;
 104.195 -    }
 104.196 -
 104.197 -    public void setStaticText6(StaticText st) {
 104.198 -        this.staticText6 = st;
 104.199 -    }
 104.200 -    private StaticText staticText7 = new StaticText();
 104.201 -
 104.202 -    public StaticText getStaticText7() {
 104.203 -        return staticText7;
 104.204 -    }
 104.205 -
 104.206 -    public void setStaticText7(StaticText st) {
 104.207 -        this.staticText7 = st;
 104.208 -    }
 104.209 -    private StaticText staticText8 = new StaticText();
 104.210 -
 104.211 -    public StaticText getStaticText8() {
 104.212 -        return staticText8;
 104.213 -    }
 104.214 -
 104.215 -    public void setStaticText8(StaticText st) {
 104.216 -        this.staticText8 = st;
 104.217 -    }
 104.218 -    private PanelLayout footerPanel = new PanelLayout();
 104.219 -
 104.220 -    public PanelLayout getFooterPanel() {
 104.221 -        return footerPanel;
 104.222 -    }
 104.223 -
 104.224 -    public void setFooterPanel(PanelLayout pl) {
 104.225 -        this.footerPanel = pl;
 104.226 -    }
 104.227 -    private StaticText staticText10 = new StaticText();
 104.228 -
 104.229 -    public StaticText getStaticText10() {
 104.230 -        return staticText10;
 104.231 -    }
 104.232 -
 104.233 -    public void setStaticText10(StaticText st) {
 104.234 -        this.staticText10 = st;
 104.235 -    }
 104.236 -    private PanelLayout mainContentPanel = new PanelLayout();
 104.237 -
 104.238 -    public PanelLayout getMainContentPanel() {
 104.239 -        return mainContentPanel;
 104.240 -    }
 104.241 -
 104.242 -    public void setMainContentPanel(PanelLayout pl) {
 104.243 -        this.mainContentPanel = pl;
 104.244 -    }
 104.245 -    private StaticText staticText11 = new StaticText();
 104.246 -
 104.247 -    public StaticText getStaticText11() {
 104.248 -        return staticText11;
 104.249 -    }
 104.250 -
 104.251 -    public void setStaticText11(StaticText st) {
 104.252 -        this.staticText11 = st;
 104.253 -    }
 104.254 -    private StaticText staticText12 = new StaticText();
 104.255 -
 104.256 -    public StaticText getStaticText12() {
 104.257 -        return staticText12;
 104.258 -    }
 104.259 -
 104.260 -    public void setStaticText12(StaticText st) {
 104.261 -        this.staticText12 = st;
 104.262 -    }
 104.263 -    private StaticText staticText13 = new StaticText();
 104.264 -
 104.265 -    public StaticText getStaticText13() {
 104.266 -        return staticText13;
 104.267 -    }
 104.268 -
 104.269 -    public void setStaticText13(StaticText st) {
 104.270 -        this.staticText13 = st;
 104.271 -    }
 104.272 -    private StaticText staticText14 = new StaticText();
 104.273 -
 104.274 -    public StaticText getStaticText14() {
 104.275 -        return staticText14;
 104.276 -    }
 104.277 -
 104.278 -    public void setStaticText14(StaticText st) {
 104.279 -        this.staticText14 = st;
 104.280 -    }
 104.281 -    private StaticText staticText15 = new StaticText();
 104.282 -
 104.283 -    public StaticText getStaticText15() {
 104.284 -        return staticText15;
 104.285 -    }
 104.286 -
 104.287 -    public void setStaticText15(StaticText st) {
 104.288 -        this.staticText15 = st;
 104.289 -    }
 104.290 -    private StaticText staticText16 = new StaticText();
 104.291 -
 104.292 -    public StaticText getStaticText16() {
 104.293 -        return staticText16;
 104.294 -    }
 104.295 -
 104.296 -    public void setStaticText16(StaticText st) {
 104.297 -        this.staticText16 = st;
 104.298 -    }
 104.299 -    private StaticText staticText17 = new StaticText();
 104.300 -
 104.301 -    public StaticText getStaticText17() {
 104.302 -        return staticText17;
 104.303 -    }
 104.304 -
 104.305 -    public void setStaticText17(StaticText st) {
 104.306 -        this.staticText17 = st;
 104.307 -    }
 104.308 -    private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
 104.309 -
 104.310 -    public HtmlPanelGrid getGridPanel1() {
 104.311 -        return gridPanel1;
 104.312 -    }
 104.313 -
 104.314 -    public void setGridPanel1(HtmlPanelGrid hpg) {
 104.315 -        this.gridPanel1 = hpg;
 104.316 -    }
 104.317 -    private Hyperlink hyperlink1 = new Hyperlink();
 104.318 -
 104.319 -    public Hyperlink getHyperlink1() {
 104.320 -        return hyperlink1;
 104.321 -    }
 104.322 -
 104.323 -    public void setHyperlink1(Hyperlink h) {
 104.324 -        this.hyperlink1 = h;
 104.325 -    }
 104.326 -    private Hyperlink hyperlink2 = new Hyperlink();
 104.327 -
 104.328 -    public Hyperlink getHyperlink2() {
 104.329 -        return hyperlink2;
 104.330 -    }
 104.331 -
 104.332 -    public void setHyperlink2(Hyperlink h) {
 104.333 -        this.hyperlink2 = h;
 104.334 -    }
 104.335 -    private Hyperlink hyperlink3 = new Hyperlink();
 104.336 -
 104.337 -    public Hyperlink getHyperlink3() {
 104.338 -        return hyperlink3;
 104.339 -    }
 104.340 -
 104.341 -    public void setHyperlink3(Hyperlink h) {
 104.342 -        this.hyperlink3 = h;
 104.343 -    }
 104.344 -    private Hyperlink hyperlink4 = new Hyperlink();
 104.345 -
 104.346 -    public Hyperlink getHyperlink4() {
 104.347 -        return hyperlink4;
 104.348 -    }
 104.349 -
 104.350 -    public void setHyperlink4(Hyperlink h) {
 104.351 -        this.hyperlink4 = h;
 104.352 -    }
 104.353 -    private Hyperlink hyperlink5 = new Hyperlink();
 104.354 -
 104.355 -    public Hyperlink getHyperlink5() {
 104.356 -        return hyperlink5;
 104.357 -    }
 104.358 -
 104.359 -    public void setHyperlink5(Hyperlink h) {
 104.360 -        this.hyperlink5 = h;
 104.361 -    }
 104.362 -
 104.363 -    // </editor-fold>
 104.364 -
 104.365 -    /**
 104.366 -     * <p>Construct a new Page bean instance.</p>
 104.367 -     */
 104.368 -    public ${name}() {
 104.369 -    }
 104.370 -
 104.371 -    /**
 104.372 -     * <p>Callback method that is called whenever a page is navigated to,
 104.373 -     * either directly via a URL, or indirectly via page navigation.
 104.374 -     * Customize this method to acquire resources that will be needed
 104.375 -     * for event handlers and lifecycle methods, whether or not this
 104.376 -     * page is performing post back processing.</p>
 104.377 -     * 
 104.378 -     * <p>Note that, if the current request is a postback, the property
 104.379 -     * values of the components do <strong>not</strong> represent any
 104.380 -     * values submitted with this request.  Instead, they represent the
 104.381 -     * property values that were saved for this view when it was rendered.</p>
 104.382 -     */
 104.383 -    public void init() {
 104.384 -        // Perform initializations inherited from our superclass
 104.385 -        super.init();
 104.386 -        // Perform application initialization that must complete
 104.387 -        // *before* managed components are initialized
 104.388 -        // TODO - add your own initialiation code here
 104.389 -            
 104.390 -        // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 104.391 -        // Initialize automatically managed components
 104.392 -        // *Note* - this logic should NOT be modified
 104.393 -        try {
 104.394 -            _init();
 104.395 -        } catch (Exception e) {
 104.396 -            log("Page1 Initialization Failure", e);
 104.397 -            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
 104.398 -        }
 104.399 -        
 104.400 -        // </editor-fold>
 104.401 -        // Perform application initialization that must complete
 104.402 -        // *after* managed components are initialized
 104.403 -        // TODO - add your own initialization code here
 104.404 -    }
 104.405 -
 104.406 -    /**
 104.407 -     * <p>Callback method that is called after the component tree has been
 104.408 -     * restored, but before any event processing takes place.  This method
 104.409 -     * will <strong>only</strong> be called on a postback request that
 104.410 -     * is processing a form submit.  Customize this method to allocate
 104.411 -     * resources that will be required in your event handlers.</p>
 104.412 -     */
 104.413 -    public void preprocess() {
 104.414 -    }
 104.415 -
 104.416 -    /**
 104.417 -     * <p>Callback method that is called just before rendering takes place.
 104.418 -     * This method will <strong>only</strong> be called for the page that
 104.419 -     * will actually be rendered (and not, for example, on a page that
 104.420 -     * handled a postback and then navigated to a different page).  Customize
 104.421 -     * this method to allocate resources that will be required for rendering
 104.422 -     * this page.</p>
 104.423 -     */
 104.424 -    public void prerender() {
 104.425 -    }
 104.426 -
 104.427 -    /**
 104.428 -     * <p>Callback method that is called after rendering is completed for
 104.429 -     * this request, if <code>init()</code> was called (regardless of whether
 104.430 -     * or not this was the page that was actually rendered).  Customize this
 104.431 -     * method to release resources acquired in the <code>init()</code>,
 104.432 -     * <code>preprocess()</code>, or <code>prerender()</code> methods (or
 104.433 -     * acquired during execution of an event handler).</p>
 104.434 -     */
 104.435 -    public void destroy() {
 104.436 -    }
 104.437 -
 104.438 -    /**
 104.439 -     * <p>Return a reference to the scoped data bean.</p>
 104.440 -     */
 104.441 -    protected RequestBean1 getRequestBean1() {
 104.442 -        return (RequestBean1) getBean("RequestBean1");
 104.443 -    }
 104.444 -
 104.445 -    /**
 104.446 -     * <p>Return a reference to the scoped data bean.</p>
 104.447 -     */
 104.448 -    protected SessionBean1 getSessionBean1() {
 104.449 -        return (SessionBean1) getBean("SessionBean1");
 104.450 -    }
 104.451 -
 104.452 -    /**
 104.453 -     * <p>Return a reference to the scoped data bean.</p>
 104.454 -     */
 104.455 -    protected ApplicationBean1 getApplicationBean1() {
 104.456 -        return (ApplicationBean1) getBean("ApplicationBean1");
 104.457 -    }
 104.458 -}
 104.459 -
   105.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate9.jsp.template	Wed Feb 23 20:05:40 2011 -0500
   105.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   105.3 @@ -1,58 +0,0 @@
   105.4 -<#assign pound = '#'>
   105.5 -<?xml version="1.0" encoding="${encoding}"?>
   105.6 -<!--
   105.7 -Document   : ${name}
   105.8 -Created on : ${date}, ${time}
   105.9 -Author     : ${user}
  105.10 --->
  105.11 -<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
  105.12 -    <jsp:directive.page contentType="text/html;charset=${encoding}" pageEncoding="${encoding}"/>
  105.13 -    <f:view>
  105.14 -        <webuijsf:page binding="${pound}{${folder}${name}.page1}" id="page1">
  105.15 -            <webuijsf:html binding="${pound}{${folder}${name}.html1}" id="html1">
  105.16 -                <webuijsf:head binding="${pound}{${folder}${name}.head1}" id="head1">
  105.17 -                    <webuijsf:link binding="${pound}{${folder}${name}.link1}" id="link1" url="/resources/stylesheet.css"/>
  105.18 -                    <webuijsf:link binding="${pound}{${folder}${name}.link2}" id="link2" url="/resources/layout9.css"/>
  105.19 -                </webuijsf:head>
  105.20 -                <webuijsf:body binding="${pound}{${folder}${name}.body1}" id="body1">
  105.21 -                    <div id="container">
  105.22 -                        <!-- This clearing element should immediately follow the ${pound}mainContent div in order to force the ${pound}container div to contain all child floats -->
  105.23 -                        <webuijsf:panelLayout binding="${pound}{${folder}${name}.headerPanel}" id="headerPanel" panelLayout="flow" styleClass="header">
  105.24 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText1}" escape="false" id="staticText1" text="&lt;h1&gt;Header&lt;/h1&gt;"/>
  105.25 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText16}" escape="false" id="staticText16" text="Sub Header&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  105.26 -                        </webuijsf:panelLayout>
  105.27 -                        <!-- end ${pound}container -->
  105.28 -                        <webuijsf:panelLayout binding="${pound}{${folder}${name}.leftSidebarPanel}" id="leftSidebarPanel" panelLayout="flow" styleClass="leftNavigationBar">
  105.29 -                            <h:panelGrid binding="${pound}{${folder}${name}.gridPanel1}" id="gridPanel1" style="width: 100%" styleClass="navigation">
  105.30 -                                <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink1}" id="hyperlink1" text="Hyperlink1"/>
  105.31 -                                <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink2}" id="hyperlink2" text="Hyperlink2"/>
  105.32 -                                <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink3}" id="hyperlink3" text="Hyperlink3"/>
  105.33 -                                <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink4}" id="hyperlink4" text="Hyperlink4"/>
  105.34 -                                <webuijsf:hyperlink binding="${pound}{${folder}${name}.hyperlink5}" id="hyperlink5" text="Hyperlink5"/>
  105.35 -                            </h:panelGrid>
  105.36 -                        </webuijsf:panelLayout>
  105.37 -                        <webuijsf:panelLayout binding="${pound}{${folder}${name}.rightSidebarPanel}" id="rightSidebarPanel" panelLayout="flow" styleClass="rightSidebar">
  105.38 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText6}" escape="false" id="staticText6" text="&lt;h2&gt;Right Sidebar&lt;/h2&gt;"/>
  105.39 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText7}" escape="false" id="staticText7" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  105.40 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText8}" escape="false" id="staticText8" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  105.41 -                        </webuijsf:panelLayout>
  105.42 -                        <webuijsf:panelLayout binding="${pound}{${folder}${name}.mainContentPanel}" id="mainContentPanel" panelLayout="flow" styleClass="mainContent">
  105.43 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText11}" escape="false" id="staticText11" text="&lt;h2&gt;Main Content&lt;/h2&gt;"/>
  105.44 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText12}" escape="false" id="staticText12" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien.&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  105.45 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText13}" escape="false" id="staticText13" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;"/>
  105.46 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText14}" escape="false" id="staticText14" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  105.47 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText15}" escape="false" id="staticText15" text="Donec eu mi sed turpis feugiat feugiat. Integer turpis arcu, pellentesque  eget, cursus et, fermentum ut, sapien. &${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  105.48 -                        </webuijsf:panelLayout>
  105.49 -                        <br class="clearfloat"/>
  105.50 -                        <webuijsf:panelLayout binding="${pound}{${folder}${name}.footerPanel}" id="footerPanel" panelLayout="flow" styleClass="footer">
  105.51 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText10}" escape="false" id="staticText10" text="&lt;h4&gt;Footer&lt;/h4&gt;"/>
  105.52 -                            <webuijsf:staticText binding="${pound}{${folder}${name}.staticText17}" escape="false" id="staticText17" text="Sub Footer&${pound}xa;&lt;br/&gt;&${pound}xa;&lt;br/&gt;"/>
  105.53 -                        </webuijsf:panelLayout>
  105.54 -                    </div>
  105.55 -                    <br/>
  105.56 -                    <webuijsf:form binding="${pound}{${folder}${name}.form1}" id="form1"/>
  105.57 -                </webuijsf:body>
  105.58 -            </webuijsf:html>
  105.59 -        </webuijsf:page>
  105.60 -    </f:view>
  105.61 -</jsp:root>
   106.1 --- a/visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/layer.xml	Wed Feb 23 20:05:40 2011 -0500
   106.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   106.3 @@ -1,215 +0,0 @@
   106.4 -<?xml version="1.0" encoding="UTF-8"?>
   106.5 -<!--
   106.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   106.7 -
   106.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   106.9 -
  106.10 -
  106.11 -The contents of this file are subject to the terms of either the GNU
  106.12 -General Public License Version 2 only ("GPL") or the Common
  106.13 -Development and Distribution License("CDDL") (collectively, the
  106.14 -"License"). You may not use this file except in compliance with the
  106.15 -License. You can obtain a copy of the License at
  106.16 -http://www.netbeans.org/cddl-gplv2.html
  106.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  106.18 -specific language governing permissions and limitations under the
  106.19 -License.  When distributing the software, include this License Header
  106.20 -Notice in each file and include the License file at
  106.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  106.22 -particular file as subject to the "Classpath" exception as provided
  106.23 -by Sun in the GPL Version 2 section of the License file that
  106.24 -accompanied this code. If applicable, add the following below the
  106.25 -License Header, with the fields enclosed by brackets [] replaced by
  106.26 -your own identifying information:
  106.27 -"Portions Copyrighted [year] [name of copyright owner]"
  106.28 -
  106.29 -Contributor(s):
  106.30 -
  106.31 -The Original Software is NetBeans. The Initial Developer of the Original
  106.32 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  106.33 -Microsystems, Inc. All Rights Reserved.
  106.34 -
  106.35 -If you wish your version of this file to be governed by only the CDDL
  106.36 -or only the GPL Version 2, indicate your decision by adding
  106.37 -"[Contributor] elects to include this software in this distribution
  106.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
  106.39 -single choice of license, a recipient has the option to distribute
  106.40 -your version of this file under either the CDDL, the GPL Version 2 or
  106.41 -to extend the choice of license to its licensees as provided above.
  106.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
  106.43 -Version 2 license, then the option applies only if the new code is
  106.44 -made subject to such option by the copyright holder.
  106.45 --->
  106.46 -
  106.47 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
  106.48 -<filesystem>
  106.49 -    <folder name="Templates">
  106.50 -        <folder name="PageLayoutTemplates">
  106.51 -            <file name="PageTemplate1.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate1.jsp.template">
  106.52 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
  106.53 -                <attr name="name" stringvalue="PageTemplate1" />
  106.54 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-icon.jpg" />
  106.55 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-preview.jpg" />
  106.56 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-resources.zip" />
  106.57 -                <attr name="position" intvalue="100"/>
  106.58 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
  106.59 -                <attr name="description" stringvalue="PageTemplate1_Desciption"/>
  106.60 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
  106.61 -            </file>
  106.62 -            <file name="PageTemplate1.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate1.java.template">
  106.63 -                <attr name="position" intvalue="200"/>
  106.64 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
  106.65 -            </file>
  106.66 -            <file name="PageTemplate2.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate2.jsp.template">
  106.67 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
  106.68 -                <attr name="name" stringvalue="PageTemplate2" />
  106.69 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-icon.jpg" />
  106.70 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-preview.jpg" />
  106.71 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-resources.zip" />
  106.72 -                <attr name="position" intvalue="300"/>
  106.73 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
  106.74 -                <attr name="description" stringvalue="PageTemplate2_Desciption"/>
  106.75 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
  106.76 -            </file>
  106.77 -            <file name="PageTemplate2.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate2.java.template">
  106.78 -                <attr name="position" intvalue="400"/>
  106.79 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
  106.80 -            </file>
  106.81 -            <file name="PageTemplate3.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate3.jsp.template">
  106.82 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
  106.83 -                <attr name="name" stringvalue="PageTemplate3" />
  106.84 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-icon.jpg" />
  106.85 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-preview.jpg" />
  106.86 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-resources.zip" />
  106.87 -                <attr name="position" intvalue="500"/>
  106.88 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
  106.89 -                <attr name="description" stringvalue="PageTemplate3_Desciption"/>
  106.90 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
  106.91 -            </file>
  106.92 -            <file name="PageTemplate3.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate3.java.template">
  106.93 -                <attr name="position" intvalue="600"/>
  106.94 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
  106.95 -            </file>
  106.96 -            <file name="PageTemplate4.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate4.jsp.template">
  106.97 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
  106.98 -                <attr name="name" stringvalue="PageTemplate4" />
  106.99 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-icon.jpg" />
 106.100 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-preview.jpg" />
 106.101 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-resources.zip" />
 106.102 -                <attr name="position" intvalue="700"/>
 106.103 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
 106.104 -                <attr name="description" stringvalue="PageTemplate4_Desciption"/>
 106.105 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.106 -            </file>
 106.107 -            <file name="PageTemplate4.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate4.java.template">
 106.108 -                <attr name="position" intvalue="800"/>
 106.109 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.110 -            </file>
 106.111 -            <file name="PageTemplate5.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate5.jsp.template">
 106.112 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
 106.113 -                <attr name="name" stringvalue="PageTemplate5" />
 106.114 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-icon.jpg" />
 106.115 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-preview.jpg" />
 106.116 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-resources.zip" />
 106.117 -                <attr name="position" intvalue="900"/>
 106.118 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
 106.119 -                <attr name="description" stringvalue="PageTemplate5_Desciption"/>
 106.120 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.121 -            </file>
 106.122 -            <file name="PageTemplate5.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate5.java.template">
 106.123 -                <attr name="position" intvalue="1000"/>
 106.124 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.125 -            </file>
 106.126 -            <file name="PageTemplate6.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate6.jsp.template">
 106.127 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
 106.128 -                <attr name="name" stringvalue="PageTemplate6" />
 106.129 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-icon.jpg" />
 106.130 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-preview.jpg" />
 106.131 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-resources.zip" />
 106.132 -                <attr name="position" intvalue="1100"/>
 106.133 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
 106.134 -                <attr name="description" stringvalue="PageTemplate6_Desciption"/>
 106.135 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.136 -            </file>
 106.137 -            <file name="PageTemplate6.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate6.java.template">
 106.138 -                <attr name="position" intvalue="1200"/>
 106.139 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.140 -            </file>       
 106.141 -            <file name="PageTemplate7.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate7.jsp.template">
 106.142 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
 106.143 -                <attr name="name" stringvalue="PageTemplate7" />
 106.144 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-icon.jpg" />
 106.145 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-preview.jpg" />
 106.146 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-resources.zip" />
 106.147 -                <attr name="position" intvalue="1300"/>
 106.148 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
 106.149 -                <attr name="description" stringvalue="PageTemplate7_Desciption"/>
 106.150 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.151 -            </file>
 106.152 -            <file name="PageTemplate7.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate7.java.template">
 106.153 -                <attr name="position" intvalue="1400"/>
 106.154 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.155 -            </file>
 106.156 -            <file name="PageTemplate8.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate8.jsp.template">
 106.157 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
 106.158 -                <attr name="name" stringvalue="PageTemplate8" />
 106.159 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-icon.jpg" />
 106.160 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-preview.jpg" />
 106.161 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-resources.zip" />
 106.162 -                <attr name="position" intvalue="1500"/>
 106.163 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
 106.164 -                <attr name="description" stringvalue="PageTemplate8_Desciption"/>
 106.165 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.166 -            </file>
 106.167 -            <file name="PageTemplate8.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate8.java.template">
 106.168 -                <attr name="position" intvalue="1600"/>
 106.169 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.170 -            </file>
 106.171 -            <file name="PageTemplate9.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate9.jsp.template">
 106.172 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
 106.173 -                <attr name="name" stringvalue="PageTemplate9" />
 106.174 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-icon.jpg" />
 106.175 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-preview.jpg" />
 106.176 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-resources.zip" />
 106.177 -                <attr name="position" intvalue="1700"/>
 106.178 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
 106.179 -                <attr name="description" stringvalue="PageTemplate9_Desciption"/>
 106.180 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.181 -            </file>
 106.182 -            <file name="PageTemplate9.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate9.java.template">
 106.183 -                <attr name="position" intvalue="1800"/>
 106.184 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.185 -            </file>
 106.186 -            <file name="PageTemplate10.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate10.jsp.template">
 106.187 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
 106.188 -                <attr name="name" stringvalue="PageTemplate10" />
 106.189 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-icon.jpg" />
 106.190 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-preview.jpg" />
 106.191 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-resources.zip" />
 106.192 -                <attr name="position" intvalue="1900"/>
 106.193 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
 106.194 -                <attr name="description" stringvalue="PageTemplate10_Desciption"/>
 106.195 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.196 -            </file>
 106.197 -            <file name="PageTemplate10.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate10.java.template">
 106.198 -                <attr name="position" intvalue="2000"/>
 106.199 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.200 -            </file>
 106.201 -            <file name="PageTemplate11.jsp" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate11.jsp.template">
 106.202 -                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.visualweb.woodstock.pagetemplates.Bundle"/>
 106.203 -                <attr name="name" stringvalue="PageTemplate11" />
 106.204 -                <attr name="icon" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-icon.jpg" />
 106.205 -                <attr name="previewImage" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-preview.jpg" />
 106.206 -                <attr name="resources" urlvalue="nbresloc:/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-resources.zip" />
 106.207 -                <attr name="position" intvalue="2100"/>
 106.208 -                <attr name="pageLayoutTemplate" boolvalue="true"/>
 106.209 -                <attr name="description" stringvalue="PageTemplate11_Desciption"/>
 106.210 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.211 -            </file>
 106.212 -            <file name="PageTemplate11.java" url="/org/netbeans/modules/visualweb/woodstock/pagetemplates/PageTemplate11.java.template">
 106.213 -                <attr name="position" intvalue="2200"/>
 106.214 -                <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
 106.215 -            </file>
 106.216 -        </folder> <!-- Page Templates -->
 106.217 -    </folder> <!-- Templates -->
 106.218 -</filesystem>
   107.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-icon.jpg has changed
   108.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-preview.jpg has changed
   109.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate1-resources.zip has changed
   110.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-icon.jpg has changed
   111.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-preview.jpg has changed
   112.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate10-resources.zip has changed
   113.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-icon.jpg has changed
   114.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-preview.jpg has changed
   115.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate11-resources.zip has changed
   116.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-icon.jpg has changed
   117.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-preview.jpg has changed
   118.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate2-resources.zip has changed
   119.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-icon.jpg has changed
   120.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-preview.jpg has changed
   121.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate3-resources.zip has changed
   122.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-icon.jpg has changed
   123.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-preview.jpg has changed
   124.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate4-resources.zip has changed
   125.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-icon.jpg has changed
   126.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-preview.jpg has changed
   127.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate5-resources.zip has changed
   128.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-icon.jpg has changed
   129.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-preview.jpg has changed
   130.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate6-resources.zip has changed
   131.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-icon.jpg has changed
   132.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-preview.jpg has changed
   133.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate7-resources.zip has changed
   134.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-icon.jpg has changed
   135.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-preview.jpg has changed
   136.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate8-resources.zip has changed
   137.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-icon.jpg has changed
   138.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-preview.jpg has changed
   139.1 Binary file visualweb.woodstock.pagetemplates/src/org/netbeans/modules/visualweb/woodstock/pagetemplates/resources/PageTemplate9-resources.zip has changed