JSPart

Overview

The JSPartWithConstants class extends JSPart and adds support for prefixed constants through the IPrefixedConstantsObject interface. Should not be instantiated directly, as its constructor exists solely to meet interface requirements. The class provides a getPrefix method that returns the name of the JSPart class, enabling consistent handling of prefixed constants.

Constants Summarized

Type
Name
Summary

Constant use for specifying the type of form parts.

Constant use for specifying the type of form parts.

Constant use for specifying the type of form parts.

Properties Summarized

Type
Name
Summary

The background color of the form part.

The height of a selected part; specified in pixels.

The Cascading Style Sheet (CSS) class name applied to the part.

Methods Summarized

Type
Name
Summary

Returns the comment of this component.

The type of this part.

The Y offset of the part on the form, this will include all the super forms parts if this form extends a form.

Returns the UUID of this component.

Constants Detailed

BODY

Constant use for specifying the type of form parts.

This is the default part that is repeated for each record (being displayed and/or printed).

Type Number

Sample

var body = form.newPart(JSPart.BODY, 320);

Constant use for specifying the type of form parts.

A footer is displayed at the bottom of each page when printed ad can contain summaries of the current selection of records. In List view, the footer is displayed at the bottom of the list of records.

Type Number

Sample

var footer = form.newPart(JSPart.FOOTER, 440);

Constant use for specifying the type of form parts.

A header is displayed at the top of each page when printed and can contain summaries of the current selection of records. In List view the header is displayed above the list of records. In tableview the default column headers will not be there if this is specified.

Type Number

Sample

var header = form.newPart(JSPart.HEADER, 80);

Properties Detailed

background

The background color of the form part.

NOTE: When no background color has been set, the default background color will be determined by the Look and Feel (LAF) that has been selected in Application Preferences.

Type String

Sample

var body = form.newPart(JSPart.BODY, 320);
body.background = 'green';

height

The height of a selected part; specified in pixels.

This height property is the lowerbound as its ending Y value (0 == top of the form).

Type Number

Sample

var part = form.newPart(JSPart.HEADER, 100);
part.height = 200;

styleClass

The Cascading Style Sheet (CSS) class name applied to the part.

Type String

Sample

var body = form.newPart(JSPart.BODY, 320);
body.styleClass = 'myBody';

Methods Detailed

getComment()

Returns the comment of this component.

Returns: String

Sample

var comment = solutionModel.getForm("my_form").getButton("my_button").getComment();
application.output(comment);

getPartType()

The type of this part.

Returns: Number A number representing the type of the form part.

Sample

var allParts = form.getParts()
for (var i=0; i<allParts.length; i++) {
	if (allParts[i].getPartType() == JSPart.BODY)
		application.output('body Y offset: ' + allParts[i].getPartYOffset());
}

getPartYOffset()

The Y offset of the part on the form, this will include all the super forms parts if this form extends a form.

Returns: Number A number holding the Y offset of the form part.

Sample

var allParts = form.getParts()
for (var i=0; i<allParts.length; i++) {
	if (allParts[i].getPartType() == JSPart.BODY)
		application.output('body Y offset: ' + allParts[i].getPartYOffset());
}

getUUID()

Returns the UUID of this component.

Returns: UUID

Sample

var button_uuid = solutionModel.getForm("my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());

Last updated