Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Scout/Tutorial/3.8/Minicrm/Minicrm Step-by-Step"
m |
(→Code Types: typos) |
||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ScoutPage|cat=Tutorial 3.8}} | {{ScoutPage|cat=Tutorial 3.8}} | ||
'''Mini CRM Tutorial''' | '''Mini CRM Tutorial''' | ||
− | |||
− | |||
With this tutorial, you'll create a little example application with {{ScoutLink|SDK|name=Scout SDK}}, where you can enter and edit companies. | With this tutorial, you'll create a little example application with {{ScoutLink|SDK|name=Scout SDK}}, where you can enter and edit companies. | ||
== Requirements == | == Requirements == | ||
− | This tutorial assumes that you have installed Scout SDK as described in {{ScoutLink|HowTo|Install Scout SDK|Download and Install Scout SDK}} | + | This tutorial assumes that you have installed Scout SDK as described in {{ScoutLink|HowTo/3.8|Install Scout SDK|Download and Install Scout SDK}}. |
== Create New Scout Project == | == Create New Scout Project == | ||
Creating new scout projects is described | Creating new scout projects is described | ||
− | {{ | + | [[{{BASEPAGENAME}}/New_Eclipse_Scout_Project|here]]. That page also shows how to launch the server and the client. |
== Get example Database == | == Get example Database == | ||
− | Follow the instructions on {{ | + | Follow the instructions on [[{{BASEPAGENAME}}/Get_example_database|this page]] to get our small Apache Derby example database. |
== Set up SQL Service == | == Set up SQL Service == | ||
− | Now we need to tell the application how to contact the database. How this works is described {{ | + | Now we need to tell the application how to contact the database. How this works is described [[{{BASEPAGENAME}}/Set_up_SQL_Service|here]]. |
== Write the first Page == | == Write the first Page == | ||
− | A standard Eclipse Scout application consists of pages in a tree structure. A page typically shows data in some sort of table. If you write an application, you need to start with a page. {{ | + | A standard Eclipse Scout application consists of pages in a tree structure. A page typically shows data in some sort of table. If you write an application, you need to start with a page. [[{{BASEPAGENAME}}/Write_the_first_page|Learn more]] |
You should have a tiny Eclipse Scout application running at the end of this step! | You should have a tiny Eclipse Scout application running at the end of this step! | ||
Line 34: | Line 32: | ||
== Add a search form == | == Add a search form == | ||
We created a page with a table listing all the companies in the database. Add a search form that allows users to limit the number of rows returned. | We created a page with a table listing all the companies in the database. Add a search form that allows users to limit the number of rows returned. | ||
− | {{ | + | [[{{BASEPAGENAME}}/Add_a_search_form|Learn more]] |
== Add a form to edit the data == | == Add a form to edit the data == | ||
− | In order to edit the data in our page, we need to create a context menu to call a form, create the form and the process service it needs to actually select, insert, update (and possibly delete) the data. {{ | + | In order to edit the data in our page, we need to create a context menu to call a form, create the form and the process service it needs to actually select, insert, update (and possibly delete) the data. [[{{BASEPAGENAME}}/Add_a_form_to_edit_the_data|Learn more]] |
== Write the second page == | == Write the second page == | ||
− | We wrote the company table page, now let's write a top-level person table page. Once we have that, we want to '''reuse the table page''' by also using it as a child page for a company. {{ | + | We wrote the company table page, now let's write a top-level person table page. Once we have that, we want to '''reuse the table page''' by also using it as a child page for a company. [[{{BASEPAGENAME}}/Write_the_second_page|Learn more]] |
You will end up with the following tree structure for your application: | You will end up with the following tree structure for your application: | ||
Line 55: | Line 53: | ||
== Reorganize the tree == | == Reorganize the tree == | ||
− | We want to add an additional | + | We want to add an additional node under the ''companies table page''. This will require us to add a '''page with nodes''' and [[{{BASEPAGENAME}}/Reorganize_the_tree|reorganize the tree a bit]]. |
When we're done, the result should look as follows: | When we're done, the result should look as follows: | ||
Line 72: | Line 70: | ||
Each Code Types provides a list of values in order to fill up elements like Smart Fields or List Boxes. | Each Code Types provides a list of values in order to fill up elements like Smart Fields or List Boxes. | ||
− | In a next step we want to divide the companies into two groups: suppliers and customers. When the company is | + | In a next step we want to divide the companies in a relation to our company into two groups: suppliers and customers. When the related company is our company's customer, a Smart Field with ratings between A and D should appear. Let's create two Code Types and add some behaviour to the CompanyForm and ProcessServices. [[{{BASEPAGENAME}}/Code_Types|Learn more]] |
== Lookup Calls and Lookup Services == | == Lookup Calls and Lookup Services == | ||
− | In the previous chapter we have seen how to fill smartfields with an enumerated list of codes that were based on a code type. However, sometimes you need a smartfield (or listbox) with dynamically calculated entries that are based on the data in your database (e.g. a smartfield that allows selecting a person or company). This chapter shows how to accomplish this by implementing a so called Lookup Call and a corresponding Lookup Service. {{ | + | In the previous chapter we have seen how to fill smartfields with an enumerated list of codes that were based on a code type. However, sometimes you need a smartfield (or listbox) with dynamically calculated entries that are based on the data in your database (e.g. a smartfield that allows selecting a person or company). This chapter shows how to accomplish this by implementing a so called Lookup Call and a corresponding Lookup Service. [[{{BASEPAGENAME}}/Lookup_Calls_and_Lookup_Services|Learn more]] |
Latest revision as of 05:35, 19 April 2013
The Scout documentation has been moved to https://eclipsescout.github.io/. Mini CRM Tutorial
With this tutorial, you'll create a little example application with The Scout documentation has been moved to https://eclipsescout.github.io/., where you can enter and edit companies.
Contents
Requirements
This tutorial assumes that you have installed Scout SDK as described in The Scout documentation has been moved to https://eclipsescout.github.io/..
Create New Scout Project
Creating new scout projects is described here. That page also shows how to launch the server and the client.
Get example Database
Follow the instructions on this page to get our small Apache Derby example database.
Set up SQL Service
Now we need to tell the application how to contact the database. How this works is described here.
Write the first Page
A standard Eclipse Scout application consists of pages in a tree structure. A page typically shows data in some sort of table. If you write an application, you need to start with a page. Learn more
You should have a tiny Eclipse Scout application running at the end of this step!
You will end up with the following tree structure for your application:
Standard Outline │ └─Company Table Page
Very simple indeed!
Add a search form
We created a page with a table listing all the companies in the database. Add a search form that allows users to limit the number of rows returned. Learn more
Add a form to edit the data
In order to edit the data in our page, we need to create a context menu to call a form, create the form and the process service it needs to actually select, insert, update (and possibly delete) the data. Learn more
Write the second page
We wrote the company table page, now let's write a top-level person table page. Once we have that, we want to reuse the table page by also using it as a child page for a company. Learn more
You will end up with the following tree structure for your application:
Standard Outline │ ├─Company Table Page │ │ │ └─Person Table Page │ └─Person Table Page
Reorganize the tree
We want to add an additional node under the companies table page. This will require us to add a page with nodes and reorganize the tree a bit.
When we're done, the result should look as follows:
Standard Outline │ ├─Company Table Page │ │ │ └─Company Details Node Page ← new │ │ │ └─Person Table Page │ └─Person Table Page
Code Types
Each Code Types provides a list of values in order to fill up elements like Smart Fields or List Boxes.
In a next step we want to divide the companies in a relation to our company into two groups: suppliers and customers. When the related company is our company's customer, a Smart Field with ratings between A and D should appear. Let's create two Code Types and add some behaviour to the CompanyForm and ProcessServices. Learn more
Lookup Calls and Lookup Services
In the previous chapter we have seen how to fill smartfields with an enumerated list of codes that were based on a code type. However, sometimes you need a smartfield (or listbox) with dynamically calculated entries that are based on the data in your database (e.g. a smartfield that allows selecting a person or company). This chapter shows how to accomplish this by implementing a so called Lookup Call and a corresponding Lookup Service. Learn more