Docmosis API 4.8.0

com.docmosis.template.analysis
Interface TemplateField

All Superinterfaces:
Serializable, com.docmosis.template.analysis.TemplateBookmark, TemplateSection

public interface TemplateField
extends TemplateSection, com.docmosis.template.analysis.TemplateBookmark

A template field is a section of a template that is a substitutable field. It has a key which can be used to look up a corresponding value in a data provider.


Method Summary
 String getCloseParaHeadingSequence()
          Get the sequence (of tags) required to close the nearest paragraph or heading in the content hierarchy.
 SimpleTemplateTableCell getContainingCell()
          Get the containing table cell (if applicable) of this field.
 String getFieldName()
          Get the name of the field.
 String getId()
          Get the id for this field if one was specified in the template.
 String getOpenParaHeadingSequence()
          Get the sequence (of tags) required to open the nearest paragraph or heading in the content hierarchy.
 String getRendererName()
          Get the name of the renderer for this field.
 String[] getRendererParams()
          Return any renderer parameters the field specifies.
 String getSectionNameOverride()
          Get the name of the section override.
 boolean isFormField()
          Determine if this field is a form field (for a fillable PDF form for example).
 
Methods inherited from interface com.docmosis.template.analysis.TemplateSection
equals, getEndIndex, getLength, getParsedFieldDetails, getPostAmbleStartIdx, getPreAmbleEndIdx, getStartIndex, getSubSections, isArtificial, isConditional, isContainer, isPopulable, isRepeatable, isSkipSection, skipPreAndPostAmble
 
Methods inherited from interface com.docmosis.template.analysis.TemplateBookmark
getBookmarkEndEndIdx, getBookmarkEndStartIdx, getBookmarkName, getBookmarkStartEndIdx, getBookmarkStartStartIdx
 

Method Detail

getFieldName

String getFieldName()
Get the name of the field.

Returns:
the field name

getSectionNameOverride

String getSectionNameOverride()
Get the name of the section override. This name is used when the field in the template is located inside an artificially constructed section (such as lists and repeating table rows). This override allows the default name ("list" or "tableRow") to be replaced by one specified by the template. This is particularly useful when using reflective data providers which use the section names to locate data inside other objects.

Returns:
the override name or null if not applicable.

getRendererName

String getRendererName()
Get the name of the renderer for this field.

Returns:
null if no renderer is applicable.

getRendererParams

String[] getRendererParams()
Return any renderer parameters the field specifies. The parameters are returned in the same order as specified in the template.

Returns:
null if there are no renderer parameters

getId

String getId()
Get the id for this field if one was specified in the template. The id is not used internally for any processing, it is merely passed through to the renderer. This allows the same field with the same renderer to be used in different parts of the template and distinguished by the renderer for any reason.

Returns:
the id or null if none specified in the template

getContainingCell

SimpleTemplateTableCell getContainingCell()
Get the containing table cell (if applicable) of this field. This link allows a field (and renderer) to make adjustments to the containing cell (such as background colour) which the cell can choose to use in its style.

Returns:
null if this field is not contained by a table cell.

getCloseParaHeadingSequence

String getCloseParaHeadingSequence()
Get the sequence (of tags) required to close the nearest paragraph or heading in the content hierarchy.

Returns:
a String of XML tags.

getOpenParaHeadingSequence

String getOpenParaHeadingSequence()
Get the sequence (of tags) required to open the nearest paragraph or heading in the content hierarchy.

Returns:
a String of XML tags.

isFormField

boolean isFormField()
Determine if this field is a form field (for a fillable PDF form for example).

Returns:
true if so

Docmosis API 4.8.0

Copyright © 2014–2024 Docmosis Pty Ltd. All rights reserved.