dlestrat    2005/03/07 20:28:00

  Modified:    applications/pam project.xml locator.ent
  Added:       applications/jsf-demo-myfaces/src/webapp/WEB-INF portlet.xml
                        faces-config.xml web.xml
               applications/jsf-demo-myfaces/src/webapp wave.med.gif
                        response.jsp index.jsp greeting.jsp
               applications/jsf-demo-myfaces/xdocs index.xml navigation.xml
               applications/jsf-demo-myfaces/src/webapp/images
                        sw_med_rond.gif
  Log:
  Update myfaces dependencies to 1.0.9.
  Move JSF bridge.
  Add documentation.
  
  Revision  Changes    Path
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/src/webapp/WEB-INF/portlet.xml
  
  Index: portlet.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  
  -->
  
  <portlet-app id="jsf-demo-myfaces" version="1.0">
        
      <portlet id="guessNumberMyFaces">
          <init-param>
                        <name>default-view</name>
                        <value>/greeting.jsp</value>
            </init-param>
            <description>JSF GuessNumber Portlet - MyFaces Built-In Portlet 
Support</description>
          <portlet-name>guessNumberMyFaces</portlet-name>
          <display-name>JSF GuessNumber Portlet - MyFaces Built-In Portlet 
Support</display-name>
          
<portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
  
          <supports>
              <mime-type>text/html</mime-type>
              <portlet-mode>VIEW</portlet-mode>
              <portlet-mode>EDIT</portlet-mode>
              <portlet-mode>HELP</portlet-mode>
          </supports>
  
          <portlet-info>
              <title>GuessNumber - MyFaces Built-In Portlet Support</title>
              <short-title>guessNumberMyFaces</short-title>
          </portlet-info>
      </portlet>
                
  </portlet-app>
  
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/src/webapp/WEB-INF/faces-config.xml
  
  Index: faces-config.xml
  ===================================================================
  <?xml version='1.0' encoding='UTF-8'?>
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  
  -->
  
  <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd";>
  
  <faces-config>
  
    <application>
      <locale-config>
        <default-locale>en</default-locale>
        <supported-locale>de</supported-locale>
        <supported-locale>fr</supported-locale>
        <supported-locale>es</supported-locale>
      </locale-config>
    </application>
  
    <navigation-rule>
      <description>
          The decision rule used by the NavigationHandler to
          determine which view must be displayed after the
          current view, greeting.jsp is processed.
      </description>
      <from-view-id>/greeting.jsp</from-view-id>
      <navigation-case>
          <description>
              Indicates to the NavigationHandler that the response.jsp
              view must be displayed if the Action referenced by a 
              UICommand component on the greeting.jsp view returns 
              the outcome "success".
          </description>
        <from-outcome>success</from-outcome>
        <to-view-id>/response.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    
    <navigation-rule>
     <description>
          The decision rules used by the NavigationHandler to
          determine which view must be displayed after the
          current view, response.jsp is processed.
      </description>
      <from-view-id>/response.jsp</from-view-id>
      <navigation-case>
          <description>
              Indicates to the NavigationHandler that the greeting.jsp
              view must be displayed if the Action referenced by a 
              UICommand component on the response.jsp view returns 
              the outcome "success".
          </description>
          <from-outcome>success</from-outcome>
        <to-view-id>/greeting.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
  
    <managed-bean>
      <description>
        The "backing file" bean that backs up the guessNumber webapp
      </description>
      <managed-bean-name>UserNumberBean</managed-bean-name>
      <managed-bean-class>guessNumber.UserNumberBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
        <property-name>minimum</property-name>
        <property-class>int</property-class>
        <value>0</value>
      </managed-property>
      <managed-property>
        <property-name>maximum</property-name>
        <property-class>int</property-class>
        <value>10</value>
      </managed-property>
  
    </managed-bean>
  
  </faces-config>
  
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/src/webapp/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--
   Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
   
   Redistribution and use in source and binary forms, with or
   without modification, are permitted provided that the following
   conditions are met:
   
   - Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
   
   - Redistribution in binary form must reproduce the above
     copyright notice, this list of conditions and the following
     disclaimer in the documentation and/or other materials
     provided with the distribution.
      
   Neither the name of Sun Microsystems, Inc. or the names of
   contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.
    
   This software is provided "AS IS," without a warranty of any
   kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
   WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
   EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
   DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
   RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
   ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
   FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
   SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
   CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
   THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
   BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    
   You acknowledge that this software is not designed, licensed or
   intended for use in the design, construction, operation or
   maintenance of any nuclear facility.
  -->
  <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
  
  <web-app>
        <display-name>JavaServer Faces Guess Number Sample 
