Skip to content

Commit

Permalink
added docs for Domino-UI-v2 & Elemento plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHossfeld committed Oct 13, 2024
1 parent 17647cd commit 64d0968
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy-wiki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - uses: actions4gh/configure-wiki@v1
- uses: actions4gh/deploy-wiki@v1
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
70 changes: 69 additions & 1 deletion wiki/04.-Nalu-Processor-Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,44 @@ The methods of the `ÌsPlugin`-interface are:

Currently, there are two existing plugins:

* an Elemental2 plugin for widgets sets based on `HTMLElement`
* a Domino-UI (Version 2) Plugin for widget sets based on `org.dominokit.domino.ui.IsElement`
* an Elemental2 plugin for widget sets based on `HTMLElement`
* an Elemento plugin for widget sets based on `HTMLElement` or `IsElement`
* a GWT plugin for widget sets based on GWT `Widget`

## Domino-UI (Version 2) based Widget Sets
In case your widget set is based on Domino-UI (Version 2), you should use, the `nalu-plugin-domino-v2`.

### Configure the Application
To use the plugin, you have to add the following lines to your pom:
```XML
<dependency>
<groupId>com.github.nalukit</groupId>
<artifactId>nalu-plugin-domino-v2</artifactId>
<version>LATEST</version>
</dependency>
```

### Using the plugin
To tell Nalu, that the application is using the Domino-UI-V2 plugin, you have to create the plugin and use the instance as a parameter of the run method:

```Java

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 NaluPluginDominoV2());
}
}
```

To define a node of the DOM as an extension point where children can be added, just set an id using the `id`-attribute. The selector attribute inside the `@Controller`-annotation will be used to look for a node inside the DOM with the selector value as id. Once the node is found, all children of the node will be removed and the new child added.

## Elemental2 based Widget Sets
In case your widget set is based on Elemental2, you have to use, the `nalu-plugin-elemental2`.

Expand Down Expand Up @@ -115,6 +150,39 @@ public class Application

To define a node of the DOM as an extension point where children can be added, just set an id using the `id`-attribute. The selector attribute inside the `@Controller`-annotation will be used to look for a node inside the DOM with the selector value as id. Once the node is found, all children of the node will be removed and the new child added.

## Elemeno based Widget Sets
In case your widget set is based on Elemental2, you have to use, the `nalu-plugin-elemento`.

### Configure the Application
To use the plugin, you have to add the following lines to your pom:
```XML
<dependency>
<groupId>com.github.nalukit</groupId>
<artifactId>nalu-plugin-elemento</artifactId>
<version>LATEST</version>
</dependency>
```

### Using the plugin
To tell Nalu, that the application is using the Elemento plugin, you have to create the plugin and use the instance as a parameter of the run method:

```Java

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 NaluPluginElemento());
}
}
```

To define a node of the DOM as an extension point where children can be added, just set an id using the `id`-attribute. The selector attribute inside the `@Controller`-annotation will be used to look for a node inside the DOM with the selector value as id. Once the node is found, all children of the node will be removed and the new child added.


## GWT based Widget Sets
In case your widget set is based on the GWT `Widget`-class, you have to use, the `nalu-plugin-gwt`.
Expand Down

0 comments on commit 64d0968

Please sign in to comment.