Grails

Dynamically add 'mkp' instance to TagLib

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.0-RC2
  • Fix Version/s: None
  • Component/s: TagLib
  • Labels:
    None

Description

As described here , GSP tags must instantiate a MarkupBuilder manually if they want to use one. It would be more convenient if the 'mkp' property was automatically available to all tag implementations, only instantiating the builder on demand.

Activity

Hide
Steve Mayzak added a comment -

This page in the Grails documentation says this feature was implemented in any version after 0.6. I think the docs should be updated so people are not mis-lead.

Show
Steve Mayzak added a comment - This page in the Grails documentation says this feature was implemented in any version after 0.6. I think the docs should be updated so people are not mis-lead.
Hide
Felipe Cypriano added a comment -

Steve is right, the documentation should be updated. I was having trouble because I don't put the declaration.

I try to create an account to update my self the docs but I get an HTTP 404

Show
Felipe Cypriano added a comment - Steve is right, the documentation should be updated. I was having trouble because I don't put the declaration. I try to create an account to update my self the docs but I get an HTTP 404
Hide
Martin Hofmann added a comment -

Just had the same problem. No chance without the declaration.

So I've updated the documentation now.

Show
Martin Hofmann added a comment - Just had the same problem. No chance without the declaration. So I've updated the documentation now.
Hide
Graeme Rocher added a comment -

There is no scope / time to resolve these remaining lower priority issues for 1.2 so moving to 1.3

for 1.2 final only issues considered blocking will now be fixed

Show
Graeme Rocher added a comment - There is no scope / time to resolve these remaining lower priority issues for 1.2 so moving to 1.3 for 1.2 final only issues considered blocking will now be fixed
Hide
Gavin Kromhout added a comment -

This should now be `Dynamically add 'mb' or 'builder' instance to TagLib` since now as per http://groovy.codehaus.org/api/groovy/xml/MarkupBuilder.html:

Note that mkp is a special namespace used to escape away from the normal building mode of the builder and get access to helper markup methods such as 'yield' and 'yieldUnescaped'. See the javadoc for getMkp() for further details.

Show
Gavin Kromhout added a comment - This should now be `Dynamically add 'mb' or 'builder' instance to TagLib` since now as per http://groovy.codehaus.org/api/groovy/xml/MarkupBuilder.html: Note that mkp is a special namespace used to escape away from the normal building mode of the builder and get access to helper markup methods such as 'yield' and 'yieldUnescaped'. See the javadoc for getMkp() for further details.

People

Vote (3)
Watch (2)

Dates

  • Created:
    Updated:
    Last Reviewed: