incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devin...@apache.org
Subject svn commit: r1164434 - /incubator/odf/site/trunk/content/odftoolkit/simple/demo/demo7.mdtext
Date Fri, 02 Sep 2011 09:32:45 GMT
Author: devinhan
Date: Fri Sep  2 09:32:45 2011
New Revision: 1164434

URL: http://svn.apache.org/viewvc?rev=1164434&view=rev
Log:
clear tags

Modified:
    incubator/odf/site/trunk/content/odftoolkit/simple/demo/demo7.mdtext

Modified: incubator/odf/site/trunk/content/odftoolkit/simple/demo/demo7.mdtext
URL: http://svn.apache.org/viewvc/incubator/odf/site/trunk/content/odftoolkit/simple/demo/demo7.mdtext?rev=1164434&r1=1164433&r2=1164434&view=diff
==============================================================================
--- incubator/odf/site/trunk/content/odftoolkit/simple/demo/demo7.mdtext (original)
+++ incubator/odf/site/trunk/content/odftoolkit/simple/demo/demo7.mdtext Fri Sep  2 09:32:45
2011
@@ -1,8 +1,8 @@
-<a href="index.html">Simple Demos<a> > <b> Offer Letter with Text Fields</b>
  
+[Demos][1] > <b> Offer Letter with Text Fields</b>   
 
 **Overview**    
 
-We have introduced several samples about how to use Simple ODF API to generate document from
the predefined templete, for example, Demo: [Navigation API in Hotel Receipt][1]. I believe
you have known how easy it is. But sounds like, we never talk about how to create a template
document using  Simple ODF API.   
+We have introduced several samples about how to use Simple ODF API to generate document from
the predefined templete, for example, Demo: [Navigation API in Hotel Receipt][2]. I believe
you have known how easy it is. But sounds like, we never talk about how to create a template
document using  Simple ODF API.   
 
 Today, let's do it.   
 
@@ -12,17 +12,17 @@ This demo provides a Java application wh
 
 The following picture show a sample offer letter. I have labeled the variable content with
blod and color style.    
 
-![image1][2]    
+![image1][3]    
 
 This offer was generated on "2011-01-20". It also can be in any other date, so this text
content should be replaced by a date field. "Tom King" is the receiver, this name can be replaced
with a variable field, then we can send it to any other perpson. Similarly, "software engineer"
is the job title of "Tom King", "R&D" is the branch which he belongs to, and "2011-03-12"
is his onboard date, all of them should be replaced by variable field in a template document.<br/><br/>

 Salary and allowance are more complex. Different job titles and branches have different rules.
Simplicity, we assume that except "Secretary" is 5,500,00, all of the other job titles are
6,000.00. We also assume that employees from "Sales" don't have allowance. Condition field
or Hidden Text field is needed to realize these rules. The same as certificates/testimonials,
for campus hires, they need supply "Educational certificates", while for professinal hires,
they need supply "Experience certificates from previous employers" and "Copy of resignation/acceptation
letter and relieving letter". This is another use case of condition field.<br/><br/>
 After replaced all of these variable content with fields, the template document is ready.
The process of generate new offer letter is very simple. Only need to load the following data,
update the variable values with the data and save as a new document.    
 
-![image2][3]    
+![image2][4]    
 
 No need text content search, no need target replace. It's faster than the content replace
way. Beside, the variable content is highlighted automatically by Symphony or Open Office
when the document is opend. The following is a generated letter sample.    
 
-![image3][4]
+![image3][5]
 
 As using fields, the new offer letter is easily updated without inconsistent, even though
after generated. You can do it in Symphony or Open Office.
 Code Introduction
@@ -38,7 +38,7 @@ There are two methods in the class, <cod
 			e.printStackTrace();
 		}
 	} 
-Below is the source code of method <code>createFieldTemplate()</code>. The basic
process is find the variable content and replace it with a field. We use <code>FixedDateField</code>,
<code>UserVariableField</code>, <code>ConditionField</code> and <code>HiddenTextField</code>
in this method. Simple ODF API provides more types of fields. For more information, please
reference the [Javadoc][5] or [CookBook][6].  
+Below is the source code of method <code>createFieldTemplate()</code>. The basic
process is find the variable content and replace it with a field. We use <code>FixedDateField</code>,
<code>UserVariableField</code>, <code>ConditionField</code> and <code>HiddenTextField</code>
in this method. Simple ODF API provides more types of fields. For more information, please
reference the [Javadoc][6] or [CookBook][7].  
   
 	public static void createFieldTemplate() throws Exception {
 		TextDocument sampleDocument = TextDocument.loadDocument("Tom's Offer.odt");
@@ -141,15 +141,16 @@ Method <code>generateOfferLetterDocument
 
 **Download**  
 
-Powered by the Simple Java API for ODF version [0.5][7].   
-You can download the code of this demo from [here][8].
+Powered by the Simple Java API for ODF version [0.5][8].   
+You can download the code of this demo from [here][9].
 
 
-  [1]: demo3.html
-  [2]: image/offer-letter-sample.png
-  [3]: image/candidate-data.png
-  [4]: image/generated-offer-letter.png
-  [5]: ../javadoc/index.html
-  [6]: ../cookbook/index.html
-  [7]: ../downloads.html
-  [8]: demo7.zip
\ No newline at end of file
+  [1]: index.html
+  [2]: demo3.html
+  [3]: image/offer-letter-sample.png
+  [4]: image/candidate-data.png
+  [5]: image/generated-offer-letter.png
+  [6]: ../javadoc/index.html
+  [7]: ../cookbook/index.html
+  [8]: ../downloads.html
+  [9]: demo7.zip
\ No newline at end of file



Mime
View raw message