YUI’s datepicker from wicket-datetime localized

29 07 2007

For anyone using the YUI date picker from wicket-datetime: in trunk (soon beta 3) it now uses localized months and days (of week). Support is as good as the JVM allows for (the code depends on DateFormatSymbols which seems to support many locales, but not nearly all available), but if you need, you can provide your own support (override the localize method and set the appropriate properties). To test and illustrate the localized datepicker, I added a separate example in wicket-examples (/dates, package ‘org.apache.wicket.examples.dates’).

There were two locales that didn’t look quite right to me. Hindi (India) rendered question marks all over the place, and Han Chinese looked like the days were all the same. Help with would be greatly appreciated!

Btw, I renamed ‘configureWidgetProperties’ to ‘configure’ and made the old method signature final. Sorry if that broke any of you, but as long as we’re in beta I like to break rather then deprecate :).

Thanks to Gerolf Seitz for thinking with me and keeping on top of the datepicker and Al for fixing another potential render issue this week!





Wicket In Action early access started

26 07 2007

Yes, that’s right, you can finally start reading Wicket In Action! The first chapter can be downloaded for free. The third chapter is available when you sign up for the Manning Early Access Program (MEAP), and other chapters will follow shortly (chapter 2 and 4 hopefully next week).

It’s been quite a ride. We didn’t expect writing a book would be this hard/ take so much time. We hope it will help Wicket and it’s users. That’s ultimately the reason why we started this crazy adventure.





Wicket almost converted to top level Apache project

26 07 2007

We are almost done with moving Wicket to be an Apache top level project. You can now find the site on http://wicket.apache.org!

Also, we are in the middle of switching our lists. Unfortunately, we can’t move the users from the sourceforge lists automatically, so please if you are subscribed to one, unsubscribe and join the Apache lists.

Moving the repository is an item that still needs to be done.

Update: the repository is moved now as well. Many thanks to Joe Schaefer/ Apache infra!





Added initial Seam support for Wicket

16 07 2007

Yesterday, I committed initial Seam (2.2.0 beta) support for Wicket. For the moment, it is implemented as a test project: ‘wicket-seam-test’ in the wicket-stuff repository.

The project only has support for the @In annotation of Seam, allowing you to inject Seam components in Wicket components, and it has a simple example. Support for other Seam features might be added later if that makes sense.

The example is quity funny actually. It has this Seam component defined:

@Name("Greet")
@Scope(ScopeType.SESSION)
@AutoCreate
public class GreetService {

  private int count = 0;

  public GreetService() {
  }

  public String greet() {
    return "Hello! I've greeted you " + (++count)
         + " times in this session.";
  }
}

which is later used in a custom label like this:

public class GreetingsLabel extends Label {

  @In
  private GreetService greetService;

  public GreetingsLabel(String id) {
    super(id);
    setModel(new AbstractReadOnlyModel() {

      @Override
      public Object getObject() {
        return greetService.greet();
      }
    });
  }
}

It’s just a simple example, but the interesting thing is that GreetService for the SESSION scope. Every session gets it’s own Seam managed instance. Of course, you could have accomplished the same by using a custom Wicket session, but it is nice to see an alternative way. And Seam can handle many scopes, including e.g. business process scopes. I can imagine that such things would actually be handled much nicer by Seam than if you would hand code it with just Wicket. Definitively something to further look in to!

Read more about it in the README.

UPDATE: Wicket is now supported by Seam. See this presentation for an overview.