-
Notifications
You must be signed in to change notification settings - Fork 5
/
HtmlApp.java
37 lines (29 loc) · 940 Bytes
/
HtmlApp.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package org.genericsystem.reactor.html;
import org.genericsystem.reactor.HtmlDomNode;
import org.genericsystem.reactor.Model;
import org.genericsystem.reactor.ViewContext.RootViewContext;
import org.genericsystem.reactor.appserver.PersistentApplication.App;
import io.vertx.core.http.ServerWebSocket;
/**
* @author Nicolas Feybesse
*
*/
public abstract class HtmlApp<M extends Model> extends HtmlSection<M> implements App<M> {
private RootViewContext<M> rootViewContext;
public HtmlApp() {
super(null);
}
@Override
public HtmlApp<M> init(M rootModelContext, String rootId, ServerWebSocket webSocket) {
rootViewContext = new RootViewContext<M>(rootModelContext, this, rootId, webSocket);
return this;
}
@Override
public HtmlDomNode getNodeById(String id) {
return rootViewContext.getNodeById(id);
}
@Override
protected HtmlDomNode createNode(String parentId) {
throw new UnsupportedOperationException();
}
}