Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Scout/Concepts/Field
Scout |
Wiki Home |
Website |
Download • Git |
Community |
Forums • Blog • Twitter • G+ |
Bugzilla |
Bugzilla |
Field are elements in Form
Contents
Type of fields
It is possible to distinguish different types of fields:
Value fields
These fiels contain a value. There are specific implementation depending on the type of data:
Field | RAP | SWT | Swing | Swing Rayo |
---|---|---|---|---|
StringField | ![]() |
![]() |
![]() |
![]() |
LabelField | ![]() |
![]() |
![]() |
![]() |
IntegerField | ![]() |
![]() |
![]() |
![]() |
LongField | ![]() |
![]() |
![]() |
![]() |
BigIntegerField | ![]() |
![]() |
![]() |
![]() |
DoubleField | ![]() |
![]() |
![]() |
![]() |
BigDecimalField | ![]() |
![]() |
![]() |
![]() |
FileChooserField | ![]() |
![]() |
![]() |
![]() |
BooleanField or CheckBox | ![]() |
![]() |
![]() |
![]() |
SmartField | ![]() |
![]() |
![]() |
![]() |
ProposalField | File:Scout 4.0 ProposalField RAP.png | ![]() |
File:Scout 4.0 ProposalField Swing.png | File:Scout 4.0 ProposalField Swing Rayo.png |
DateField | ![]() |
![]() |
![]() |
![]() |
TimeField | ![]() |
![]() |
![]() |
![]() |
DateTimeField | ![]() |
![]() |
![]() |
![]() |
CalendarField | ![]() |
![]() |
![]() |
![]() |
ListBox | ![]() |
![]() |
![]() |
![]() |
TreeBox | ![]() |
![]() |
![]() |
![]() |
MailField | only Swing available | only Swing available | ![]() |
![]() |
HtmlField | ![]() |
![]() |
![]() |
![]() |
BrowserField | ![]() |
![]() |
![]() |
![]() |
DocumentField | This will be released soon as a scout swing fragment under epl. | |||
See also the main article on value fields |
Composite fields
To group other fields
Field | RAP | SWT | Swing | Swing Rayo |
---|---|---|---|---|
GroupBox | ![]() |
![]() |
![]() |
![]() |
TabBox | ![]() |
![]() |
![]() |
![]() |
SequenceBox | ![]() |
![]() |
![]() |
![]() |
SplitBox | ![]() |
![]() |
![]() |
![]() |
RadioButtonGroup | ![]() |
![]() |
![]() |
![]() |
See also the main article on composite field |
Buttons
Button | RAP | SWT | Swing | Swing Rayo |
---|---|---|---|---|
Button | ![]() |
![]() |
![]() |
![]() |
ToggleButton | ![]() |
![]() |
![]() |
![]() |
LinkButton | ![]() |
![]() |
![]() |
![]() |
RadioButton | ![]() |
![]() |
![]() |
![]() |
Other fields
Field | RAP | SWT | Swing | Swing Rayo |
---|---|---|---|---|
TableField | ![]() |
![]() |
![]() |
![]() |
TreeField | ||||
PageField | ![]() |
![]() |
![]() |
![]() |
ImageField | ![]() |
![]() |
![]() |
![]() |
SVGField | ![]() |
![]() |
![]() |
![]() |
PlannerField | only Swing available | only Swing available | ![]() |
![]() |
WrappedFormField | Contains another form |
Contribution to unsaved changes
Each field controls if he contains modifications or not. This information is used by the form for its lifecycle management in particular to decide if a save action is required or not.
Each field defines if it contains unsaved modifications with the method isSaveNeeded(). The property is updated when checkSaveNeeded() is called on the field. The implementation of this method checks:
- the value of the m_touched flag.
- the value returned by execIsSaveNeeded() (IsSaveNeeded event).
The m_touched flag can be modified with touch() (flag is set to true) and markSaved() (flag is set to false). Additionally when the flag is set to false the event MarkSaved is triggered. Depending on the type of field this event will: reset the initial value to the current value for value fields or propagate the call to all the children for a composite field.
The execIsSaveNeeded() method provides a way to add field-specific logic to tell if the field contains informations that require a save action (at form level) or not. The default implementation just compares the initial value with the current value. If they are not equals the method return true (to indicate that a save action is needed to save the content of this field).
Properties
Defined with getConfiguredXxxxxx() methods.
Events
Defined with execXxxxxx() methods.