On Tue, 2009-05-05 at 03:03 -0500, Luther Baker wrote:
> > Separates the code from the templates so the designers don't have to
> > checkout the whole project, also keeps all the content in one directory.
> > Even though they are dynamic template files for wicket there is a
> > certain amount of static stuff that would be nice to be in one place.
> >
> 
> If you simply want to separate the file types, you can separate the *.html
> files into the src/main/resources directory. That separates the Java code
> from the HTML templates, it gives you a completely separate directory tree
> for the *.html files and it keeps all the html content in one directory. In
> addition, it is standard Maven practice to separate non-Java files into the
> src/main/resources directory. All standard Maven builds should work just
> fine.

Thanks that's pretty much where I've ended up.

> Additionally, under Netbeans it seems to me to be rather daft that there
> > is a folder is called "Web Pages" in the project view but all it
> > contains is image/binary files and the WEB-INF directory.
> 
> 
> Just a little background, by definition, Wicket defines a non-traditional
> web application structure. It intentionally avoids the use of the web page
> directory structure you are likely used to. It turns out that to do what you
> are asking, you are actually fighting both Wicket and Maven. Traditional
> HTML and JSP pages can be visited directly - but not so with Wicket html
> files. They are read in from the classpath and much more tightly bound to an
> actual Java class.
> 
> Trying to fit your Wicket app into a traditional structure can be done ...
> but it is not standard Wicket practice and you're going to end up with
> custom configuration that you'll have to manage.

Thanks for the explanation, that makes sense to me now. You should
probably add something like this to the wiki as I couldn't find a really
good reason and the examples where a little light.


> > But the actual
> > HTML files end up in the "Source Packages" or worse "Other Sources"
> > folder. I understand the reasons for putting them in the source packages
> > directories but it's not an ideal solution to my mind and my team.
> 
> 
> That is fair. If you're simply after your aforementioned points, try
> dropping the *.html files into src/main/resources.

Thanks, it does seem a little silly to me as far as Netbeans is
concerned (also the million directories that might be needed to handle
com.foo.bar.web.pages.panels etc), but less than it did after your
explanation. It'll be fine with the files being in "Other
Sources/resources".

Many thanks Luther!

Alan.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to