Our Blog

Let us find tech solutions together

Jul 21

There are four supplied methods in the Wicket framework for changing your configuration from development to deployment and vice-versa. The two possible values for this configuration parameter is “development” or “deployment”.

Method one, context-param in web.xml:

1
2
3
4
    <context-param>
        <param-name>configuration</param-name>
        <param-value>development</param-value>
    </context-param>

An init-param in the WicketFilter in your web.xml:

1
2
3
4
5
6
7
8
    <filter>
        <filter-name>wicketFilter</filter-name>
        <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
        <init-param>
            <param-name>configuration</param-name>
            <param-value>development</param-value>
        </init-param>
        ...

A command-line parameter wicket.configuration:

1
    java ... -Dwicket.configuration=development

Overriding Application.getConfigurationType() in your Application class:

1
2
3
4
    @Override
    public String getConfigurationType() {
        return Application.DEVELOPMENT;
    }

In our environments, to reduce headache, we have the configuration in web.xml point to “deployment”, and in our Jetty Start class, we pass the command-line parameter locally to make it run in “development” mode.

Read more
Jul 21

An introduction that was written earlier this year about setting up a project using Maven, Spring, Hibernate, and getting the entire setup done. Check out the 5 days of Wicket for your dose!

Read more
Jul 20

If you’d like to have your FeedbackPanel update with errors in the event of a problem with your form, just adding the FeedbackPanel won’t do you any good. Just as with any other AJAX-updating component in Wicket, you’ll need to add it to the AjaxRequestTarget, only difference is, you’ll have to do this while overriding onError like so:

1
2
3
4
5
6
7
8
9
final FeedbackPanel feedbackPanel = new FeedbackPanel("feedbackPanel");
feedbackPanel.setOutputMarkupId(true);
form.add(feedbackPanel);
form.add(new AjaxButton("submit") {
    @Override
    protected void onError(final AjaxRequestTarget target, final Form form) {
        target.addComponent(feedbackPanel);
    }
});
Read more