Quickstart: using the Dynamic Content Control in ExtLib

<?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">
	<xp:link escape="true" text="Load Dynamic Content Server side" id="link1">
		<xp:eventHandler event="onclick" submit="true" refreshMode="partial">
			<xp:this.action>
				<![CDATA[#{javascript:getComponent("dynC").show("key1")}]]>
			</xp:this.action>
		</xp:eventHandler>
	</xp:link>
	<xp:link escape="true" text="Load Dynamic Content Client side" id="link2">
		<xp:eventHandler event="onclick" submit="false">
			<xp:this.script><![CDATA[XSP.showContent("#{id:dynC}","key2")]]></xp:this.script>
		</xp:eventHandler>
	</xp:link>
	<xe:dynamicContent id="dynC" useHash="true">
		<xp:this.facets>
			<xp:panel xp:key="key1">Content1</xp:panel>
			<xp:panel xp:key="key2">Content2</xp:panel>
		</xp:this.facets>
	</xe:dynamicContent>
</xp:view>





Copy and paste this snippet into the source panel of a new xpage or custom control to quickly get started using the Dynamic Content control.
two links are provided for loading the content both client and server side.

Requires Notes or Domino 8.5.x and Extension Library

XPages
Thomas Adrian
March 8, 2012 4:53 AM
Rating
806

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.



No comments yetLogin first to comment...