Welcome to the Rialto-GWT Getting Started guide !

Here you will learn how to create a simple HelloWorld application using Rialto-GWT.

The first step you have to do is downloading the lastest version of the Google Web Toolkit and creating a new gwt project. (If you are not familiar with GWT, please take a look at the GWT Tutorial.)

Create a module called HelloWorld in the package fr.improve.rialto.gwt.sample.gettingStarted
Then, your HelloWorld.gwt.xml file must be like that :

<module>
  <!-- Inherit the core Web Toolkit stuff. -->
  <inherits name="com.google.gwt.user.User"/>
 
  <!-- Specify the app entry point class. -->
  <entry-point class="fr.improve.rialto.gwt.sample.client.HelloWorld"/>
 
</module>

And your HelloWorld.html file like that :

<html>
  <head>
    <title>Rialto-GWT HelloWorld Appli</title>
    <style>
      body,td,a,div,.p{font-family:arial,sans-serif}
      div,td{color:#000000}
      a:link,.w,.w a:link{color:#0000cc}
      a:visited{color:#551a8b}
      a:active{color:#ff0000}
    </style>
    <script language='javascript' src='fr.improve.rialto.gwt.sample.gettingStarted.HelloWorld.nocache.js'></script>
  </head>
 
  <body>
    <!-- OPTIONAL: include this if you want history support -->
    <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
  </body>
</html>


In the next step, you will add and configure the Rialto-GWT stuffs :
Download the lastest version of Rialto, extract the archive and copy the rialtoEngine folder in the public folder of your project.
Download the Rialto-GWT jar and put a reference to this archive in the build path.

Now, include the Rialto-GWT tools on your project.
To do so open your HelloWorld.gwt.xml file and copy these lines :

  <!-- Inherit the Rialto-GWT core.                   -->
  <inherits name="fr.improve.rialto.gwt.core.Rialto"/>
 
  <!-- Load rialto script 		                  -->
  <script src="rialtoEngine/javascript/rialto.js"/>
  <stylesheet src="rialtoEngine/style/defaultSkin.css"/>

For the third (and last) step, you will create your first Rialto-GWT page. Open the HelloWorld.java file and add this lines :

package fr.improve.rialto.gwt.sample.gettingStarted.client;
 
import com.google.gwt.core.client.EntryPoint;
 
import fr.improve.rialto.gwt.core.client.ui.basic.Label;
import fr.improve.rialto.gwt.core.client.ui.panel.RialtoRootPanel;
import fr.improve.rialto.gwt.core.client.ui.panel.SimpleWindow;
 
public class HelloWorld implements EntryPoint {
 
  public void onModuleLoad() {
    SimpleWindow simpleWindow = new SimpleWindow("My First Rialto-GWT Frame");
    simpleWindow.add(new Label("Hello World !"));
    RialtoRootPanel.get().add(simpleWindow);
  }
 
}


Now you can run your application.

For more sample code, please visite the Rialto-GWT Demo.

gwt/getstart.txt · Last modified: 2008/09/12 11:25 by administrator
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0