Groovy Documentation

com.vaadin.grails
[Java] Class VaadinUtils

java.lang.Object
  com.vaadin.grails.VaadinUtils

public class VaadinUtils

Vaadin plugin utility methods - mostly used for supporting dynamic method.

Authors:
Les Hazlewood
Since:
1.2


Field Summary
private static org.slf4j.Logger log

 
Constructor Summary
VaadinUtils()

 
Method Summary
static Object getBean(Class clazz)

static Object getBean(String name)

static List getJavascriptLibraries(org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication)

Extracts the 'javascriptLibraries' setting from VaadinConfig

String getMessage(org.springframework.context.MessageSourceResolvable resolvable, Locale locale)

Localization methods, providing access to i18n values.

static org.springframework.context.MessageSource getMessageSource()

static String i18n(String key, Object[] args, Locale locale)

Localization methods, providing access to i18n values.

static String i18n(String key, Object[] args, String defaultValue, Locale locale)

Localization methods, providing access to i18n values.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

log

private static final org.slf4j.Logger log


 
Constructor Detail

VaadinUtils

VaadinUtils()


 
Method Detail

getBean

public static Object getBean(Class clazz)


getBean

public static Object getBean(String name)


getJavascriptLibraries

public static List getJavascriptLibraries(org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication)
Extracts the 'javascriptLibraries' setting from VaadinConfig
Returns:
The list of libraries to add to the head element of the page


getMessage

String getMessage(org.springframework.context.MessageSourceResolvable resolvable, Locale locale)
Localization methods, providing access to i18n values.
Parameters:
resolvable - for localization properties
locale - locale
Returns:
value from properties file or key (if key value is not found)


getMessageSource

public static org.springframework.context.MessageSource getMessageSource()


i18n

public static String i18n(String key, Object[] args, Locale locale)
Localization methods, providing access to i18n values.
Parameters:
key - for localization properties
args - arguments, e.g. "Hallo {0}"
locale - locale
Returns:
value from properties file or key (if key value is not found)


i18n

public static String i18n(String key, Object[] args, String defaultValue, Locale locale)
Localization methods, providing access to i18n values.
defaultValue:
@param locale locale
Parameters:
key - for localization properties
args - arguments, e.g. "Hello {0}"
Returns:
value from properties file or key (if key value is not found)


 

Groovy Documentation