dlestrat    2004/09/11 11:41:27

  Modified:    applications/jsf-demo/src/webapp index.jsp response.jsp
                        greeting.jsp
  Added:       applications/jsf-demo/src/webapp tree.jsp
  Log:
  MyFaces bridge fixes to support MyFaces 1.0.6.  Also start work on adding
  an example for MyFaces tree component.  The tree component is not currently 
displaying.  Ideas why are
  welcome.
  Default dependencies remains at 1.0.7
  
  Revision  Changes    Path
  1.4       +0 -6      jakarta-jetspeed-2/applications/jsf-demo/src/webapp/index.jsp
  
  Index: index.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/jsf-demo/src/webapp/index.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.jsp 1 Sep 2004 22:21:59 -0000       1.3
  +++ index.jsp 11 Sep 2004 18:41:27 -0000      1.4
  @@ -14,10 +14,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
   --%>
  -<html>
  -<head>
  -</head>
  -<body>
   
   <!--  
   
  @@ -31,5 +27,3 @@
   -->
   
   <jsp:forward page="greeting.jsp" />
  -</body>
  -</html>
  
  
  
  1.5       +7 -7      jakarta-jetspeed-2/applications/jsf-demo/src/webapp/response.jsp
  
  Index: response.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/applications/jsf-demo/src/webapp/response.jsp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- response.jsp      9 Sep 2004 21:54:09 -0000       1.4
  +++ response.jsp      11 Sep 2004 18:41:27 -0000      1.5
  @@ -14,14 +14,14 @@
   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" />
  +<%@ 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>
  +</h:form>
  +</f:view>
  
  
  
  1.4       +16 -14    jakarta-jetspeed-2/applications/jsf-demo/src/webapp/greeting.jsp
  
  Index: greeting.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/applications/jsf-demo/src/webapp/greeting.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- greeting.jsp      1 Sep 2004 22:21:59 -0000       1.3
  +++ greeting.jsp      11 Sep 2004 18:41:27 -0000      1.4
  @@ -14,19 +14,16 @@
   limitations under the License.
   --%>
   
  -<HTML>
  -    <HEAD> <title>Hello</title> </HEAD>
  -    <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
  -    <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
  -    <body bgcolor="white">
  -    <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>
  +<%@ 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: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" />
  @@ -34,5 +31,10 @@
         <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>
  -</HTML>  
  +    
  +    <h2>Wanna see a tree?</h2>
  +     <br>
  +     <h:commandLink id="treeLink" action="treeView">
  +             <h:outputText value="Click Here"/>
  +     </h:commandLink>
  +</f:view>  
  \ No newline at end of file
  
  
  
  1.1                  jakarta-jetspeed-2/applications/jsf-demo/src/webapp/tree.jsp
  
  Index: tree.jsp
  ===================================================================
  <%@ page import="net.sourceforge.myfaces.custom.tree.DefaultMutableTreeNode,

                   net.sourceforge.myfaces.custom.tree.model.DefaultTreeModel"%>

  <%@ page session="true" contentType="text/html;charset=utf-8"%>

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

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

  <%@ taglib uri="http://myfaces.sourceforge.net/tld/myfaces_ext_0_9.tld"; prefix="x"%>

  

  <!--

  /*

   * 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.

   */

  //-->

  

  <%

     if (pageContext.getAttribute("treeModel", PageContext.SESSION_SCOPE) == null) {

        DefaultMutableTreeNode root = new DefaultMutableTreeNode("XY");

        DefaultMutableTreeNode a = new DefaultMutableTreeNode("A");

        root.insert(a);

        DefaultMutableTreeNode b = new DefaultMutableTreeNode("B");

        root.insert(b);

        DefaultMutableTreeNode c = new DefaultMutableTreeNode("C");

        root.insert(c);

  

        DefaultMutableTreeNode node = new DefaultMutableTreeNode("a1");

        a.insert(node);

        node = new DefaultMutableTreeNode("a2 ");

        a.insert(node);

        node = new DefaultMutableTreeNode("b ");

        b.insert(node);

  

        a = node;

        node = new DefaultMutableTreeNode("x1");

        a.insert(node);

        node = new DefaultMutableTreeNode("x2");

        a.insert(node);

  

        pageContext.setAttribute("treeModel", new DefaultTreeModel(root), 
PageContext.SESSION_SCOPE);

     }

  %>

  

  <f:view>

  

          <f:facet name="body">

              <h2>Here is a tree?</h2>

              

              <h:panelGroup id="body">

  

                  <x:tree id="tree" value="#{treeModel}"

                          styleClass="tree"

                          nodeClass="treenode"

                          selectedNodeClass="treenodeSelected"

                          expandRoot="true">

                  </x:tree>

                  <f:verbatim><br></f:verbatim>

  

              </h:panelGroup>

          </f:facet>

  

  </f:view>

  
  
  

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

Reply via email to