struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject cvs commit: jakarta-struts/web/exercise-taglib bean-write-2.jsp index.jsp bean-write.jsp
Date Thu, 01 Jan 2004 15:45:53 GMT
husted      2004/01/01 07:45:53

  Modified:    web/exercise-taglib index.jsp bean-write.jsp
  Added:       web/exercise-taglib bean-write-2.jsp
  Log:
  Add test for date format pattern; move test 7 to own page.
  
  Revision  Changes    Path
  1.6       +1 -0      jakarta-struts/web/exercise-taglib/index.jsp
  
  Index: index.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/exercise-taglib/index.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- index.jsp	9 Jun 2003 01:51:48 -0000	1.5
  +++ index.jsp	1 Jan 2004 15:45:53 -0000	1.6
  @@ -18,6 +18,7 @@
   <li><a href="bean-resource.jsp">&lt;bean:resource&gt;</a></li>
   <li><a href="bean-size.jsp">&lt;bean:size&gt;</a></li>
   <li><a href="bean-write.jsp">&lt;bean:write&gt;</a></li>
  +<li><a href="bean-write-2.jsp">&lt;bean:write&gt; 2</a></li>
   </ul>
   
   <h3>HTML Tags</h3>
  
  
  
  1.5       +0 -53     jakarta-struts/web/exercise-taglib/bean-write.jsp
  
  Index: bean-write.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/exercise-taglib/bean-write.jsp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- bean-write.jsp	1 Jan 2004 13:47:26 -0000	1.4
  +++ bean-write.jsp	1 Jan 2004 15:45:53 -0000	1.5
  @@ -219,59 +219,6 @@
   <% } %>
   </table>
   
  -<h3>Test 7 - Localized number display</h3>
  -
  -<%
  -  pageContext.setAttribute("test7.value", new Double(1234567.89));
  -%>
  -
  -<table border="0">
  -<tr>
  -<td>
  -
  -<table border="1">
  - <tr>
  -   <th>Language</th>
  -   <th>Expected format</th>
  -  </tr>
  -  <tr>
  -    <td>de <bean:message key="locale.de"/></td>
  -    <td>1.234.567,89</td>
  -   </tr>
  -   <tr>
  -    <td>en <bean:message key="locale.en"/></td>
  -    <td>1,234,567.89</td>
  -   </tr>
  -  <tr>
  -    <td>fr <bean:message key="locale.fr"/></td>
  -    <td>1 234 567,89</td>
  -  </tr>
  -</table>
  -</td>
  -<td>
  -<table border="1">
  -<tr>
  -  <th>Default format</td>
  -  <th>Using Format Attribute</th>
  -  <th>Using Format Key</th>
  -</tr>
  -  <tr>
  -   <td><%= pageContext.getAttribute("test7.value") %></td>
  -    <td>[#,000.00] <bean:write name="test7.value" format="#,000.00"/></td>
  -    <td>[<bean:message key="format.pattern" />] <bean:write name="test7.value"
formatKey="format.pattern"/></td>
  -  </tr>
  -</table>
  -</td>
  -</tr>
  -</table>
  -
  -<h3>Sprache | Language | Langage</h3>
  -<ul>
  -   <li><html:link action="/locale?page=/bean-write.jsp&amp;language=de">German
| Deutsch</html:link> <bean:message key="locale.de"/></li>
  -   <li><html:link action="/locale?page=/bean-write.jsp&amp;language=en">English
| Anglais</html:link> <bean:message key="locale.en"/></li>
  -   <li><html:link action="/locale?page=/bean-write.jsp&amp;language=fr">French
| Francais</html:link> <bean:message key="locale.fr"/></li>
  -</ul>
  -
   </body>
   </html>
   
  
  
  
  1.1                  jakarta-struts/web/exercise-taglib/bean-write-2.jsp
  
  Index: bean-write-2.jsp
  ===================================================================
  <%@ page language="java" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  <html>
  <head>
  <title>Test struts-bean:write Tag</title>
  </head>
  <body bgcolor="white">
  
  <div align="center">
  <h1>Test struts-bean:write Tag</h1>
  </div>
  
  <h3>Test 7 - Localized format patterns</h3>
  
  <%
    pageContext.setAttribute("test7.double", new Double(1234567.89));
    pageContext.setAttribute("test7.date", new java.util.Date(123456789));
  %>
  
  <h4>Doubles</h4>
  
  <table border="0">
  <tr>
  <td>
  <table border="1">
   <tr>
     <th>Language</th>
     <th>Double format</th>
    </tr>
    <tr>
      <td>de <bean:message key="locale.de"/></td>
      <td>1.234.567,89</td>
     </tr>
     <tr>
      <td>en <bean:message key="locale.en"/></td>
      <td>1,234,567.89</td>
     </tr>
    <tr>
      <td>fr <bean:message key="locale.fr"/></td>
      <td>1 234 567,89</td>
    </tr>
  </table>
  </td>
  <td>
  <table border="1">
  <tr>
    <th>Default format</td>
    <th>Using Format Attribute</th>
    <th>Using Format Key</th>
  </tr>
    <tr>
     <td><%= pageContext.getAttribute("test7.double") %></td>
      <td>[#,000.00] <bean:write name="test7.double" format="#,000.00"/></td>
      <td>[<bean:message key="double.pattern" />] <bean:write name="test7.double"
formatKey="double.pattern"/></td>
    </tr>
  </table>
  </td>
  </tr>
  </table>
  
  <h4>Dates</h4>
  
  <table border="0">
  <tr>
  <td>
  <table border="1">
   <tr>
     <th>Language</th>
     <th>Date format</th>
    </tr>
    <tr>
      <td>de <bean:message key="locale.de"/></td>
      <td>Fr, Jan 2, '70</td>
     </tr>
     <tr>
      <td>en <bean:message key="locale.en"/></td>
      <td>Fri, Jan 2, '70</td>
     </tr>
    <tr>
      <td>fr <bean:message key="locale.fr"/></td>
      <td>ven., janv. 2, '70</td>
    </tr>
  </table>
  </td>
  <td>
  <table border="1">
  <tr>
    <th>Default format</td>
    <th>Using Format Attribute</th>
    <th>Using Format Key</th>
  </tr>
    <tr>
     <td><%= pageContext.getAttribute("test7.date") %></td>
      <td>[EEE, MMM d, ''yy] <bean:write name="test7.date" format="EEE, MMM d, ''yy"/></td>
      <td>[<bean:message key="date.pattern" />] <bean:write name="test7.date"
formatKey="date.pattern"/></td>
    </tr>
  </table>
  </td>
  </tr>
  </table>
  
  <h4>Sprache | Language | Langage</h4>
  <ul>
     <li><html:link action="/locale?page=/bean-write-2.jsp&amp;language=de">German
| Deutsch</html:link> <bean:message key="locale.de"/></li>
     <li><html:link action="/locale?page=/bean-write-2.jsp&amp;language=en">English
| Anglais</html:link> <bean:message key="locale.en"/></li>
     <li><html:link action="/locale?page=/bean-write-2.jsp&amp;language=fr">French
| Francais</html:link> <bean:message key="locale.fr"/></li>
  </ul>
  
  </body>
  </html>
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message