Note that there are some explanatory texts on larger screens.

plurals
  1. POEmbedded custom-tag in dynamic content (nested tag) not rendering
    text
    copied!<p>Embedded custom-tag in dynamic content (nested tag) not rendering.</p> <p>I have a page that pulls dynamic content from a javabean and passes the list of objects to a custom tag for processing into html. Within each object is a bunch of html to be output that contains a second custom tag that I would like to also be rendered. The problem is that the tag invocation is rendered as plaintext.</p> <p>An example might serve me better.</p> <p>1 Pull information from a database and return it to the page via a javabean. Send this info to a custom tag for outputting.</p> <pre><code>&lt;jsp:useBean id="ImportantNoticeBean" scope="page" class="com.mysite.beans.ImportantNoticeProcessBean"/&gt; &lt;%-- Declare the bean --%&gt; &lt;c:forEach var="noticeBean" items="${ImportantNoticeBean.importantNotices}"&gt; &lt;%-- Get the info --%&gt; &lt;mysite:notice importantNotice="${noticeBean}"/&gt; &lt;%-- give it to the tag for processing --%&gt; &lt;/c:forEach&gt; </code></pre> <p>this tag should output a box div like so</p> <pre><code>*SNIP* class for custom tag def and method setup etc out.println("&lt;div class=\"importantNotice\"&gt;"); out.println(" " + importantNotice.getMessage()); out.println(" &lt;div class=\"importantnoticedates\"&gt;Posted: " + importantNotice.getDateFrom() + " End: " + importantNotice.getDateTo()&lt;/div&gt;"); out.println(" &lt;div class=\"noticeAuthor\"&gt;- " + importantNotice.getAuthor() + "&lt;/div&gt;"); out.println("&lt;/div&gt;"); *SNIP* </code></pre> <p>This renders fine and as expected</p> <pre><code>&lt;div class="importantNotice"&gt; &lt;p&gt;This is a very important message. Everyone should pay attenton to it.&lt;/p&gt; &lt;div class="importantnoticedates"&gt;Posted: 2008-09-08 End: 2008-09-08&lt;/div&gt; &lt;div class="noticeAuthor"&gt;- The author&lt;/div&gt; &lt;/div&gt; </code></pre> <p>2 If, in the above example, for instance, I were to have a custom tag in the importantNotice.getMessage() String:</p> <pre><code>*SNIP* "This is a very important message. Everyone should pay attenton to it. &lt;mysite:quote author="Some Guy"&gt;Quote this&lt;/mysite:quote&gt;" *SNIP* </code></pre> <p>The important notice renders fine but the quote tag will not be processed and simply inserted into the string and put as plain text/html tag.</p> <pre><code>&lt;div class="importantNotice"&gt; &lt;p&gt;This is a very important message. Everyone should pay attenton to it. &lt;mysite:quote author="Some Guy"&gt;Quote this&lt;/mysite:quote&gt;&lt;/p&gt; &lt;div class="importantnoticedates"&gt;Posted: 2008-09-08 End: 2008-09-08&lt;/div&gt; &lt;div class="noticeAuthor"&gt;- The author&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Rather than </p> <pre><code>&lt;div class="importantNotice"&gt; &lt;p&gt;This is a very important message. Everyone should pay attenton to it. &lt;div class="quote"&gt;Quote this &lt;span class="authorofquote"&gt;Some Guy&lt;/span&gt;&lt;/div&gt;&lt;/p&gt; // or wahtever I choose as the output &lt;div class="importantnoticedates"&gt;Posted: 2008-09-08 End: 2008-09-08&lt;/div&gt; &lt;div class="noticeAuthor"&gt;- The author&lt;/div&gt; &lt;/div&gt; </code></pre> <p>I know this has to do with processors and pre-processors but I am not to sure about how to make this work.</p>
 

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