> I created a custom resource stream locator that locates .html files located
> in an html/ folder below the component. At least that way I can keep the
> .html separate from the .java class files. I generally get about 10-30
> class files per package and it's nice having them separated into ano
Hmm, I considered doing that when I started, but couldn't decide what
to call the folder, as it would have any of .html, .properties, .css
or .js files, so never felt happy with it! :-)
(Partial) alternatives might be IDEA's "Sort By Type" in the Project
view, or using Maven's "src/main/resources"
Does Panel and Border have a backing html file like a Page does?
I agree that I don't want to overengineer something, so far this change was
pretty simple to implement, I just don't like the fact that the .html files
live with the java files, I just think it start to get messy. Mind you I
don't
you have to do the same mod to Panel and Border, a Page is not the main artefact in wicket - components are, which are often panels or borders. page is merely a top-level container.all in all i think this is overengineering, and i think you will soon find that going the default way makes it easier
Ok, here is my solution to this problem instead of implementing my own
IResourceStreamLocator.
The overview is create a abstract class that extends WebPage that overrides
the newMarkupResourceStream method. All other pages will extend this object.
This object also forces it's children to impleme
Again I don't think implementing the IResourceStream interface is the correct
way because the interface method "locate" you must implement takes a path
member which according to the javadoc IS the path to the resource, it is the
responsibility of the IResourceStream implementation to locate the re
the markup stream is resolved in MarkupContainer.newMarkupResourceStream(), it is done via the IResourceStreamLocator defined in resource settings.so you can either override that method on all markup containers, or implement your own IResouceStreamLocator like i sugested.
-IgorOn 10/6/06, craigdd <
Implementing my own IResourceStreamLocator doesn't seem correct to me because
the interface takes the path to the resource. The more correct why is to
find where that path is coming from an overriding that implementation, the
next step is to actual find where that path is coming from.
igor.vay
implement your own IResourceStreamLocator-IgorOn 10/6/06, craigdd <[EMAIL PROTECTED]> wrote:
I got it to work with the path "WEB-INf/view" the thing I was over looking
was the fact that when wicket looks for it's markup page it uses the fullyqualified class name of the page object.It there anyway t
I got it to work with the path "WEB-INf/view" the thing I was over looking
was the fact that when wicket looks for it's markup page it uses the fully
qualified class name of the page object.
It there anyway to overrider the name of the page object, in other words if
I have a WebPage subclass call
You are using V1.2.2?
The debug log provided doesn't help a lot.
And I'm not able to test it right now, but did try
WEB-INF/view
/view (actually the files in that directory as well)
view
already. And I'm sure you are aware that even though you might a
sourceFolder the sub-directory structure mu
So by the look of the code you show here it is a filter init param, I don't
remember seeing anything about configuring a filter.
Anyway, I looked at the internalinit() method in WebApplication and found
where it is pulling the sourceFolder init param from the servlet. I added
that init param and
Just follow back where addResourceFolder() is already used. It is
currently used in WebApplication.internalInit() and
PortletApplication.internalInit() and the code looks like
...
configure(configuration, wicketFilter.getFilterConfig()
.getInitParameter("
I've beed trying to get this to work for a while now, basically what I want,
is to have Wicket load my html files from /WEB-INF/view directory instead of
the classes directory.
I've been reading a post about seperating your html and it was suggested to
use the method addResourceFolder("path"); S
14 matches
Mail list logo