|
TFORMer SDK - JAVA
7.5
|
Provides access to DataField information. More...
Public Member Functions | |
| void | dispose () throws TFormerException |
| Releases the resources allocated by this instance. More... | |
| void | dump (PrintStream s) throws IOException, TFormerException |
| Dumps the current instance into a text stream. More... | |
| String | getCaption () throws TFormerException |
| Gets the caption of the DataField. More... | |
| String | getComment () throws TFormerException |
| Gets the comment of the DataField. More... | |
| boolean | getCriteria () throws TFormerException |
| Gets a flag indicating whether this DataField should be used as a criteria for a print-job. More... | |
| int | getCriteriaColumn () throws TFormerException |
| Gets the criteria column of the DataField. More... | |
| String | getCriteriaFormat () throws TFormerException |
| Gets the criteria format of the DataField. More... | |
| String | getDefaultValue () throws TFormerException |
| Gets the default value of the DataField. More... | |
| String | getDescription () throws TFormerException |
| Gets the description of the DataField. More... | |
| String | getDisplayOrder () throws TFormerException |
| Gets the display order of the DataField. More... | |
| String | getName () throws TFormerException |
| Gets the name of the DataField. More... | |
| DataField | getNext () throws TFormerException |
| Gets the next DataField defined in the Project. More... | |
| DataFieldType | getType () throws TFormerException |
| Gets the type of the DataField. More... | |
| String | getValidationMessage () throws TFormerException |
| Gets the validation message of the DataField. More... | |
| String | getValidationRule () throws TFormerException |
| Gets the validation rule of the DataField. More... | |
| void | setCaption (String sCaption) throws TFormerException |
| Sets the caption of the DataField. More... | |
| void | setComment (String sComment) throws TFormerException |
| Sets the comment of the DataField. More... | |
| void | setCriteria (boolean bCriteria) throws TFormerException |
| Sets a flag indicating whether this DataField should be used as a criteria for a print-job. More... | |
| void | setCriteriaColumn (int nCriteriaColumn) throws TFormerException |
| Sets the criteria column of the DataField. More... | |
| void | setCriteriaFormat (String sCriteriaFormat) throws TFormerException |
| Sets the criteria format of the DataField. More... | |
| void | setDefaultValue (String sDefaultValue) throws TFormerException |
| Sets the default value of the DataField. More... | |
| void | setDescription (String sDescription) throws TFormerException |
| Sets the description of the DataField. More... | |
| void | setDisplayOrder (String sDisplayOrder) throws TFormerException |
| Sets the display order of the DataField. More... | |
| void | setName (String sName) throws TFormerException |
| Sets the name of the DataField. More... | |
| void | setType (DataFieldType dataFieldType) throws TFormerException |
| Sets the type of the DataField. More... | |
| void | setValidationMessage (String sValidationMessage) throws TFormerException |
| Sets the validation message of the DataField. More... | |
| void | setValidationRule (String sValidationRule) throws TFormerException |
| Sets the validation rule of the DataField. More... | |
| String | toString () |
| Returns a string representation of the instance. More... | |
Provides access to DataField information.
A DataField is a place-holder for dynamic content in a FormLayout. One FormLayout can use an arbitrary number of DataFields (0..n). TFORMer Designer requires that a DataField is defined before it can be used. This definition takes place directly in the FormLayout (in the case of a stand-alone FormLayout) or in a user-defined Project (or the GlobalProject ) of a Repository.
A DataField can be printed as text, as bar-code or may be used to provide the filename for image elements in the FormLayout. Besides this, a DataField can be used in element expressions and printing conditions.
The type of a DataField influences its use in expressions within a FormLayout and the conversion method when reading a DataField from a JobData. 3 different data types are supported:
The name of a DataField must comply with JavaScript rules for valid identifiers (see Naming Rules). In short a name must begin with a letter or an underscore. Within the name letters, underscores and digits are allowed. Special characters (e.g. white spaces, tabs, hyphens, German Umlauts, ...) are invalid.
Usually DataField names are not suitable for representing them to end-users. Refer to additional properties like Caption, Description, Comment and DisplayOrder for such purposes.
For printing a FormLayout it is required to provide the DataField values via JobData. When a JobData is used to pass data to TFORMer SDK and a DataField is not set by this JobData the value of the DataField will be an empty string ("") or 0 (see also JobData.setReuseValues).
The DefaultValue is the standard value of a DataField. The DefaultValue is only used by TFORMer Designer.
Use ValidationRules for validating values for DataField objects.
ValidationRules are expressions which are used to check if the value of a DataField meets a certain criteria. Whenever a DataField value violates the assigned ValidationRule an error message is displayed (in TFORMer Designer) or an exception is raised (TFORMer SDK).
In order to programmatically access the DataFields in a FormLayout you may either use the method Project.getDataField or you may iterate through all available DataField objects using Project.getFirstDataField and DataField.getNext. If you want to know, whether the returned DataField is actually used in the FormLayout use the method FormLayout.getDataFieldUsage.
To determine if a specific DataField is used in a FormLayout iterate all data-fields of the Project and query the usage:
| void dispose | ( | ) | throws TFormerException |
Releases the resources allocated by this instance.
Call this method in every case (even in case of exceptions) is this instance is not required anymore.
| void dump | ( | PrintStream | s | ) | throws IOException, TFormerException |
Dumps the current instance into a text stream.
| s | Instance of the stream |
| String getCaption | ( | ) | throws TFormerException |
| String getComment | ( | ) | throws TFormerException |
| boolean getCriteria | ( | ) | throws TFormerException |
| int getCriteriaColumn | ( | ) | throws TFormerException |
| String getCriteriaFormat | ( | ) | throws TFormerException |
| String getDefaultValue | ( | ) | throws TFormerException |
| String getDescription | ( | ) | throws TFormerException |
| String getDisplayOrder | ( | ) | throws TFormerException |
| String getName | ( | ) | throws TFormerException |
| DataField getNext | ( | ) | throws TFormerException |
Gets the next DataField defined in the Project.
A Project stores a list of DataField objects. You can use this method to iterate through the list. To retrieve the first DataField in the Project see Project.getFirstDataField.
nullSample: Iterate DataFields in a Stand-Alone FormLayout
| DataFieldType getType | ( | ) | throws TFormerException |
| String getValidationMessage | ( | ) | throws TFormerException |
| String getValidationRule | ( | ) | throws TFormerException |
| void setCaption | ( | String | sCaption | ) | throws TFormerException |
| void setComment | ( | String | sComment | ) | throws TFormerException |
| void setCriteria | ( | boolean | bCriteria | ) | throws TFormerException |
| void setCriteriaColumn | ( | int | nCriteriaColumn | ) | throws TFormerException |
| void setCriteriaFormat | ( | String | sCriteriaFormat | ) | throws TFormerException |
| void setDefaultValue | ( | String | sDefaultValue | ) | throws TFormerException |
| void setDescription | ( | String | sDescription | ) | throws TFormerException |
| void setDisplayOrder | ( | String | sDisplayOrder | ) | throws TFormerException |
| void setName | ( | String | sName | ) | throws TFormerException |
| void setType | ( | DataFieldType | dataFieldType | ) | throws TFormerException |
| void setValidationMessage | ( | String | sValidationMessage | ) | throws TFormerException |
| void setValidationRule | ( | String | sValidationRule | ) | throws TFormerException |
| String toString | ( | ) |
Returns a string representation of the instance.
| © 2006-2017 - all rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
| Generated on Fri Nov 3 2017 07:59:14 for TFORMer SDK - JAVA with doxygen 1.8.9.1 |