- TemplateFactory templateFactory = new SoneTemplateFactory(l10n());
- String formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();
+ DefaultTemplateFactory templateFactory = new DefaultTemplateFactory();
+ templateFactory.addAccessor(Object.class, new ReflectionAccessor());
+ templateFactory.addAccessor(Sone.class, new SoneAccessor(core()));
+ templateFactory.addAccessor(Post.class, new PostAccessor(core()));
+ templateFactory.addFilter("date", new DateFilter());
+ templateFactory.addFilter("l10n", new L10nFilter(l10n()));
+ templateFactory.addFilter("substring", new SubstringFilter());
+ templateFactory.addFilter("xml", new XmlFilter());
+ templateFactory.addFilter("change", new RequestChangeFilter());
+ templateFactory.addPlugin("getpage", new GetPagePlugin());
+ templateFactory.addPlugin("paginate", new PaginationPlugin());
+ templateFactory.setTemplateProvider(new ClassPathTemplateProvider(templateFactory));
+ templateFactory.addTemplateObject("formPassword", formPassword);