@@ -204,7 +204,7 @@ private Method findMethod(Class<?> cls, String methodName) {
204204 private void register (Meta meta , Class <?> cls , Method method , App app ) {
205205 final ReflectedActionViewVarDef def = new ReflectedActionViewVarDef (meta , cls , method , app );
206206 if (def .supportMailer ) {
207- MailerViewVarDef mailerVarDef = new MailerViewVarDef (meta .varName , def .returnType ()) {
207+ MailerViewVarDef mailerVarDef = new MailerViewVarDef (meta .varName , def .returnType (app )) {
208208 @ Override
209209 public Object eval (MailerContext context ) {
210210 return def .getValue (context .app ());
@@ -213,7 +213,7 @@ public Object eval(MailerContext context) {
213213 Act .viewManager ().registerAppDefinedVar (mailerVarDef );
214214 }
215215 if (def .supportAction ) {
216- ActionViewVarDef actionVarDef = new ActionViewVarDef (meta .varName , def .returnType ()) {
216+ ActionViewVarDef actionVarDef = new ActionViewVarDef (meta .varName , def .returnType (app )) {
217217 @ Override
218218 public Object eval (ActionContext context ) {
219219 return def .getValue (context .app ());
@@ -280,8 +280,8 @@ private boolean requireAction(java.lang.reflect.Type type) {
280280 return false ;
281281 }
282282
283- Class <?> returnType () {
284- return method .getReturnType ( );
283+ BeanSpec returnType (App app ) {
284+ return BeanSpec . of ( method .getGenericReturnType (), null , app . injector () );
285285 }
286286
287287 Object getValue (App app ) {
0 commit comments