-
Notifications
You must be signed in to change notification settings - Fork 5
/
QuizSelect.java
39 lines (33 loc) · 1.27 KB
/
QuizSelect.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
38
39
package org.genericsystem.quiz.components;
import org.genericsystem.quiz.components.QuizAppPage.QuizChoice;
import org.genericsystem.quiz.model.Quiz;
import org.genericsystem.reactor.annotations.BindText;
import org.genericsystem.reactor.annotations.Children;
import org.genericsystem.reactor.annotations.DirectSelect;
import org.genericsystem.reactor.annotations.ForEach;
import org.genericsystem.reactor.context.ObservableListExtractor;
import org.genericsystem.reactor.contextproperties.SelectionDefaults;
import org.genericsystem.reactor.gscomponents.HtmlTag.HtmlButton;
import org.genericsystem.reactor.gscomponents.HtmlTag.HtmlDiv;
@Children(QuizChoice.class)
public class QuizAppPage extends HtmlDiv {
@Children(QuizButton.class)
@DirectSelect(Quiz.class)
public static class QuizChoice extends HtmlDiv implements SelectionDefaults {
// @Override
// public void init() {
// addPrefixBinding(context -> {
// Property<Boolean> property = getProperty("QuizDone", context);
// if (property == null)
// createNewInitializedProperty("QuizDone", c -> false);
// else
// property.setValue(false);
// });
// }
}
@ForEach(ObservableListExtractor.SUBINSTANCES.class)
@BindText
// @BindAction(SET_SELECTION.class)
public static class QuizButton extends HtmlButton {
}
}