@@ -77,24 +77,29 @@ public void setGspTagLibraryLookup(TagLibraryLookup lookup) {
7777 */
7878 public Object methodMissing (Object instance , String methodName , Object argsObject ) {
7979 Object [] args = argsObject instanceof Object [] ? (Object [])argsObject : new Object []{argsObject };
80- TagLibraryLookup lookup = getTagLibraryLookup ();
81- if (lookup != null ) {
82- GroovyObject tagLibrary = lookup .lookupTagLibrary (GroovyPage .DEFAULT_NAMESPACE , methodName );
83- if (tagLibrary != null ) {
84- if (!developmentMode ) {
85- MetaClass controllerMc = GrailsMetaClassUtils .getMetaClass (instance );
86- WebMetaUtils .registerMethodMissingForTags (controllerMc , lookup , GroovyPage .DEFAULT_NAMESPACE , methodName );
87- }
88- List <MetaMethod > respondsTo = tagLibrary .getMetaClass ().respondsTo (tagLibrary , methodName , args );
89- if (respondsTo .size ()>0 ) {
90- return respondsTo .get (0 ).invoke (tagLibrary , args );
80+ if (shouldHandleMethodMissing (instance , methodName , args )) {
81+ TagLibraryLookup lookup = getTagLibraryLookup ();
82+ if (lookup != null ) {
83+ GroovyObject tagLibrary = lookup .lookupTagLibrary (GroovyPage .DEFAULT_NAMESPACE , methodName );
84+ if (tagLibrary != null ) {
85+ if (!developmentMode ) {
86+ MetaClass controllerMc = GrailsMetaClassUtils .getMetaClass (instance );
87+ WebMetaUtils .registerMethodMissingForTags (controllerMc , lookup , GroovyPage .DEFAULT_NAMESPACE , methodName );
88+ }
89+ List <MetaMethod > respondsTo = tagLibrary .getMetaClass ().respondsTo (tagLibrary , methodName , args );
90+ if (respondsTo .size ()>0 ) {
91+ return respondsTo .get (0 ).invoke (tagLibrary , args );
92+ }
9193 }
9294 }
9395 }
94-
9596 throw new MissingMethodException (methodName , instance .getClass (), args );
9697 }
9798
99+ protected boolean shouldHandleMethodMissing (Object instance , String methodName , Object [] args ) {
100+ return !"render" .equals (methodName );
101+ }
102+
98103 /**
99104 * Looks up namespaces on missing property
100105 *
0 commit comments