Search in sources :

Example 1 with ConverterLocator

use of org.apache.wicket.ConverterLocator in project qi4j-sdk by Qi4j.

the class DCISampleApplication_a method wicketInit.

public void wicketInit() {
    // Tabs and SEO urls
    mountPages();
    // Show/hide Ajax debugging
    getDebugSettings().setDevelopmentUtilitiesEnabled(true);
    // Check that components are stateless when required
    getComponentPostOnBeforeRenderListeners().add(new StatelessChecker());
    // Show/hide wicket tags in html code
    getMarkupSettings().setStripWicketTags(true);
    // Default date format (we don't care for now about the hour of the day)
    ((ConverterLocator) getConverterLocator()).set(Date.class, new PatternDateConverter("yyyy-MM-dd", true));
}
Also used : ConverterLocator(org.apache.wicket.ConverterLocator) PatternDateConverter(org.apache.wicket.datetime.PatternDateConverter) StatelessChecker(org.apache.wicket.devutils.stateless.StatelessChecker)

Example 2 with ConverterLocator

use of org.apache.wicket.ConverterLocator in project qi4j-sdk by Qi4j.

the class DCISampleApplication_b method wicketInit.

public void wicketInit() {
    // Tabs and SEO urls
    mountPages();
    // Show/hide Ajax debugging
    getDebugSettings().setDevelopmentUtilitiesEnabled(true);
    // Check that components are stateless when required
    getComponentPostOnBeforeRenderListeners().add(new StatelessChecker());
    // Show/hide wicket tags in html code
    getMarkupSettings().setStripWicketTags(true);
    // Default date format (we don't care for now about the hour of the day)
    ((ConverterLocator) getConverterLocator()).set(Date.class, new PatternDateConverter("yyyy-MM-dd", true));
}
Also used : ConverterLocator(org.apache.wicket.ConverterLocator) PatternDateConverter(org.apache.wicket.datetime.PatternDateConverter) StatelessChecker(org.apache.wicket.devutils.stateless.StatelessChecker)

Example 3 with ConverterLocator

use of org.apache.wicket.ConverterLocator in project ocvn by devgateway.

the class FormsWebApplication method newConverterLocator.

/**
     * @see org.apache.wicket.Application#newConverterLocator() This adds the
     *      {@link NonNumericFilteredBigDecimalConverter} as the standard
     *      {@link BigDecimal} converter for ALL fields using this type accross
     *      the application
     **/
@Override
protected IConverterLocator newConverterLocator() {
    ConverterLocator locator = (ConverterLocator) super.newConverterLocator();
    locator.set(BigDecimal.class, new NonNumericFilteredBigDecimalConverter());
    return locator;
}
Also used : IConverterLocator(org.apache.wicket.IConverterLocator) ConverterLocator(org.apache.wicket.ConverterLocator) NonNumericFilteredBigDecimalConverter(org.devgateway.toolkit.forms.wicket.converters.NonNumericFilteredBigDecimalConverter)

Aggregations

ConverterLocator (org.apache.wicket.ConverterLocator)3 PatternDateConverter (org.apache.wicket.datetime.PatternDateConverter)2 StatelessChecker (org.apache.wicket.devutils.stateless.StatelessChecker)2 IConverterLocator (org.apache.wicket.IConverterLocator)1 NonNumericFilteredBigDecimalConverter (org.devgateway.toolkit.forms.wicket.converters.NonNumericFilteredBigDecimalConverter)1