David Haynes wrote on Dec 22, 2008 21:39:
My problem is that the wicket:web-application entry in components.xml shows an error
no declaration can be found for element...for my class that extends the SeamWebApplication.
I presume that is an error in eclipse, and not at runtime, in which case I'd have to see your complete components.xml, but my guess is that you have the wrong schemaLocation declaration for the wicket namespace in your <components> declaration.
I suspect it is because there is no compiled version of this class being built and populated.
I doubt it, eclipse has no idea that the applicationClass attribute points to a class name.
Thanks for the reply.
I think the Eclipse thing is a bit of a red herring since it was also doing this in NetBeans. I have currently scrapped trying to use the Web Application and Wicket together under JBoss tools and have gone with Pete's Seamless Wicket tutorial instead.
Now I need to expand the Ant scripts to understand packages and I am nearly ready to couple the application to the database.
For those who want Wicket to be a 'first-class' citizen, I would suggest that a more 'convention over configuration' approach could be taken so that beginners (like me) would be able to determine that things were actually being populated in the right places.
Once I have worked out all the kinks manually, I may go back to the Web Application mode to see what went wrong.
I really don't know what you mean by
trying to use the Web Application and Wicket together under JBoss tools.You can't use wicket with seam without specifying a web-application in components.xml. As far as jboss tools, well, I can't blame you there, as I gave up it many moons ago.
I agree that the seam/wicket integration needs to be more, well, seamless, and I'm working on that.
JBoss tools give you a template for a web application. If you use it to build the basics it does (roughly) what a 'seam generate' would do. The problem is that you then have to go on a tweaking rampage to remove all the faces stuff and add in wicket.
Then you have to adjust the build.xml for wicket which is not all that clearly laid out as to what goes where and what produces what. I have taken to reading the ant scripts to figure it all out.
Pete's blog posting just starts with the 'seam generate' and leads you through the 'add this, remove that, change this' steps to get a wicket application up and running.
What I find interesting is that the wicket project in the examples directory seems to have used yet another scheme for generating the application with things in yet another set of places. This is what I was getting at with the 'convention over configuration' comment. Can't we just decide where this stuff should go in a stock-stock wicket application and then produce a nice set of cut-and-paste ant build script pieces for it?
Regarding JBoss tools: I think it becomes very clear that a number of the Seam folks are actually using NetBeans for their development. I switched over to it during the break and have made more progress in a day than I made most of the previous week. Eclipse (in my opinion) tries too hard to hide things you really need to be able to see. Wicket support is also much nicer in NetBeans.
Ahh, I thought by scrapping
Web Applicationyou meant the <wicket:web-application/> entry in components.xml :)
You are right, we have no stock way of generating a wicket/seam app, because the wicket support in seam is relatively new. I don't know if/when jboss tools will support generating a wicket/seam eclipse project, but seam-gen will support it as soon as I have a free weekend to implement it. Patches welcome, of course :)
Once I work out what works, I will try to see if I can help out.