Hello,
I'm trying to use Wicket(1.5.1) with JQWicket(0.7).
But it does not work together with a locale custom mapper shown in Wicket's
example page.
http://wicketstuff.org/wicket/mappers/de_DE

When I access a page where JQWicket components are added through this
custom mapper, no JavaScript of JQWicket are rendered into <head> tag in
html. So JQWicket components doesn't work.
I'm a new bee in Wicket.
I guess I should change the custom mapper but I don't have got any idea how.
Could somebody give me advices to resolve this problem?

Thanks in advance.


public class RequestMapperApplication extends WicketExampleApplication{

@Override
protected void init() {
getComponentPreOnBeforeRenderListeners().add(new
JQComponentOnBeforeRenderListener(new
JQContributionConfig().withDefaultJQueryUi()));

// custom locale mapper of Wicket's Example
getRootRequestMapperAsCompound().add(new LocaleFirstMapper(new
MountedMapper("/accordion", AccordionPage.class)));

// of cource, it does works with the standard mapper
// mountPage("accordion", AccordionPage.class);
}
...
}

public class AccordionPage extends DemoPage {

public AccordionPage() {

    AccordionWebMarkupContainer a1 = new AccordionWebMarkupContainer(
            "accordion-component");
    Label label = new Label("accordion.label", "Hello WORLD!");
    label.add(JQBehaviors.js($(label).css("color", "red")));
    a1.add(label);

    add(a1);

    add(new WebMarkupContainer("accordion-behavior")
            .add(new AccordionBehavior()));
}

/**
 * {@inheritDoc}
 *
 * @see com.google.code.jqwicket.DemoPage#getExampleTitle()
 */
@Override
protected String getExampleTitle() {
    return "JQuery UI Accordion example";
}

/**
 * {@inheritDoc}
 *
 * @see com.google.code.jqwicket.DemoPage#getExampleDescription()
 */
@Override
protected String getExampleDescription() {
    return "This example demonstrates JQuery UI Accordion integration";
}

}

Reply via email to