grails/grails-gsp

Support custom namespace when invoking TagLib of GroovyPage

rainboyan opened this issue · 0 comments

Feature Request

Currently, GSP only support custom namespace like <tmp:person <link:mapping,
have not support this feature in Grails Plugins.

In my new plugin grails-plugin-view-components, I want to implement this feature, support dynamic tags like below:

<vc:button type="button" name="Icon Button" cssClasses="btn-primary" icon="box" />

<vc:card title="My First Component" content="This is the first Card" />

<vc:icon name="alarm" />
<vc:icon name="apple" />
<vc:icon name="bag" />
<vc:icon name="bank" />
<vc:icon name="box" />

I read the source code of GroovyPage, the hard-coded part is below:

org.grails.gsp.GroovyPage

https://github.com/grails/grails-gsp/blob/6b368cc732d1b6f172bc35b10ea33b010bf205f5/grails-gsp/src/main/groovy/org/grails/gsp/GroovyPage.java#L335..L354

If you find it useful, I can submit the relevant code implementation, and I really hope that the framework will support this feature.

Thank you~