Sitemesh3 : DivExtractingTagRuleBundle issue

152 views
Skip to first unread message

有限

unread,
Sep 3, 2014, 6:59:10 PM9/3/14
to sitemes...@googlegroups.com
in sitemesh3.xml, I added this:

<content-processor>
     <tag-rule-bundle class="org.sitemesh.content.tagrules.html.DivExtractingTagRuleBundle" />
</content-processor>

in my html file:
<body>
<div id="siteMeshJavaScript">
<script>
  $(function() {
    alert("Starting");
  });
</script>
</div>
</body>

in decorator file:

<sitemesh:write property='body'/>
<script src="jquery/1.11.1/jquery.min.js"></script>
<sitemesh:write property='div.siteMeshJavaScript'/>


it works, The problem is:
the original div content in html file is not cleaned, 
and there are two same script in result html, and the first one would failure because jquery hadn't loaded.

sorry for my poor english, i hope you can see ...... 

If I do something wrong, please tell me.
If it's a real problem, can you please tell me how to fix it. 

Thanks.

Caio Rios

unread,
Jun 4, 2015, 6:27:25 PM6/4/15
to sitemes...@googlegroups.com
Did you find a solution for this issue? I am facing the exactly the same problem you described and I haven't found a solution yet.
Reply all
Reply to author
Forward
0 new messages