You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2005/06/16 02:51:11 UTC

cvs commit: jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference Insert.xml

hlship      2005/06/15 17:51:11

  Modified:    .        status.xml
               framework/src/documentation/content/xdocs/tapestry/ComponentReference
                        Insert.xml
  Log:
  TAPESTRY-304: Non thread safe documentation example
  
  Revision  Changes    Path
  1.128     +1 -0      jakarta-tapestry/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/status.xml,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- status.xml	16 Jun 2005 00:36:26 -0000	1.127
  +++ status.xml	16 Jun 2005 00:51:11 -0000	1.128
  @@ -76,6 +76,7 @@
          <action type="fix" dev="HLS" fixes-bug="TAPESTRY-342">@Parameter does not work for required</action>
          <action type="add" dev="HLS">Add a page explicitly discussing JDK and library dependencies.</action>
          <action type="fix" dev="HLS" fixes-bug="TAPESTRY-337">Incorrect link to Spring integration docs in FAQ</action>
  +       <action type="fix" dev="HLS" fixes-bug="TAPESTRY-304">Non thread safe documentation example</action>
       </release>
       <release version="4.0-alpha-3" date="May 16 2005">
         <action type="add" dev="HLS">Add initial support for the validator: binding prefix.</action>
  
  
  
  1.4       +12 -3     jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Insert.xml
  
  Index: Insert.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Insert.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Insert.xml	1 Apr 2005 16:04:58 -0000	1.3
  +++ Insert.xml	16 Jun 2005 00:51:11 -0000	1.4
  @@ -152,14 +152,15 @@
   <tr>
    <td>
    The order was due on the <font color="red"><b>
  - <span jwcid="@Insert" value="date" format="@EnquiryPage@DATE_FORMAT" class="ognl:dueClass">21 January 2002</span>. 	
  + <span jwcid="@Insert" value="date" format="dateFormat" class="ognl:dueClass">21 January 2002</span>. 	
    </td>
   </tr>
   </table>
   ]]></source>
     
   <p>
  -This will extract the date and dueClass properties from the page. It will also obtain the DATE_FORMAT public static variable, and use
  +This will extract the date and dueClass properties from the page. It will also obtain the dateFormat 
  +property (which is lazily instantiated), and use
   that to format the date before inserting it.
   </p>  
     
  @@ -171,7 +172,15 @@
   <source>
   public abstract class EnquiryPage extends BasePage 
   {
  -  public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd MMM yyyy");
  +  private Format _dateFormat;
  +
  +  public Format getDateFormat()
  +  {
  +    if (_dateFormat == null)
  +      _dateFormat = new SimpleDateFormat("dd MMM yyyy");
  +      
  +    return _dateFormat;
  +  }
   
     public abstract Date getDueDate();
   
  
  
  

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