Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Scout/HowTo/4.0/Creating a template"

< Scout‎ | HowTo‎ | 4.0
(Created page with "{{ScoutPage|cat=HowTo 4.0}} This how-to describes how to create and use a template = Creating the template<br> = #Create a GroupBox in a form #Add form fields to the Gro...")
 
m
Line 8: Line 8:
 
#Add form fields to the GroupBox and set their properties<br> [[Image:TemplateCreationGroupBox.png]]<br>[[Image:TemplateCreationFields.png]]
 
#Add form fields to the GroupBox and set their properties<br> [[Image:TemplateCreationGroupBox.png]]<br>[[Image:TemplateCreationFields.png]]
 
#Right click on the GroupBox and choose "Create template..."<br> [[Image:TemplateCreationCreateTemplate.png]]
 
#Right click on the GroupBox and choose "Create template..."<br> [[Image:TemplateCreationCreateTemplate.png]]
#Define the template name (or accept the default proposal)<br>Make sure the two checkboxes are selected<br> [[Image:TemplateCreationTemplateName.png]]
+
#Define the template name (or accept the default proposal)<br>Make sure the two checkboxes are selected<br> [[Image:TemplateCreationTemplateName4.0.PNG]]
  
  

Revision as of 09:21, 9 May 2014

The Scout documentation has been moved to https://eclipsescout.github.io/.

This how-to describes how to create and use a template

Creating the template

  1. Create a GroupBox in a form
  2. Add form fields to the GroupBox and set their properties
    TemplateCreationGroupBox.png
    TemplateCreationFields.png
  3. Right click on the GroupBox and choose "Create template..."
    TemplateCreationCreateTemplate.png
  4. Define the template name (or accept the default proposal)
    Make sure the two checkboxes are selected
    TemplateCreationTemplateName4.0.PNG


Using the template

The new template should now be listed under the Templates section in the client sub-project:

TemplateCreationTemplateList.png

When adding new form fields, the new field should now be available:

TemplateCreationUsingTemplate.png

In order to access the fields of a template in an SQL statement, use dot-notation (access to the fields works, even if auto-completion does not).

   SQL.selectInto("SELECT STREET, STREET2, ZIP, TOWN " +
                 "FROM ADDRESS " +
                 "WHERE ADDRESS_NO = :addressNo " +
                 "INTO :addressBox.street, :addressBox.street2, :addressBox.plz, :addressBox.town ",
                 formData);

Back to the top