Skip to main content
Jump to: navigation, search

Difference between revisions of "Scout/Concepts/FormData"

(Add Class)
(Structure of a FormData)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{ScoutPage|cat=Concepts}}
+
{{ScoutPage|cat=Shared}}
  
FormData is the standard data transfert object for {{ScoutLink|Concepts|Form|forms}} between the {{ScoutLink|Concepts|Client Plug-In|client Plug-In}} and the {{ScoutLink|Concepts|Server Plug-In|server}}.
+
FormData is the standard data transfer object for {{ScoutLink|Concepts|Form|forms}} between the {{ScoutLink|Concepts|Client Plug-In|client Plug-In}} and the {{ScoutLink|Concepts|Server Plug-In|server}}.
  
 
* extends: {{ScoutJavadoc|AbstractFormData|C}}
 
* extends: {{ScoutJavadoc|AbstractFormData|C}}
Line 7: Line 7:
 
== Description ==
 
== Description ==
 
{{note|TODO|Add a description}}
 
{{note|TODO|Add a description}}
 +
Contains a transfer object for each {{ScoutLink|Concepts|Field|field}} and each {{ScoutLink|Concepts|Variable|variable}} of a {{ScoutLink|Concepts|Form|form}}.
  
* {{ScoutJavadoc|FormData|A}} FormData annotation > "CREATE EXTERNAL"
+
=== Usage ===
 +
* Used as parameter of the <code>prepareCreate(..)</code>, <code>create(..)</code>, <code>load(..)</code>, <code>store(..)</code> functions in the {{ScoutLink|Concepts|Process Service|process service}}.
  
* Importation in {{ScoutLink|Concepts|Form|Form}}
+
* Importation in {{ScoutLink|Concepts|Form|Form}}: {{ScoutEvent|Load}} and {{ScoutEvent|Store}} events of {{ScoutLink|Concepts|Form Handler|FormHandler}}:
 +
** <code>exportFormData()</code>
 +
** service call (depending of the action exectuted with the {{ScoutLink|Concepts|Process Service|ProcessService}})
 +
** <code>importFormData()</code>
  
* Parameter of the prepareCreate, create, load, store functions in the {{ScoutLink|Concepts|Process Service|process service}}
+
=== Access ===
 +
{{note|TODO|Add a description and example of how to access to a value, how to know if a value was set}}
  
 +
== Generation ==
 +
=== SDK Support ===
 +
* Generation of FormData with the {{ScoutLink|SDK|Explorer_View|Explorer View}}
  
== Screenshot ==
+
{{note|TODO|Add a screenshot}}
{{note|TODO|Add a screenshot (or remove this section, if there is no screenshot to make)}}
+
  
 +
=== FormData anotation ===
 +
* {{ScoutJavadoc|FormData|A}} FormData annotation
 +
** Is needed on the form Class
 +
<!-- old: ** "CREATE EXTERNAL" parameter is needed on fiels (a GroupBoxField for example) defined in an external Class that contains other fields. -->
  
== Properties ==
+
== Structure of a FormData ==
''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
+
The FormData depends from the {{ScoutLink|Concepts|Form}} it contains the data. The SDK generate:
 +
* For each {{ScoutLink|Concepts|ValueField}} a <tt>AbstractValueFieldData<T></tt> is generated.
 +
* For each {{ScoutLink|Concepts|TableField}} a {{ScoutLink|Concepts|TableData}} is generated.
 +
* For each form-variable an <tt>AbstractPropertyData<T></tt>
  
{{note|TODO|Add a description of important properties. The idea is not to recreate the JavaDoc of the getConfiguredXxxxxx() methods but to provide explanations, best practice, example... Group the properties by domain.}}
+
The inner-class structure from the composite field (like groupboxes) get lost, unless Group-Box templates are used.
 
+
 
+
== Events ==
+
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
+
 
+
{{note|TODO|Add a description of important events. The idea is not to recreate the JavaDoc of the execXxxxxx() methods but to provide explanations, best practice, example... Group the events by domain.}}
+
  
 +
The value fields properties (<tt>getConfiguredMandatory()</tt>, <tt>getConfiguredMaxValue()</tt>, <tt>getConfiguredMaxLength()</tt>...) are mapped to <tt>ValidationRules</tt> conatained in the formData. Those rules are used to redo the basic UI client-side validations on the server.
  
 
== See Also ==
 
== See Also ==

Latest revision as of 17:23, 12 September 2014


Scout
Wiki Home
Website
DownloadGit
Community
ForumsBlogTwitterG+
Bugzilla
Bugzilla


FormData is the standard data transfer object for forms between the client Plug-In and the server.

  • extends: C obj.pngAbstractFormData

Description

Note.png
TODO
Add a description

Contains a transfer object for each field and each variable of a form.

Usage

  • Used as parameter of the prepareCreate(..), create(..), load(..), store(..) functions in the process service.
  • Importation in Form: Load and Store events of FormHandler:
    • exportFormData()
    • service call (depending of the action exectuted with the ProcessService)
    • importFormData()

Access

Note.png
TODO
Add a description and example of how to access to a value, how to know if a value was set


Generation

SDK Support

Note.png
TODO
Add a screenshot


FormData anotation

  • A obj.pngFormData FormData annotation
    • Is needed on the form Class

Structure of a FormData

The FormData depends from the Form it contains the data. The SDK generate:

  • For each ValueField a AbstractValueFieldData<T> is generated.
  • For each TableField a TableData is generated.
  • For each form-variable an AbstractPropertyData<T>

The inner-class structure from the composite field (like groupboxes) get lost, unless Group-Box templates are used.

The value fields properties (getConfiguredMandatory(), getConfiguredMaxValue(), getConfiguredMaxLength()...) are mapped to ValidationRules conatained in the formData. Those rules are used to redo the basic UI client-side validations on the server.

See Also

Copyright © Eclipse Foundation, Inc. All Rights Reserved.