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 "EDT:Tutorial: RUI With DataBase Lesson 5"
(→Create a Service part) |
|||
Line 5: | Line 5: | ||
|[[EDT:Tutorial: RUI With DataBase Lesson 4|< Previous]] | [[EDT:Tutorial: RUI With DataBase Lesson 6|Next >]] | |[[EDT:Tutorial: RUI With DataBase Lesson 4|< Previous]] | [[EDT:Tutorial: RUI With DataBase Lesson 6|Next >]] | ||
|} | |} | ||
− | = Lesson 5: Create the service = | + | = Lesson 5: Create the service = |
− | Create a dedicated service to access the database. | + | Create a dedicated service to access the database. |
− | In this lesson, you create an EGL Service | + | In this lesson, you create an EGL Service type, which is a main type. You must place each main type in a separate source file, and the name of the type must be the same as the name of the file. |
− | is a | + | |
− | source file, and the name of the | + | |
− | of the file. | + | |
− | == Create a Service | + | == Create a Service type == |
− | To create a Service | + | To create a Service type: |
− | + | #In the Project Explorer window, right-click '''PaymentService''', and then click '''New''' > '''Service'''. | |
− | and then click '''New''' > '''Service'''. | + | #In the New EGL Service window, enter the following information: |
− | + | ##In the '''EGL source file name''' field, enter name '''SQLService'''. EGL adds the .egl file extension automatically. | |
− | enter the following information: | + | ##In the '''Package''' field, enter the name '''services'''. |
+ | ##Verify that '''Create as web (EGL REST-RPC) service''' is unchecked, and leave the '''Interfaces to implement''' field empty.<br>[[Image:EDT Tutorial edt richui sql04 new sql service.jpg|The New EGL Service Part window shows the service name and package.]] | ||
+ | #Click '''Finish'''. EGL opens the new Service type in the editor. | ||
+ | #Remove the code from the file, leaving only the following lines, and save the file, but do not close it. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
package services; | package services; | ||
Line 46: | Line 29: | ||
end | end | ||
− | == Lesson checkpoint == | + | == Lesson checkpoint == |
− | You learned how to create an EGL Service | + | You learned how to create an EGL Service type. |
− | In | + | In the next lesson, you add code for the functions to '''SQLService'''. |
− | the next lesson, you add code for the functions to '''SQLService'''. | + | |
+ | <br>'''Related reference '''<br> | ||
− | + | *Help topic: Services: a top-level overview<br> | |
− | + | <br> | |
− | + | {| style="float: right" class="FCK__ShowTableBorders" | |
− | {| style="float: right" | + | |- |
− | |[[EDT:Tutorial: RUI With DataBase Lesson 4|< Previous]] | + | | [[EDT:Tutorial: RUI With DataBase Lesson 4|< Previous]] | [[EDT:Tutorial: RUI With DataBase Lesson 6|Next >]] |
|} | |} | ||
− | |||
[[Category:EDT]] | [[Category:EDT]] |
Revision as of 17:55, 6 December 2011
Access a database with EGL Rich UI
< Previous | Next > |
Lesson 5: Create the service
Create a dedicated service to access the database.
In this lesson, you create an EGL Service type, which is a main type. You must place each main type in a separate source file, and the name of the type must be the same as the name of the file.
Create a Service type
To create a Service type:
- In the Project Explorer window, right-click PaymentService, and then click New > Service.
- In the New EGL Service window, enter the following information:
- Click Finish. EGL opens the new Service type in the editor.
- Remove the code from the file, leaving only the following lines, and save the file, but do not close it.
package services; service SQLService end
Lesson checkpoint
You learned how to create an EGL Service type.
In the next lesson, you add code for the functions to SQLService.
Related reference
- Help topic: Services: a top-level overview
< Previous | Next > |