Show Contents of an XPage or Custom Control
The Pretty Print control has a property called 'pageName' which you can use to specify an XPage or Custom Control
It will then output the contents of that page/custom control. Here it is showing the contents of this page.
XPage Markup
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex" xmlns:xc="http://www.ibm.com/xsp/custom">
<xc:ccLayout></xc:ccLayout>
<div class="jumbotron">
<div class="container">
<h1 class="display-3">Pretty Print</h1>
<p>The Pretty print control allows you to display highlighted source code for many different languages</p>
<p>You can find the pretty print control in heavy use within this Demonstration Database</p>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12">
<h3>Simple usage</h3>
<p>In it's simplest usage, the pretty print control will just work on whatever is between the open and closing tags of the control</p>
<xe:prettyPrint id="prettyPrint1" languageHint="javascript">
function foo() {
return "bar?";
}
</xe:prettyPrint>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Show Contents of an XPage or Custom Control</h3>
<p>The Pretty Print control has a property called 'pageName' which you can use to specify an XPage or Custom Control</p>
<p>It will then output the contents of that page/custom control. Here it is showing the contents of this page.</p>
<h5>XPage Markup</h5>
<xe:prettyPrint id="prettyPrint2" pageName="PrettyPrint.xsp"></xe:prettyPrint>
</div>
</div>
</div>
</xp:view>