Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>modify the "web-app/WEB-INF/tld/grails.tld" file and add the necessary entries that point to your class:</p> <pre><code>&lt;tag&gt; &lt;name&gt;includeJs&lt;/name&gt; &lt;tag-class&gt;com.mycompany.taglib.IncludeJsTag&lt;/tag-class&gt; &lt;body-content&gt;JSP&lt;/body-content&gt; &lt;variable&gt; &lt;name-given&gt;it&lt;/name-given&gt; &lt;variable-class&gt;java.lang.Object&lt;/variable-class&gt; &lt;declare&gt;true&lt;/declare&gt; &lt;scope&gt;AT_BEGIN&lt;/scope&gt; &lt;/variable&gt; &lt;dynamic-attributes&gt;true&lt;/dynamic-attributes&gt; &lt;/tag&gt; </code></pre> <p>put <code>common-view.jar</code> in the lib directory. and it should be ready to go! </p> <p>NOTE: about the namespace - in GSP, i think the global g: namespace can be used to refer to your tag above.</p> <p>For more info, check out this page - its a bit hard to distill it, but if you've done jsp/servlets, it should be pretty understandable. <a href="http://grails.org/Dynamic+Tag+Libraries" rel="nofollow noreferrer">http://grails.org/Dynamic+Tag+Libraries</a> </p> <p>Edit: i was able to extract more info from this bug report than the above doco page : <a href="http://jira.codehaus.org/browse/GRAILS-4571" rel="nofollow noreferrer">http://jira.codehaus.org/browse/GRAILS-4571</a> . Essentially, you would add the tag declaration to either grails.tld or your own (if you use grails.tld, you wont need to declare a taglib on the page you are using that tag (i.e., <code>&lt;%@ taglib prefix="jct" uri="/WEB-INF/tld/jsp-custom-tags.tld"%&gt;</code>). Make sure your jar containing the taglib is in the classspath. Putting it in /lib/ will work nicely.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload