Dataproducer, available for php,java servlets and asp is used to seperate the presentation layer from the data layer in web applications. With it you can specify single and multiple row tags inside a html template, which are then replaced with data that you specify. Please note this is the first version of the class and features little error handling. More features and error handling will be added in the next version.
Methods
dp.doDataProducer(startTag,endTag,data,contents)Replaces all data between starttag and endtag, with the contents of data, an array of Dictionary objects. The template it uses is the 'contents' variable. Returns the parsed template as a string.
dp.doSingleDataProducer(data,contents)Replaces single data tags, specified in data which is an Dictionary object. 'contents' is the html template, the method returns the parsed template as a string.
dp.openTemplate(filename)Opens 'filename' as a template (usually a html file), and returns it as a string.
Properties
No properties.
The example opens a html template, replaces 3 single tags, and 3 rows of data.