01: package org.araneaframework.example.main.release.features;
02:
03: import org.araneaframework.example.main.TemplateBaseWidget;
04: import org.araneaframework.example.main.web.demo.DemoComplexForm;
05:
06: /**
07: * @author Taimo Peelo
08: */
09: public class EasyAJAXUpdateRegionsWidget extends TemplateBaseWidget {
10: protected void init() throws Exception {
11: addWidget("1", new EasyAjaxDemoWidget(
12: "release/features/easyAjax/HttpRequest",
13: "Complex_Form_HTTP"));
14: addWidget("2", new EasyAjaxDemoWidget(
15: "release/features/easyAjax/XMLHttpRequest",
16: "Complex_Form"));
17: setViewSelector("release/features/easyAjax/easyAjaxUpdateRegions");
18: }
19:
20: private static class EasyAjaxDemoWidget extends DemoComplexForm {
21: private String customViewSelector;
22: private String label;
23:
24: public EasyAjaxDemoWidget(String customViewSelector,
25: String label) {
26: this .customViewSelector = customViewSelector;
27: this .label = label;
28: }
29:
30: protected void init() throws Exception {
31: super .init();
32: setViewSelector(customViewSelector);
33: putViewData("formLabel", label);
34: }
35: }
36: }
|