Wicket 1.4rc1 + Netbeans 6.5 = The Dream Team

The Wicket Plugin became available directly from the plugin manager today. If your Netbeans is already running (as in my case - for two weeks without rebooting), you will have to hit the "Reload Catalog" button. The installation experience:

  1. The installation is very smooth. Just search for "Wicket" and install the two plugins. Total size: 9 MB.
  2. You will exceptionally have to restart the IDE afterwards.
  3. If you create a Java EE Web Project, just select the wicket framework support.

...and you will gain:

  1. Netbeans will setup Wicket libraries (1.4rc1) in your project and the Wicket Filter correctly in web.xml:
  2. <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <filter>
            <filter-name>WicketApplication</filter-name>
            <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
            <init-param>
                <param-name>applicationClassName</param-name>
                <param-value>com.abien.wicket.Application</param-value>
            </init-param>
            </filter>
        <filter-mapping>
            <filter-name>WicketApplication</filter-name>
            <url-pattern>/wicket/*</url-pattern>
        </filter-mapping>
        <session-config><session-timeout>
                30
            </session-timeout></session-config>
        <welcome-file-list>
            <welcome-file/>
        </welcome-file-list>
     </web-app>

  3. It will create a skeleton for a Wicket application with Hello, Header, Home pages, implemented Application, a stylesheet etc.
  4. Really interesting is the support for switching between HTML pages with a given ID and corresponding Java files (Ctrl + click on the wicket id in HTML files). This saves a lot of time.
  5. The creation of pages is useful as well: Netbeans will create for you the HTML and corresponding Java files in parallel.
  6. Best of all: you can customize the templates in: Menu Tools --> Templates --> Web  (Wicket).
  7. The deployment works perfectly with Glassfish v2 and v3
Netbeans has really good support for HTML editing and Database, CSS - even with preview. The "deploy on save" feature is useful for wicket development either. Netbeans, however, does not recognize changed HTML files in the Source Packages folder yet (changes in the Web Pages folder are correctly recognized).

Special thanks to Geertjan Wielenga. It started with a conversation between Poznan and Gdansk at Netbeans world tour, and ended with a supported version of Wicket plugin in Netbeans :-). That's real community effect :-)

Btw. Wicket 1.4 works perfectly with EJB 3 in GF v2 - stay tuned.


NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Plus, look in the Navigator and you will see your Wicket tags (one of several contributions by Tim Boudreau to this plugin).

Posted by Geertjan on January 15, 2009 at 06:27 PM CET #

"Netbeans, however, does not recognize changed HTML files in the Source Packages folder yet (changes in the Web Pages folder are correctly recognized)."

That's a good one for creating a new issue in Issuezilla.

Posted by Geertjan on January 15, 2009 at 06:37 PM CET #

Great news, well done :-) Going to try it.

Posted by Fabrizio Giudici on January 15, 2009 at 11:49 PM CET #

@Geertjan,

"...That's a good one for creating a new issue in Issuezilla..."

Done: http://www.netbeans.org/issues/show_bug.cgi?id=156983

regards,

adam

Posted by Adam Bien on January 17, 2009 at 10:10 AM CET #

Hi Adam,
I believe that that wicket plugin and all netbeans 6.5 "blessing" are incredible. But doesn't all those things disappear when you use maven2 as your build tool? Or maybe am I doing something wrong and I can benefit from maven and netbeans and his plugins features simultaneously?

Best regards!

Posted by Michal Margiel on January 26, 2009 at 02:03 AM CET #

Hi Adam,

I'm starting to integrate an EJB3 project with a new Wicket application and I was wondering if you used wicket-contrib-javaee to use annotation based DI for your beans or do you use JNDI?

I've been looking all over the place for a good example. The wicket-contric-javaee project also look like it's been abandoned so I'm wondering how you do it and if you could write a little piece about it.

I'm also interested in the "deploy on save" functionality when you are using Maven2 as your build tool.

Many thanks,
Alan.

P.S been following your blog and twitter for a while now, good work!

Posted by Alan Garfield on March 26, 2009 at 02:35 PM CET #

Alan,

I used the wicket-contrib-javaee - and it worked (and works) perfectly. For EJB 3.1 it could be even further simplified - thinking about contributing some code.

Regarding maven2: I use a standard NB project, with standard maven layout - it works perfectly,

thanks for the nice comment!
regards,

adam

Posted by Adam Bien on April 01, 2009 at 12:57 PM CEST #

Adam,

Are you saying that you were able to use wicket-contrib-javaee perfectly with Wicket 1.4RC1?

According to this:

http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-javaee

...it will only work with Wicket 1.3. If you know of a version that will work with 1.4RC1 or later I'd love to know about it!

Regards,

Daniel

p.s. I too am enjoying the blog - thanks for publishing all this great info.

Posted by Daniel Walker on April 05, 2009 at 12:35 AM CEST #

Daniel,

I used it with wicket-1.4-m3 and it was wicket-contrib-javaee-1.1. I didn't tried it with 14rc1 yet...

I had to copy the library cglib-2.2 into the GF classpath. This was the only issue...

thanks for the nice comment,

regards,

adam

Posted by Adam Bien on April 05, 2009 at 10:30 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
realworldpatterns.com
...the last 150 posts
...the last 10 comments
License