Spring Framework LocaleEditor - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework LocaleEditor class.

This code example shows how to use the following methods:setAsText, getValue
This code example shows how to use the following methods:setAsText, getValue
    /** 
     * Sets the locale used in SOAP fault. 
     * @param locale 
     */ 
    public void setLocale(String locale) {
        LocaleEditor localeEditor = new LocaleEditor();
        localeEditor.setAsText(locale);
        this.locale = (Locale) localeEditor.getValue();
    } 
 
    /** 
     * Builder method from Spring WS SOAP fault object. 
     * @param fault 
     * @return 
     */ 
    public static SoapFault from(org.springframework.ws.soap.SoapFault fault) {
        SoapFault soapFault = new SoapFault();
 
        QNameEditor qNameEditor = new QNameEditor();
        qNameEditor.setValue(fault.getFaultCode());
5
CodeRank
This code example shows how to use the following methods:setAsText, getValue
    public static Locale toLocale(String locale) {
 
        if (locale == null) {
            return null; 
        } 
        LocaleEditor led = new LocaleEditor();
        led.setAsText(locale);
        return (Locale) led.getValue();
    } 
 
 
    /** 
     * Returns a String-Representation from a {@link Locale}. 
     *  
     * @param locale the {@link Locale} to turn into a String 
     * @return the String representing the {@link Locale} 
     */ 
    public static String fromLocale(Locale locale) {
 
        if (locale == null) {
5
CodeRank