Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Simple db application with Scout and Oracle Database 11g Express edition(Newbie needs help)
icon5.gif  Simple db application with Scout and Oracle Database 11g Express edition [message #1390285] Sun, 29 June 2014 06:18 Go to next message
Davor Pečnik is currently offline Davor PečnikFriend
Messages: 6
Registered: June 2014
Junior Member
Hi there!

I'm new with scout and java, so i'm searching for some good tutorial how to:
- Connect Scout with Oracle Database 11g Express Edition on localhost
- Make one simple form
- Populate form with data from Database

I hope you guys can provide me with some good links or solutions how would you approach to that problem.

Regards
Re: Simple db application with Scout and Oracle Database 11g Express edition [message #1390883 is a reply to message #1390285] Mon, 30 June 2014 06:10 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Davor,

glad you are interested in using Scout.

First of all I would recommend our tutorials.

We have a pretty good example, called minicrm, where you will also deal with a database and sql (it is a derby database, but using oracle 11g instead should be straight forward)

We also have started to write a book which is worth having a look into.

If you have any questions about Scout please let us know, we are happy to help.

Best regards,
Matthias
Re: Simple db application with Scout and Oracle Database 11g Express edition [message #1390944 is a reply to message #1390285] Mon, 30 June 2014 08:00 Go to previous messageGo to next message
Davor Pečnik is currently offline Davor PečnikFriend
Messages: 6
Registered: June 2014
Junior Member
Ok i figured out how to connect with oracle DB.
Now i have started reading a book.
Ok thank you for your advice!

[Updated on: Mon, 30 June 2014 09:07]

Report message to a moderator

Re: Simple db application with Scout and Oracle Database 11g Express edition [message #1391138 is a reply to message #1390944] Mon, 30 June 2014 13:55 Go to previous message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Davor,

basically I would create a new Service, e.g. "MyService" using the SDK:
index.php/fa/18414/0/

Afterwards, I would add a Service method to the new Service. Here you can use the SDK as well:
index.php/fa/18416/0/

This means, your Service has now a method "getVersion()" which shall return the version from the Server:
public interface IMyService extends IService {

  /**
   * @return
   * @throws org.eclipse.scout.commons.exception.ProcessingException
   */
  String getVersion() throws ProcessingException;
}


Now, you have to write the implementation of this method:
public class MyService extends AbstractService implements IMyService {

  @Override
  public String getVersion() throws ProcessingException {
    String version = "This String will be sent to the Client! Calculate the String from the SQL Service!";
    return version;
  }
}

This simply returns a hard-coded string. Here you need to use your SQLService instead.

On the client, when I press the update Button I can update the textField now:

    @Order(20.0)
    public class UpdateButton extends AbstractButton {

      @Override
      protected String getConfiguredLabel() {
        return TEXTS.get("Update");
      }

      @Override
      protected void execClickAction() throws ProcessingException {
        String dbVersion = SERVICES.getService(IMyService.class).getVersion();
        getVersionField().setValue(dbVersion);
      }
    }
  }


And this is how it looks like on my side:
index.php/fa/18417/0/

Do not hesitate to contact me in case you have questions.

Best regards,
Matthias
  • Attachment: MyService.png
    (Size: 25.75KB, Downloaded 428 times)
  • Attachment: new_method.png
    (Size: 26.55KB, Downloaded 444 times)
  • Attachment: result.png
    (Size: 7.08KB, Downloaded 444 times)
Previous Topic:Luna Error displaying any visual mode
Next Topic:Migration to Luna
Goto Forum:
  


Current Time: Fri Apr 26 08:12:48 GMT 2024

Powered by FUDForum. Page generated in 0.02859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top