Package org.internna.iwebmvc.model.core

Examples of org.internna.iwebmvc.model.core.I18nText.initialize()


        Properties properties = new Properties();
        try {
            properties.load(IOUtils.toInputStream(text));
            if (i18n == null) {
                i18n = new I18nText();
                i18n.initialize(context);
            }
            i18n.setKey(properties.getProperty("key"));
            for (String tk : properties.getProperty("values").split("#,#")) {
                String[] i18ndata = StringUtils.split(tk, "-");
                for (LocalizedValue value : i18n.getValues())
View Full Code Here


    }

    @Test
    public void validate() throws Exception {
        I18nText i = new I18nText();
        i.initialize(holder);
        Collection<FieldError> error = (Collection<FieldError>) validator.validate(stubs.validation.FakeDomainEntity.class, "name", i);
        assertNotNull("Validation error", error);
        assertTrue("Two field errors", error.size() == 2);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.