blob: 58f0936b8fc115bd3dd658e6a256258f14cd2c5d [file] [log] [blame]
class Impl implements GwtActionService {
CharSequence execute(List action) {
// Get the class name of the action, because we need it to find
// the corresponding action bean.
def name = GrailsClassUtils.getShortName(action.getClass())
// Prefix the name with "gwt" and add a "Handler" suffix to get
// hold of the appropriate bean.
def handlerBeanName = "gwt${name}Handler"
if (applicationContext.containsBean(handlerBeanName)) {
def actionBean = applicationContext.getBean(handlerBeanName)
return actionBean.execute(action)
}
else {
throw new RuntimeException("No action handler configured for ${name}")
}
}
}
-----
public class Impl extends groovy.lang.GroovyObjectSupport implements GwtActionService, groovy.lang.GroovyObject {
public java.lang.CharSequence execute(java.util.List action) {
return null;
}
public java.lang.Object getProperty(java.lang.String property) {
return null;
}
public void setProperty(java.lang.String property, java.lang.Object newValue) {
return ;
}
public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args) {
return null;
}
public groovy.lang.MetaClass getMetaClass() {
return null;
}
public void setMetaClass(groovy.lang.MetaClass metaClass) {
return ;
}
}
---