Archive for May, 2006

Magyar Wicket portal

Tuesday, May 30th, 2006

János Cserép has created a Wicket based portal in Hungarian. I can’t remember seeing him on our mailinglists, but it looks great, and is probably the first Wicket 1.2 application in production and externally visible.

Now if I only get some time to pick up my hungarian lessons. Szia!

Call for developers: new Javascript datepicker development

Tuesday, May 30th, 2006

Igor Vaynberg, (not his 2.0 reincarnation) has asked for help in Wicket’s quest for a decent Javascript date picker that works with i18n and SimpleDateFormat patterns. He writes:

as you guys know weve been having a lot of trouble with the datepicker in extensions. a lot of it is from the issues of i18n and formatting in general.

i started working on a replacement keeping those two items on the top of the list. the idea is to be able to define locale strings as well as a format expression that will be used for formatting and parsing and are identical to the ones used by SimpleDateFormat in java.

when all is said and done it might look something like this:

new DatePickerField(id, model, "EEEE, MMMM d yyyy")

and have localized properties like

wicket.datepicker.months=January ,February...
wicket.datepicker.shortMonths=Jan,Feb,...
etc

so the transition between java and javascript will be seamless

i also want to be able to decorate any day square via ajax or another mechanism

So if you are interested in building a killer Javascript calendar that works with existing Java idioms, give us a call.

Wicket Ajax Rating Component

Friday, May 26th, 2006

I just committed an Ajax Wicket component for rating stuff, similar to the Votio wordpress plugin.

The links are rendered as Ajax links, which also provide a fallback in case Ajax isn’t available. This way the vote almost always gets through. The component renders itself when the ajax request returns, and as a component user, you can also update other components yourself in the same request.

Adding the rating component should be as simple as:

Rating ratingModel = new Rating();
add(new RatingPanel("rating", new PropertyModel(ratingModel, "rating"), 5))
{
    protected boolean onIsStarActive(int star)
    {
        return ((RatingModel)getModelObject()).isActive(star);
    }

    protected void onRated(int rating, AjaxRequestTarget target)
    {
        ((RatingModel)getModelObject()).addRating(rating);
    }
});

and in your markup all you have to do is:


where you want your rating box to go.

All you have to supply is your own implementation of a Rating object, which will keep track of the number of votes, averages the votes, and creates a rating.

Features of the rating component:

  • use your own icons for the images
  • allow a user to vote only once (the implementation is up to you)
  • customize the styling
  • customizable rating system (it’s all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
  • label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementation

The component will be part of wicket-extensions-1.2.1 (the next maintenance release of Wicket).

Trying out Ecto once more

Thursday, May 25th, 2006

About a year ago I tried out the Ecto blog client and didn’t continue using it. Now I have downloaded their newest version to see if it fits better.
So this is a trial post, and should not be taken seriously as something worth reading nor remembering.

Technorati Tags: ,

Wicket 1.2 released (finally)

Wednesday, May 24th, 2006

It has come to the conclusion: we’ve finally released Wicket 1.2. It took some very long hours and hard working days: blood, sweat and tears were spilled, babies were born (congratulations Igor!) and hell froze over.

This release is a major landmark in the (short) history of the Wicket project. I’ve blogged several times when we released the release candidates, so you may already be familiar with the new and improved list:

  • Native, cross-platform AJAX support: use AJAX
    without having to write a single line of
    JavaScript. Wicket’s AJAX cross-platform
    capabilities

    have been rated ‘A’

  • Render multiple components in one AJAX call,
    where each component can occupy any part of the
    page
  • Improved markup inheritance: panels, pages,
    header contributions
  • Improved and simplified internationalization
    (i18n) support, using ,
    better resource bundle lookup strategy
  • Out of the box default resource bundles for many
    languages, including
    English, German, Spanish, Portugese, French,
    Hungarian, Dutch, Finnish, Danish, Swedish, Japanese,
    Chinese, Italian, Bulgarian and Farzi (Iranian).
  • Multiple form component validation, validate two
    or more fields that are related
  • Improved form handling: clear form validation
    workflow that allows you to much easier defined
    required and type conversion attributes of a
    form component
  • Nice URL support through URL mounting
  • Markup fragments (inline panels)
  • Improved performance by replacing OGNL with our
    own object graph language parser
  • Response filter support, added ServerTime and
    ServerClientTime filters
  • Reloading of resource bundles in development
    mode
  • Improved unit test support for your Wicket
    components and pages through the WicketTester,
    create unittests that run outside the container.
  • Out-of-the-box AJAX components: paging
    navigator, link with fallback, auto-updater,
    AJAX form, AJAX submit buttons, etc.
  • Improved authorization and authentication
    support, giving you the power to specify
    authorization at the component level. An example
    project featuring a role based, annotation
    framework is now part of the standard
    distribution.
  • Spring support for injecting your business logic
    into your web pages in a non-intrusive manner,
    while still being able to use the convenient
    Wicket idiom for creating pages (using the Java
    new
    operator).

  • Improved settings system: settings are now
    partitioned into logical groupings to make them
    easier to find
  • Numerous bug fixes and minor improvements

Wicket runs on any application server supporting the servlet
API version 2.3 and higher, and will work on Java 1.4 SDK’s
or newer.

We have tried to keep API changes to a minimum, but had to change and remove some methods and classes. Wicket 1.2 will not be a drop-in replacement, though most of your application’s pages and components should not be affected. There is a migration guide available on our wiki:

Migrating to Wicket 1.2

The Wicket 1.2 release is a highly anticipated major landmark in the history of Wicket. The core development team wishes to extend their gratitude to all users who helped build and test this release.

Enjoy and have fun!