/** The registered toadlets. */
private final List<PageToadlet> pageToadlets = new ArrayList<PageToadlet>();
+ /** The form password. */
+ private final String formPassword;
+
/**
* Creates a new web interface.
*
public WebInterface(SonePlugin sonePlugin) {
super("Sone Web Interface", false);
this.sonePlugin = sonePlugin;
+ formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();
}
//
}
}
+ /**
+ * Returns the node’s form password.
+ *
+ * @return The form password
+ */
+ public String formPassword() {
+ return formPassword;
+ }
+
//
// SERVICE METHODS
//
templateFactory.addPlugin("getpage", new GetPagePlugin());
templateFactory.addPlugin("paginate", new PaginationPlugin());
templateFactory.setTemplateProvider(new ClassPathTemplateProvider(templateFactory));
- templateFactory.addTemplateObject("formPassword", sonePlugin.pluginRespirator().getToadletContainer().getFormPassword());
+ templateFactory.addTemplateObject("formPassword", formPassword);
Template loginTemplate = templateFactory.createTemplate(createReader("/templates/login.html"));
Template indexTemplate = templateFactory.createTemplate(createReader("/templates/index.html"));