If you run into the situation where you want to replace what a given VIEW produces with literal HTML that you hand code, you can use the AgInternalXML control.

Suppose you have a standard .jsp definition that includes the VCR controls, but on a given site, you want to replace the VCR controls with dynamic 'share this' processing that is based on embedded javascript code.  You could define the following:

        <name keystring="VCRLINKS">
            <control>
                <!-- Write a literal into the page with minimal processing -->
                <class>com.ittrium.view.control.AgInternalXML</class>
                <properties>
                      <decodeBlock class="xsd:string">B...</decodeBlock>
                      <setSuppressCache class="xsd:boolean">false</setSuppressCache>
                      <setSuppressOuter class="xsd:boolean">true</setSuppressOuter>
                      <setCustomTransformName class="xsd:string">basehtml</setCustomTransformName>
                      <setDOM>
                          <dom domname='XHTML'>
                              <script
                                  type="text/javascript"
                                  src="http://w.sharethis.com/button/sharethis.js#publisher=f9cfc9b7-ff31-4214-b858-ee7c6be3e26f&type=website">
                              </script>
                          </dom>
                      </setDOM>
                </properties>
            </control>       
        </name>

Some key configuration options include:
  • Base the control on a single, frozen block to enhance caching
  • Do NOT suppress the cache, since this same literal is used on every page
  • You do not want an outer <VCRLINKS> wrapper tag
  • No special transform processing is required other than what is in common base
  • Use an <XHTML> outer DOM literal wrapper, which passes cleanly through base