Getting started
To use Nalu in your project you have to do these basic steps.
Module Descriptor
GWT 2
First we need to tell GWT to use the Nalu module. To do so, insert the Nalu module into your module descriptor:
<inherits name='io.github.nalukit.nalu.Nalu'/>
Depending on the widget lib you are using inside your project, you need to add one of the following lines:
- in case working with an Elemental2 based widget lib (for example: Elemento, Domino-UI) use:
<inherits name='io.github.nalukit.nalu.plugin.elemental2.NaluPluginElemental2'/>
- in case working with a GWT widget based library (for example: native GWT, Sencha GXT, Smart-GWT) use:
<inherits name='io.github.nalukit.nalu.plugin.gwt.NaluPluginGWT'/>
- in case working with Elemento use:
<inherits name='io.github.nalukit.nalu.plugin.elemento.NaluPluginElemento'/>
- in case working with Domino-UI (Version 2) use:
<inherits name='io.github.nalukit.nalu.plugin.domino.v2.NaluPluginDominoV2'/>
Last but not least, we need to set up the entry point of our application:
<entrypoint class='[path to your entrypoint]'/>
J2CL
To Be done
Implement the entry point
GWT 2
First we need to implement the EntryPoint. An entry point in Nalu looks like that:
public class Application
implements EntryPoint {
public void onModuleLoad() {
// Create the application.
// The ApplicationImpl-class
// will be generated by the framework.
MyApplication application = new MyApplicationImpl();
// start the application by calling the run()-method.
application.run(new NaluPluginGWT());
}
}
When using this code, you will recognize that MyApplication and MyApplicationImpl is marked as error, because the classes do not exist. This is correct. We will discuss the MyApplication-class next and the MyApplicationImpl-class will be created, once you build your project.
Note
There is a pitfall: the run-method requires a Nalu plugin.
- in case working with an Elemental2 based widget lib (for example: Elemento, Domino-UI) use:
application.run(new NaluPluginElemental2());
- in case working with a GWT widget based library (for example: native GWT, Sencha GXT, Smart-GWT) use:
application.run(new NaluPluginGWT());
Choosing the right plugin is essential!
J2CL
To Be done
This page is generated from the Nalu wiki. The wiki is the source of the text.