Package net.sf.rej.gui.editor

Examples of net.sf.rej.gui.editor.BasicInfoEditor$ValidationException


        {
            return new Float(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("number-format-exception", clientValue));
        }
    }
View Full Code Here


        {
            return new Long(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("integer-format-exception", clientValue));
        }
    }
View Full Code Here

        {
            return new Integer(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("integer-format-exception", clientValue));
        }
    }
View Full Code Here

        {
            return new Double(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("number-format-exception", clientValue));
        }
    }
View Full Code Here

        {
            return new Byte(clientValue.trim());
        }
        catch (NumberFormatException ex)
        {
            throw new ValidationException(messages.format("integer-format-exception", clientValue));
        }
    }
View Full Code Here

                                String message)
            throws ValidationException {
        try {
            return Currency.getInstance(clientValue);
        } catch (final IllegalArgumentException e) {
            throw new ValidationException(message);
        }
    }
View Full Code Here

    public URL parseClient(Field field, String clientValue, String message) throws ValidationException {
        try {
            return new URL(clientValue);
        } catch (MalformedURLException e) {
            throw new ValidationException(message);
        }
    }
View Full Code Here

    @Persist
    private String event;

    void onValidateFormFromForm() throws ValidationException
    {
        throw new ValidationException("From event handler method.");
    }
View Full Code Here

        // And it gets tricky because we probably should trim spaces!

        if (input.equalsIgnoreCase("zero")) return 0;

        if (input.equalsIgnoreCase("i")) throw new ValidationException("Rational numbers only, please.");

        // Get the default behavior.

        return null;
    }
View Full Code Here

    void onValidateFromCount(Integer count) throws ValidationException
    {
        // count may be null
        if (count == null) return;

        if (count.equals(13)) throw new ValidationException("Thirteen is an unlucky number.");
    }
View Full Code Here

TOP

Related Classes of net.sf.rej.gui.editor.BasicInfoEditor$ValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.