Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pr_methods:fillwithdata [2023/04/05 04:32] – ↷ Links adapted because of a move operation seanpr_methods:fillwithdata [2025/06/12 04:00] (current) – Change to AwareIM aware_support3
Line 1: Line 1:
-{{tag>Programmers_Reference Methods IDocumentEngine_Interface IDocumentEngine_Interface_Methods, fillwithdata}}+{{tag>Index Programmers_Reference Methods IDocumentEngine_Interface fillwithdata}}
  
 ====fillWithData (String, Map, IDocumentDataSource, DataPresentationTemplate, IDocEngineHelper, IDomainVersion, int, Boolean, int)==== ====fillWithData (String, Map, IDocumentDataSource, DataPresentationTemplate, IDocEngineHelper, IDomainVersion, int, Boolean, int)====
Line 14: Line 14:
 throws DocumentException</code> throws DocumentException</code>
  
-This method is called by //**Aware IM**// at run time when a particular document template is processed. The method is supposed to replace tags used in the document template with the appropriate attribute values. The values must be obtained from the provided data source – see [[docs:3500:0600_adding_custom_document_types:0640_idocumentdatasource_interface|IDocumentDataSource]] interface. The overall structure of the method must be as follows:+This method is called by //**AwareIM**// at run time when a particular document template is processed. The method is supposed to replace tags used in the document template with the appropriate attribute values. The values must be obtained from the provided data source – see [[docs:3500:0600:0640|IDocumentDataSource]] interface. The overall structure of the method must be as follows:
  
   - Find the contents of the tags used in the document template.   - Find the contents of the tags used in the document template.
   - Call ''reset'' method of the provided data source to position it on the first element.   - Call ''reset'' method of the provided data source to position it on the first element.
   - Create a document (''BinaryResource'') from the original template that will have tags replaced with their value.   - Create a document (''BinaryResource'') from the original template that will have tags replaced with their value.
-  - Go through all the tags and call the ''[[progref:0600_adding_custom_document_types:0620_implementing_server_side_components:getexpressionvalue]]'' method of the provided data source to calculate the value of the expression used inside the tag+  - Go through all the tags and call the ''[[pr_methods:getexpressionvalue|getExpressionValue]]'' method of the provided data source to calculate the value of the expression used inside the tag
   - Replace each tag in the document with its calculated value   - Replace each tag in the document with its calculated value
   - Call the next method of the data source. While there are elements in the data source repeat steps 3 to 5.   - Call the next method of the data source. While there are elements in the data source repeat steps 3 to 5.
  
-See also the [[docs:3500:0600_adding_custom_document_types:0650_example|example]].+See also the [[docs:3500:0600:0650|example]].
  
 ===Parameters=== ===Parameters===
Line 29: Line 29:
 |''dirPath''|the name of the directory where the template file is stored| |''dirPath''|the name of the directory where the template file is stored|
 |''params''|can be ignored| |''params''|can be ignored|
-|''dataSource''|the source of data for the values of the tags. See the [[docs:3500:0600_adding_custom_document_types:0640_idocumentdatasource_interface|IDocumentDataSource]] interface.|+|''dataSource''|the source of data for the values of the tags. See the [[docs:3500:0600:0640|IDocumentDataSource]] interface.|
 |''template''|the document template which is being filled with data| |''template''|the document template which is being filled with data|
 |''helper''|can be ignored| |''helper''|can be ignored|
Line 38: Line 38:
  
 ===Returns=== ===Returns===
-A structure represented by the ''ReportResult'' object. The first document created at the step 3 must be set into this structure as the BinaryResource. All other documents must be stored on disk as files. Full path names of the files must be set into the ReportResult structure. +A structure represented by the ''ReportResult'' object. The first document created at the step 3 must be set into this structure as the ''BinaryResource''. All other documents must be stored on disk as files. Full path names of the files must be set into the ''ReportResult'' structure. 
  
 ===Throws=== ===Throws===
 the ''DocumentException'' if error occurs. the ''DocumentException'' if error occurs.
  
  • Last modified: 2023/04/05 04:32