Known Subclasses |
---|
JSBean JSButton JSField JSLabel |
Property Summary | |
---|---|
Boolean | #enabled The enable state of the component, default true. |
Number | #height The height in pixels of the component. |
String | #name The name of the component. |
String | #styleClass The name of the style class that should be applied to this component. |
Boolean | #visible The visible property of the component, default true. |
Number | #width The width in pixels of the component. |
Number | #x The x coordinate of the component on the form. |
Number | #y The y coordinate of the component on the form. |
Method Summary |
---|
Property Details |
---|
enabled |
The enable state of the component, default true.
|
Returns |
Samplevar form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300); var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20); field.enabled = false; |
height |
The height in pixels of the component.
|
Returns |
Samplevar field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20); application.output('original width: ' + field.width); application.output('original height: ' + field.height); field.width = 200; field.height = 100; application.output('modified width: ' + field.width); application.output('modified height: ' + field.height); |
name |
The name of the component. Through this name it can also accessed in methods.
|
Returns |
Samplevar form = solutionModel.newForm('someForm', 'db:/example_data/parent_table', null, false, 620, 300); var label = form.newLabel('Label', 10, 10, 150, 150); label.name = 'myLabel'; // Give a name to the component. forms['someForm'].controller.show() // Now use the name to access the component. forms['someForm'].elements['myLabel'].text = 'Updated text'; |
styleClass |
The name of the style class that should be applied to this component. When defining style classes for specific component types, their names |
Returns |
Samplevar form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300); var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20); var style = solutionModel.newStyle('myStyle','field.fancy { background-color: yellow; }'); form.styleName = 'myStyle'; // First set the style on the form. field.styleClass = 'fancy'; // Then set the style class on the field. |
visible |
The visible property of the component, default true.
|
Returns |
Samplevar form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300); var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20); field.visible = false; |
width |
The width in pixels of the component.
|
Returns |
Samplevar field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20); application.output('original width: ' + field.width); application.output('original height: ' + field.height); field.width = 200; field.height = 100; application.output('modified width: ' + field.width); application.output('modified height: ' + field.height); |
x |
The x coordinate of the component on the form.
|
Returns |
Samplevar field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20); application.output('original location: ' + field.x + ', ' + field.y); field.x = 90; field.y = 90; application.output('changed location: ' + field.x + ', ' + field.y); |
y |
The y coordinate of the component on the form.
|
Returns |
Samplevar field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20); application.output('original location: ' + field.x + ', ' + field.y); field.x = 90; field.y = 90; application.output('changed location: ' + field.x + ', ' + field.y); |
Method Details |
---|