Archive for February, 2010

Wicket – useful links

Tags: , , ,

Inspired by posts with useful links at blog by Piotr Paradziński I decided to create similar one with package containing interesting materials about Wicket and accompanying libraries. I am going to update this post in the future as new things appear.

Most important links

  1. Project official website
  2. Very active and very helpful mailing list
  3. Live examples of components usage – link i mirror
  4. Project Wiki
  5. Dzone Refcard about Apache Wicket
  6. Javadocs of Apache Wicket projects – javadocs of Wicket, Wicket-extensions and some other Wicket libraries in one place
  7. Latest Javadocs  for 1.4.15 Wicket version

Wicket extras, add-on libraries and tools

  1. wiQuery – jQuery integration with Wicket
  2. WicketStuff – many different components (integrations with various JavaScript libraries, additional classes and projects extending capabilities of Wicket) with examples
  3. WicketCool – project by Paul Szulc helping with rapid application development using Wicket, Spring 3 and JPA2.
  4. Maven archetypes for Wicket by jWeekend  – project starters with many different technologies: JDBC, JPA, Spring 3.0, Hibernate, Guice or WarpPersist
  5. Enhanced Wicket Tester – improved version of WicketTester project making testing Wicket app much easier, also from Paul Szulc.
  6. Brix, CMS using Wicket
  7. Visural Wicket – set of very attractive, interactive and useful Wicket components (live demo)
  8. Wicketopia – Rapid Application Development (RAD) library for Wicket framework
  9. FiftyFiveWicket – set of tools increasing productivity of development process using Wicket (helper methods, wrappers for integration with Spring, etc.)

Tutorials, guides

  1. Two [one] [two], extremely good presentations from workshops by Mystic Coders
  2. Interesting 5-part tutorial by Mystic Coders
  3. Set of articles, tutorials about Wicket – link
  4. Wicket Patterns & Pitfalls: very good tutorial about Open Session in View in Wicket and about solving typical problems while developing application using this framework: 1, 2, 3, 4
  5. Articles about Wicket at  jWeekend website
  6. Apache Wicket – a little different framework, Rafał Jaskółka (in Polish)
  7. Many very good posts about Wicket on blog by Jacek Laskowski (in Polish)
  8. Wicket by example: blog with many examples presenting how to do different tasks using Wicket
  9. Wicket dos and don’ts, article showing what to do and what not to do when we use Wicket framework in our project
  10. London Wicket Group – slideshows and other materials from programmers using Wicket

Example applications

  1. Web appplication using Wicket, Spring and Hibernate by James Carman
  2. MysticPaste by Mystic Coders – code snippets pastebin with sources available at GitHub

I hope somebody, except me of course :) , will find this post useful.

Last updated: 16/07/2011


Be Sociable, Share!

Wicket Ajax Modal ‘Are you sure?’ window

Tags: , , , ,

While developing web application with Wicket I sometimes need to check whether the user really, really does want to do something, for example to delete an entity from the database. The first and easiest choice that comes to my mind is to use JavaScript window.

So we have HomePage.html:

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" >
    <head>
        <title>Wicket Ajax 'Are you sure?' Modal Window</title>
    </head>
    <body>

        <div align="center">
            <strong>Wicket Ajax 'Are you sure?' Modal Window</strong>

            <form action="" wicket:id="formWithJavaScript">
                <input type="submit" wicket:id="buttonWithJavaScript" value="Action!"/>
            </form>
        </div>

    </body>
</html>

and corresponding Java class:

package pl.tdziurko.ajaxmodalwindowapp;

// imports omitted

public class HomePage extends WebPage {

    private static final long serialVersionUID = 1L;

    public HomePage(final PageParameters parameters) {

        Form formWithJavaScript = new Form("formWithJavaScript");

        Button buttonWithJavaScript = new Button("buttonWithJavaScript") {

            @Override
            public void onSubmit() {
                System.out.println("Doing my job");
            }
        };
        buttonWithJavaScript.add(new SimpleAttributeModifier(
                "onclick", "if(!confirm('Do you really want to perform this action?')) return false;"));

        formWithJavaScript.add(buttonWithJavaScript);
        add(formWithJavaScript);

    }

}

Finally, we can see how it looks:

It solves our problem but in the era of Web2.0, rounded corners and shiny looks it isn’t enough. Why can’t we use ajax modal window to ask user for confirmation? It would make our application look good and our css magician could make it look even better. Continue reading this post …


Be Sociable, Share!