Hi Sudipto, > I was thinking in the same way today, about having my own > HTMLComponentFactory and WebController classes. In fact, by extending the > WebController class I can change any of the actions, say I want to change > the Welcome page, then overriding the init() method of WebController I can > do the needful. And extending the HTMLComponentFactory class I can add my > own components. I actually made a few changes and it worked out.
Excellent. It is good that you're playing with the framework like this. > So it seems we are on the same page. Please let me know once you > commit such changes. I have created a JIRA ticket for this [1], and I will commit the changes against it. Done! Revision 1340026 > I am going on a long holiday after today. Once I get back, I will > catch up. Enjoy! Regards, Kevin [1] https://issues.apache.org/jira/browse/ISIS-226 > > Thanks, > Sudipto. > > On Fri, May 18, 2012 at 12:44 PM, Kevin Meyer - KMZ <[email protected]> wrote: > > > Hi Sudipto, > > > > Sorry - I dropped this one - I meant to reply to you earlier. > > > > But you have already done what I had to do, albeit slightly differently. I > > wrote my own logon servlet and controller servlet by extending > > LogonServlet and ControllerServlet, respectively, and specifying them > > in the web.xml file (, editting "<servlet-name>Logon</servlet-name>" > > and "<servlet-name>Controller</servlet-name>", respectively). > > > > I also had to make minor mods to, I think, the getters: > > > > @Override > > protected WebController getWebController(PathBuilder pathBuilder) > > { > > return new SaipWebController(pathBuilder); > > } > > > > // ////////////////////////////////////////////////////////////////// > > // doGet, doPost > > // ////////////////////////////////////////////////////////////////// > > > > @Override > > protected HtmlComponentFactory getHtmlComponentFactory() { > > return new SaipHtmlComponentFactory(getPathBuilder()); > > } > > > > > > I have not committed those changes, it seems. > > > > > > In the "SaipHtmlComponentFactory", I could provide any of my own > > components, as required: > > > > @Override > > public LogonFormPage createLogonPage(final String user, final String > > password, boolean registerLink, String error) { > > return new SaipLogonFormPage(pathBuilder, styleSheet, header, > > footer, user, password, registerLink, error); > > } > > > > @Override > > public Component createInlineBlock(String style, String text, String > > description) { > > return new SaipSpan(style, text, description, false); > > } > > > > public Component createSaipBlock(String style, String text, String > > description) { > > return new SaipSpan(style, text, description, true); > > } > > > > public Component createFile(String style, String description, String > > fileName) { > > return new SaipFileHtml(style, description, fileName); > > } > > > > > > Where Saip* are my custom classes. > > > > > > Regards, > > Kevin