Application</display-name>
        <description>JavaServer Faces Guess Number Sample 
Application</description>
        <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
        </context-param>
        <context-param>
        <param-name>javax.faces.application.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>
        <context-param>
          <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
          <param-value>true</param-value>
          <description>
              This parameter tells MyFaces if javascript code should be allowed 
in the
              rendered HTML output.
              If javascript is allowed, command_link anchors will have 
javascript code
              that submits the corresponding form.
              If javascript is not allowed, the state saving info and nested 
parameters
              will be added as url parameters.
              Default: "true"
          </description>
      </context-param>
      
      <context-param>
          <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
          <param-value>false</param-value>
          <description>
              This parameter tells MyFaces if javascript code should be allowed 
in the
              rendered HTML output.
              If javascript is allowed, command_link anchors will have 
javascript code
              that submits the corresponding form.
              If javascript is not allowed, the state saving info and nested 
parameters
              will be added as url parameters.
              Default: "false"
  
              Setting this param to true should be combined with 
STATE_SAVING_METHOD "server" for
              best results.
  
              This is an EXPERIMENTAL feature. You also have to enable the 
detector filter/filter mapping below to get
              JavaScript detection working.
          </description>
      </context-param>
  
      <context-param>
          <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
          <param-value>true</param-value>
          <description>
              If true, rendered HTML code will be formatted, so that it is 
"human readable".
              i.e. additional line separators and whitespace will be written, 
that do not
              influence the HTML code.
              Default: "true"
          </description>
      </context-param>
  
      <context-param>
          <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
          <param-value>true</param-value>
          <description>
              If true, a javascript function will be rendered that is able to 
restore the
              former vertical scroll on every request. Convenient feature if 
you have pages
              with long lists and you do not want the browser page to always 
jump to the top
              if you trigger a link or button action that stays on the same 
