fill
Class: mlreportgen.dom.Document
Namespace: mlreportgen.dom
Fill document holes with generated content
Syntax
Description
fill(
fills the holes in a
DOM-based form with generated content. Use this method with a class you derive from
any of these classes:form
)
Note
Use this method only with derived classes. Invoking this method on an instance of a DOM class causes an error.
This method assumes that the derived class, for each hole in an instance’s template, defines a method having this signature:
fillHoleId(d)
HoleId
is the ID of a hole defined in the document’s template. d
is an
instance of the derived class. The fill method moves from the first hole in the
document to the last, invoking the corresponding fillHoleId
method at each hole. This way, you can define methods that fill the holes without
looping. The fill method moves from hole to hole to fill the template.Input Arguments
Examples
Tips
In the derived class, define fill
methods to insert content for
each hole in the template. Use this signature:
fillHOLE_ID(docObj);
HOLE_ID
is the ID of a hole defined by the template that the
document uses, and docObj
is an instance of the derived class. When
invoked on a derived Document
object, the fill
method moves from the first hole in the document to the last, invoking the corresponding
fillHOLE_ID
method at each hole. This approach eliminates the
need for additional code to loop through the holes in a template.
Version History
Introduced in R2014b