Package org.vraptor.i18n

Examples of org.vraptor.i18n.Message


                        if (msg instanceof FixedMessage) {
                            FixedMessage m = (FixedMessage) msg;
                            String content = bundle.getString(m.getKey());
                            errors.add(new FixedMessage(msg.getPath(), content, msg.getCategory()));
                        } else if (msg instanceof Message) {
                            Message m = (Message) msg;
                            String content = bundle.getString(m.getKey());
                            content = MessageFormat.format(content, new Object[]{m.getParameters()});
                            errors.add(new FixedMessage(msg.getPath(), content, msg.getCategory()));
                        } else {
                            throw new IllegalArgumentException("Unsupported validation message type: " + msg.getClass().getName());
                        }
                    }
View Full Code Here


                        if (msg instanceof FixedMessage) {
                            FixedMessage m = (FixedMessage) msg;
                            String content = bundle.getString(m.getKey());
                            errors.add(new FixedMessage(msg.getPath(), content, msg.getCategory()));
                        } else if (msg instanceof Message) {
                            Message m = (Message) msg;
                            String content = bundle.getString(m.getKey());
                            content = MessageFormat.format(content, new Object[]{m.getParameters()});
                            errors.add(new FixedMessage(msg.getPath(), content, msg.getCategory()));
                        } else {
                            throw new IllegalArgumentException("Unsupported validation message type: " + msg.getClass().getName());
                        }
                    }
View Full Code Here

                        if (msg instanceof FixedMessage) {
                            FixedMessage m = (FixedMessage) msg;
                            String content = bundle.getString(m.getKey());
                            errors.add(new FixedMessage(msg.getPath(), content, msg.getCategory()));
                        } else if (msg instanceof Message) {
                            Message m = (Message) msg;
                            String content = bundle.getString(m.getKey());
                            content = MessageFormat.format(content, new Object[]{m.getParameters()});
                            errors.add(new FixedMessage(msg.getPath(), content, msg.getCategory()));
                        } else {
                            throw new IllegalArgumentException("Unsupported validation message type: " + msg.getClass().getName());
                        }
                    }
View Full Code Here

TOP

Related Classes of org.vraptor.i18n.Message

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.