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/3.9/Create a minimal Standalone Client"

< Scout‎ | HowTo‎ | 3.9
(Update the ClientSession and remove the Bookmarks menu)
(Remove the DesktopService from the Server and add it to the Client)
Line 28: Line 28:
 
There, use the context menu '''New Client Service ...''' on folder '''Services'''.
 
There, use the context menu '''New Client Service ...''' on folder '''Services'''.
 
In the new service wizard, enter ''DesktopService'' into the field '''Class Name''' and click '''Next'''.
 
In the new service wizard, enter ''DesktopService'' into the field '''Class Name''' and click '''Next'''.
In the second wizard step, deselct the element ''IDesktopService'' under the orange client node (from before, we already have the IDesktopService in the shared plugin of our application).
+
In the second wizard step, deselect the element ''IDesktopService'' under the orange client node (from before, we already have the IDesktopService in the shared plugin of our application).
 +
 
 +
After the client service creation double click on the ''DesktopService'' to open its implementation in the Java editor.
 +
There, change the implementation statement from ''IService'' to ''IDesktopService''
 +
This will mark the class name ''DesktopService'' with an error marker.
 +
From the proposed fixes choose '''add unimplemented methods''' to add the ''load'' method which you can update back to what you had from the hello world tutorial to
 +
 
 +
  @Override
 +
  public DesktopFormData load(DesktopFormData formData) {
 +
    formData.getMessage().setValue("Hello World!");
 +
    return formData;
 +
  }

Revision as of 07:35, 19 November 2013

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

A common Scout application typically consists of a client part (front end) and a server part (back end). But what if you just need a minimal client application? This How-to guides you through the necessary steps to get there. At the end you will have a client-only "Hello World!" application.


Initial Project Setup

Before you proceed, go through the standard client server Scout The Scout documentation has been moved to https://eclipsescout.github.io/. tutorial.

Update the ClientSession and remove the Bookmarks menu

In the Scout Explorer, double click the ClientSession node and in method execLoadSession remove the setting up of to the service tunnel and the fetching of the code types. The resulting method will then be:

 @Override
 public void execLoadSession() throws ProcessingException {
   setDesktop(new Desktop());
 }

The next step is to remove the bookmarks menu entry. For this navigate in the Scout Explorer to the orange client node and expand the Desktop node under it. Then, expand the Menus folder and delete the BookmarkMenu menu entry using the context menu Delete ....

Remove the DesktopService from the Server and add it to the Client

First, remove the DesktopService from the Scout server plugin. For this, expand the blue server node and the underlying folder Services and select the contextmenu Delete ... on the entry DesktopService. In the proposal box deselect the item IDesktopService in the shared plugin of the application and click Ok.

Now switch to orange client node. There, use the context menu New Client Service ... on folder Services. In the new service wizard, enter DesktopService into the field Class Name and click Next. In the second wizard step, deselect the element IDesktopService under the orange client node (from before, we already have the IDesktopService in the shared plugin of our application).

After the client service creation double click on the DesktopService to open its implementation in the Java editor. There, change the implementation statement from IService to IDesktopService This will mark the class name DesktopService with an error marker. From the proposed fixes choose add unimplemented methods to add the load method which you can update back to what you had from the hello world tutorial to

 @Override
 public DesktopFormData load(DesktopFormData formData) {
   formData.getMessage().setValue("Hello World!");
   return formData;
 }

Back to the top