6 Replies Latest reply on Jan 1, 2009 1:10 AM by David Haynes

    Wicket using Seam Web Application setup?

    David Haynes Newbie

      I'm having a bit of trouble getting wicket to work using the Seam Web Application project as a starting point and would appreciate any pointers people may have.


      Seam 2.1.1.CR2, JBoss 5.0.0.GA, Wicket 1.4.RC1, JBoss Developer Studio 2.0.0.B1


      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 suspect it is because there is no compiled version of this class being built and populated.


      Some other data points:



      1. The suspect class is located in the web/wicket directory.

      2. It is defined to be in the session package set.



      Have other people used this approach or have they used the one in Pete's Seamless Wicket blog post? (At least there you have access to the build.xml file.)


      Thanks for any suggestions.


      -david-

        • 1. Re: Wicket using Seam Web Application setup?
          Clint Popetz Apprentice

          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.


          • 2. Re: Wicket using Seam Web Application setup?
            David Haynes Newbie

            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.


            -david-

            • 3. Re: Wicket using Seam Web Application setup?
              Clint Popetz Apprentice

              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.

              • 4. Re: Wicket using Seam Web Application setup?
                David Haynes Newbie

                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.

                • 5. Re: Wicket using Seam Web Application setup?
                  Clint Popetz Apprentice

                  Ahh, I thought by scrapping Web Application you 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 :)


                  • 6. Re: Wicket using Seam Web Application setup?
                    David Haynes Newbie

                    RE: Patches
                    Once I work out what works, I will try to see if I can help out.