page.
              Default: "false"
          </description>
      </context-param>
  
      <!-- Extensions Filter -->
      <filter>
          <filter-name>extensionsFilter</filter-name>
          
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
          <init-param>
              <param-name>uploadMaxFileSize</param-name>
              <param-value>100m</param-value>
              <description>Set the size limit for uploaded files.
                  Format: 10 - 10 bytes
                          10k - 10 KB
                          10m - 10 MB
                          1g - 1 GB
              </description>
          </init-param>
          <init-param>
              <param-name>uploadThresholdSize</param-name>
              <param-value>100k</param-value>
              <description>Set the threshold size - files
                      below this limit are stored in memory, files above
                      this limit are stored on disk.
  
                  Format: 10 - 10 bytes
                          10k - 10 KB
                          10m - 10 MB
                          1g - 1 GB
              </description>
          </init-param>
        </filter>
  
      <!-- Filter Mappings -->
      <filter-mapping>
          <filter-name>extensionsFilter</filter-name>
          <url-pattern>*.jsf</url-pattern>
      </filter-mapping>
      <filter-mapping>
          <filter-name>extensionsFilter</filter-name>
          <url-pattern>/faces/*</url-pattern>
      </filter-mapping>
    
        <!-- Listener, that does all the startup work (configuration, init). -->
        <listener>
        
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
        </listener>
    
        <!-- Faces Servlet -->
        <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
        </servlet>
        <!-- extension mapping -->
        <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
  
  </web-app>
  
  
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/src/webapp/wave.med.gif
  
        <<Binary file>>
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/src/webapp/response.jsp
  
  Index: response.jsp
  ===================================================================
  <%--

  Copyright 2004 The Apache Software Foundation

  

  Licensed under the Apache License, Version 2.0 (the "License");

  you may not use this file except in compliance with the License.

  You may obtain a copy of the License at

  

      http://www.apache.org/licenses/LICENSE-2.0

  

  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

  --%>

  

  <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>

  <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>

  <f:view>

  <h:form id="responseForm" >

      <h:graphicImage id="waveImg" url="/wave.med.gif" />

      <h2><h:outputText id="result" 

                        value="#{UserNumberBean.response}"/></h2>   

      <h:commandButton id="back" value="Back" action="success"/><p>

  

  </h:form>

  </f:view>

  
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/src/webapp/index.jsp
  
  Index: index.jsp
  ===================================================================
  <!doctype html public "-//w3c//dtd html 4.0 transitional//en">

  <%--

  Copyright 2004 The Apache Software Foundation

  

  Licensed under the Apache License, Version 2.0 (the "License");

  you may not use this file except in compliance with the License.

  You may obtain a copy of the License at

  

      http://www.apache.org/licenses/LICENSE-2.0

  

  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

  --%>

  

  <!--  

  

  This page allows the user to go to the context-path and get redirected

  to the front page of the app.  For example,

  http://localhost:8080/jsf-carstore/.  Note that we use "*.jsf" as the

  page mapping.  Doing so allows us to just name our pages as "*.jsp",

  refer to them as "*.jsf" and know that they will be properly picked up

  by the container.

  

  -->

  

  <jsp:forward page="greeting.jsp" />

  
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/src/webapp/greeting.jsp
  
  Index: greeting.jsp
  ===================================================================
  <%--

  Copyright 2004 The Apache Software Foundation

  

  Licensed under the Apache License, Version 2.0 (the "License");

  you may not use this file except in compliance with the License.

  You may obtain a copy of the License at

  

      http://www.apache.org/licenses/LICENSE-2.0

  

  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

  --%>

  

  <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>

  <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>

  <f:view>

      <h:form id="helloForm" >

      <h2>Hi. My name is Duke.  I'm thinking of a number from

      <h:outputText value="#{UserNumberBean.minimum}"/> to

      <h:outputText value="#{UserNumberBean.maximum}"/>.  Can you guess

      it?</h2>

  

      <h:graphicImage id="waveImg" url="/wave.med.gif" />

        <h:inputText id="userNo" value="#{UserNumberBean.userNumber}"

                        validator="#{UserNumberBean.validate}"/>          

       <h:commandButton id="submit" action="success" value="Submit" />

           <p>

       <h:message style="color: red; font-family: 'New Century Schoolbook', 
serif; font-style: oblique; text-decoration: overline" id="errors1" 
for="userNo"/>

  

      </h:form>

      

  </f:view>  

  
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
  <document>
    <properties>
      <title>Jetspeed MyFaces Demo Portlet Configuration</title>
      <subtitle>MyFaces Demo Portlet Configuration - Built-In Portlet 
Support</subtitle>
      <authors>
        <person name="David Le Strat" email="[EMAIL PROTECTED]"/>
      </authors>
    </properties>
    <body>
    
  <section name="Introduction">
  <p>
  Jetspeed MyFaces Demo Portlet leverages Sun's Guess Number reference example 
implementation sample application to
  illustrate how a MyFaces based portlet using Jetspeed 2 JSF bridge should be 
configured.
  </p>
  <p>
  Jetspeed 2 provides a JSF bridge implementation to support JSF with the 
Portlet Specifications.  This section describes
  the necessary configuration required in order to use Jetspeed 2 JSF bridge.
  </p>
  </section>
  <section name="Configuration MyFaces as a Portlet">
  <p>
  The modifications required in order to deploy a MyFaces application as a 
portlet need to be made to the
  <i>portlet.xml</i> file. An <i>&lt;init-param&gt;</i> should be added to the 
<i>portlet.xml</i> as described below:
  <source><![CDATA[
  <init-param>
      <name>ViewPage</name>
      <value>/greeting.jsp</value>
  </init-param>]]>
  </source>
  </p>
  <p>
  The parameter <i>ViewPage</i> indicates to the 
<i>org.apache.portals.bridges.jsf.FacesPortlet</i> which view
  should be used as a default view.
  </p>
  <p>
  Additionally, the &lt;portlet-class&gt; element should specify the MyFaces 
generic portlet implementation as described
  below:
  <source>
  
<![CDATA[<portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-class>]]>
  </source>
  </p>
  <p>
  This final <i>portlet.xml</i> should look like:
  <source><![CDATA[
  <portlet id="guessNumber">
          <init-param>
              <name>ViewPage</name>
              <value>/greeting.jsp</value>
          </init-param>
          <description>JSF GuessNumber Portlet - Using J2 JSF 
Bridge</description>
          <portlet-name>guessNumber</portlet-name>
          <display-name>JSF GuessNumber Portlet - J2 JSF Bridge</display-name>
          
<portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-class>
  
          <supports>
              <mime-type>text/html</mime-type>
              <portlet-mode>VIEW</portlet-mode>
              <portlet-mode>EDIT</portlet-mode>
              <portlet-mode>HELP</portlet-mode>
          </supports>
  
          <portlet-info>
              <title>GuessNumber Portlet</title>
              <short-title>guessNumber</short-title>
          </portlet-info>
  </portlet>]]>
  </source>
  </p>
  </section>
  
    </body>
  </document>
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
  <project>
    <body>
        <links>
          <item name="Jetspeed 2" href="../../index.html"/>
          
        </links>
    </body>
  </project>
  
  
  
  1.1                  
jakarta-jetspeed-2/applications/jsf-demo-myfaces/src/webapp/images/sw_med_rond.gif
  
        <<Binary file>>
  
  
  1.29      +1 -9      jakarta-jetspeed-2/applications/pam/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/pam/project.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- project.xml       25 Jan 2005 23:54:05 -0000      1.28
  +++ project.xml       8 Mar 2005 04:28:00 -0000       1.29
  @@ -142,7 +142,7 @@
           
           &myfaces-deps;
           
  -        &myfaces-bridge-deps;
  +        &jsf-bridge-deps;
           
           <dependency>
               <groupId>commons-el</groupId>
  @@ -208,14 +208,6 @@
           <war.bundle>true</war.bundle>
         </properties>
       </dependency>
  -    <dependency>     
  -      <groupId>portals-bridges</groupId>
  -      <artifactId>portals-bridges-myfaces</artifactId>
  -      <version>0.1</version>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>    
   
       <dependency>
         <id>velocity</id>
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/applications/pam/locator.ent
  
  Index: locator.ent
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/pam/locator.ent,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- locator.ent       17 Nov 2004 01:06:43 -0000      1.1
  +++ locator.ent       8 Mar 2005 04:28:00 -0000       1.2
  @@ -1,6 +1,6 @@
   <!-- Project dependencies -->
   <!ENTITY myfaces-deps SYSTEM 
"file:../../etc/project-dependencies/myfaces-deps.xml">
  -<!ENTITY myfaces-bridge-deps SYSTEM 
"file:../../etc/project-dependencies/myfaces-bridge-deps.xml">
  +<!ENTITY jsf-bridge-deps SYSTEM 
"file:../../etc/project-dependencies/jsf-bridge-deps.xml">
   
   <!-- Project reports -->
   <!ENTITY j2-reports SYSTEM "file:../../etc/project-reports/j2-reports.xml">
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to