[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slide-dev
Subject:    cvs commit: jakarta-slide/web/taglib-examples/WEB-INF web.xml
From:       cmlenz () apache ! org
Date:       2002-03-22 13:42:15
[Download RAW message or body]

cmlenz      02/03/22 05:42:15

  Modified:    .        build.xml
               web/taglib-examples index.html
               web/taglib-examples/WEB-INF web.xml
  Added:       web/taglib-examples struts_node_example.jsp
  Log:
  Added example to demonstrate usage for the <slide:node> in tag in the
  Struts-based tag library.
  
  Revision  Changes    Path
  1.158     +2 -2      jakarta-slide/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/build.xml,v
  retrieving revision 1.157
  retrieving revision 1.158
  diff -u -r1.157 -r1.158
  --- build.xml	21 Mar 2002 17:53:06 -0000	1.157
  +++ build.xml	22 Mar 2002 13:42:15 -0000	1.158
  @@ -1199,7 +1199,7 @@
       <copy file="src/taglib/slide-struts.tld"
        todir="${slide.build}/webapps/slide-taglib-examples/WEB-INF"/>
       <copy todir="${slide.build}/webapps/slide-taglib-examples/WEB-INF">
  -      <fileset dir="${struts.home}/lib">
  +      <fileset dir="${struts.lib}">
           <include name="struts-bean.tld"/>
           <include name="struts-html.tld"/>
           <include name="struts-logic.tld"/>
  @@ -1212,7 +1212,7 @@
     <target name="taglib-examples-dist"
      depends="taglib-examples-dist-jstl-prepare,taglib-examples-dist-struts-prepare"
      description="Build the Tag Libraries Examples Webapp">
  -    <echo message="Building Tag Libraries Examples Webapp..." />
  +    <echo message="Building Tag Libraries Examples Webapp...">
       <jar jarfile="${webapp.dist}/slide-taglib-examples.war"
            basedir="${slide.build}/webapps/slide-taglib-examples">
       </jar>
  
  
  
  1.3       +13 -1     jakarta-slide/web/taglib-examples/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/web/taglib-examples/index.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.html	17 Mar 2002 19:47:17 -0000	1.2
  +++ index.html	22 Mar 2002 13:42:15 -0000	1.3
  @@ -54,9 +54,21 @@
           <td>
             <blockquote>
               <p>
  -              <i>to be written</i>
  +              The Slide tag library based on 
  +              <a href="http://jakarta.apache.org/struts/">Apache Struts</a> is 
  +              intended to integrate well with the fundamental tags as well as 
  +              the application framework provided by Struts. As such, it works 
  +              on servlet containers that only implement version 1.2 of the JSP 
  +              specification.
               </p>
             </blockquote>
  +          <ul>
  +            <li>
  +              <code><b>&lt;slide:node&gt;</b></code>: Accessing nodes in a \
namespace  +              <a href='struts_node01_example.jsp'><img \
src='images/execute.gif' alt='Execute' border='0'></a>&nbsp;  +              <a \
href='struts_node01_example.txt'><img src='images/code.gif' alt='Show Source' \
border='0'></a>  +            </li>
  +          </ul>
           </td>
         </tr>
         <tr>
  
  
  
  1.1                  jakarta-slide/web/taglib-examples/struts_node_example.jsp
  
  Index: struts_node_example.jsp
  ===================================================================
  <%@ taglib prefix='bean'  uri='/WEB-INF/struts-bean.tld' %>
  <%@ taglib prefix='logic' uri='/WEB-INF/struts-logic.tld' %>
  <%@ taglib prefix='slide' uri='/WEB-INF/slide-struts.tld' %>
  
  <html>
    <head>
      <title>Slide/Struts Tag Library Example</title>
    </head>
    <body>
      <h1>Slide/Struts Tag Library Example</h1>
      <p>
        This example uses the &lt;slide:node&gt;-tag to locate a node in the 
        default namespace in three ways:
        </ul>
          <li>
            By explicitly specifying the 'uri' attribute with a literal string.
          </li>
          <li>
            By specifying the 'uri' attribute with a runtime expression.
          </li>
          <li>
            Using bean lookup, by specifying the name of the page context 
            attribute containing the URI.
          </li>
        </ul>
      </p>
      <hr>
      <h2>The 'uri' attribute as literal string</h2>
      <slide:node id='node' uri='/users/john'>
        <ul>
          <li>Name: <bean:write name='node' property='name'/></li>
          <li>Uri: <bean:write name='node' property='uri'/></li>
          <li>hasRevisions: <bean:write name='node' property='hasRevisions'/></li>
          <li>isVersioned: <bean:write name='node' property='isVersioned'/></li>
        </ul>
      </slide:node>
      <hr>
      <h2>The 'uri' attribute as runtime expression</h2>
      <% String myUri = "/users/john"; %>
      <slide:node id='node' uri='<%= myUri %>'>
        <ul>
          <li>Name: <bean:write name='node' property='name'/></li>
          <li>Uri: <bean:write name='node' property='uri'/></li>
          <li>hasRevisions: <bean:write name='node' property='hasRevisions'/></li>
          <li>isVersioned: <bean:write name='node' property='isVersioned'/></li>
        </ul>
      </slide:node>
      <hr>
      <h2>The 'uri' attribute specified by bean lookup</h2>
      <% pageContext.setAttribute("myBean", myUri); %>
      <slide:node id='node' uriName='myBean'>
        <ul>
          <li>Name: <bean:write name='node' property='name'/></li>
          <li>Uri: <bean:write name='node' property='uri'/></li>
          <li>hasRevisions: <bean:write name='node' property='hasRevisions'/></li>
          <li>isVersioned: <bean:write name='node' property='isVersioned'/></li>
        </ul>
      </slide:node>
      <br><hr>
      <center><a href="index.html"><img src="images/return.gif" alt="Return" \
border="0"></a></center>  </body>
  </html>
  
  
  
  1.3       +20 -0     jakarta-slide/web/taglib-examples/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/web/taglib-examples/WEB-INF/web.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- web.xml	24 Feb 2002 14:19:25 -0000	1.2
  +++ web.xml	22 Mar 2002 13:42:15 -0000	1.3
  @@ -23,6 +23,26 @@
       <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>
     
  +  <!-- Slide Tag Library Descriptor -->
  +  <taglib>
  +    <taglib-uri>/WEB-INF/slide-struts.tld</taglib-uri>
  +    <taglib-location>/WEB-INF/slide-struts.tld</taglib-location>
  +  </taglib>
  +  
  +  <!-- Struts Tag Library Descriptors -->
  +  <taglib>
  +    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
  +    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  +  </taglib>
  +  <taglib>
  +    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
  +    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  +  </taglib>
  +  <taglib>
  +    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
  +    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  +  </taglib>
  +  
     <!-- Security Contraints -->
     <security-constraint>
       <web-resource-collection>
  
  
  

--
To unsubscribe, e-mail:   <mailto:slide-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:slide-dev-help@jakarta.apache.org>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic