Example usage for org.apache.wicket.util.convert ConversionException setResourceKey

List of usage examples for org.apache.wicket.util.convert ConversionException setResourceKey

Introduction

In this page you can find the example usage for org.apache.wicket.util.convert ConversionException setResourceKey.

Prototype

public ConversionException setResourceKey(final String resourceKey) 

Source Link

Document

Set the resource key for the message that should be displayed.

Usage

From source file:abid.password.wicket.converters.ExtendedPasswordConverter.java

License:Apache License

private void error(String value, String errorKey, Exception e) {
    ConversionException exception = new ConversionException(
            "Could not convert password into '" + ExtendedPassword.class.getName() + "'", e);
    exception.setSourceValue(value);/*from ww w  . j a  va  2s  .c om*/
    exception.setResourceKey(getClass().getSimpleName() + "." + errorKey);
    throw exception;
}

From source file:org.obiba.onyx.jade.core.wicket.instrument.InstrumentBarcodeConverter.java

License:Open Source License

private void displayConversionErrorMsg(String value, String msgKey) {
    ConversionException cex = new ConversionException("No instrument for barcode: '" + value + "'");
    cex.setResourceKey(msgKey);
    throw cex;//from   w ww. j  av  a2 s. c  o  m
}