public class StaticPage extends Page implements IMarkupResourceStreamProvider, IMarkupCacheKeyProvider {
private String staticPageFilename; public StaticPage(String staticPageFilename) { super(); this.staticPageFilename = staticPageFilename; } @Override public String getCacheKey(MarkupContainer container, Class<?> containerClass) { return staticPageFilename; } @Override public IResourceStream getMarkupResourceStream(MarkupContainer container, Class<?> containerClass) { String html = getFileAsString(staticPageFilename); //modify html if necessary return new StringResourceStream(html); } } On 11/01/14 06:11, Paul Bors wrote: > I'm not following, you want to show 200 static HTML pages in your webapp? > > Your webapp must be running on top of a web server, why not just let the > web server server the static content? > What's the dynamic part of those 200 static HTML pages? > Do you need to authenticate the user first or something before they can > view the static content? > > > On Fri, Jan 10, 2014 at 12:23 PM, andre seame <andre1...@hotmail.fr> wrote: > >> >> Hello, >> >> >> >> I >> have a wicket site to manage different points on the project. I receive 200 >> HTML pages for the developer teams. These pages are "javadoc" pages. >> >> I >> add some dynamic pages built over the static pages with wicket. And I will >> to >> publish all pages with wicket. >> >> As >> I have static HTML pages and as want to use them immediately, I must use >> the >> Frame HTML mechanism. >> >> So >> I will have a page with a left part: the menu or the list of pages, and on >> the >> right part (in another frame) the associated page. >> >> So >> I am using the >> http://www.wicket-library.com/wicket-examples/frames/ examples. This >> works, but I have 2 problems: >> >> - >> I have to created 200 page.java/page.class, one per static pages! >> >> - >> I have to modify the code (creating a new page.java/page.class) if there >> is a >> new static page. >> >> >> >> So >> what is the easiest way to manage this problem? >> >> >> >> May >> be an idea is to say to wicket: just for >> this time, the associated html page to genericsaticpage.class is >> staticpage1.html. Of course for another link, the associated html page to >> genericsaticpage.class will be staticpage2.html. >> >> >> >> I >> can also image to have staticpage.html : ...<body><div >> wicket:id="The body will be read from the static >> page"></body>. In this case, I will lost the css or the javascript >> code that may be included in the original static page. >> >> >> >> Thanks >> for any pointers or suggestion. >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org