Inspect RendererType, Component Family and StyleKitFamily for a Component


<?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">

	<!--
		Bind the Component that you want to inspect to a request scope
		variable by using the 'binding' property We Will use 'myComponent' as
		scope variable name
	-->
	<xe:widgetContainer id="widgetContainer1"
		titleBarText="Hi there" binding="#{requestScope.myComponent}">
	</xe:widgetContainer>

	<!-- Output the properties of that Component -->
	<xp:table>
		<xp:tr>
			<xp:td>
				<xp:label value="Component Family" id="label1"></xp:label>
			</xp:td>
			<xp:td>
				<!--
					Output the Component's Component Family using getFamily() 'family'
					in EL Notation
				-->
				<xp:text escape="true" id="computedField1"
					value="#{requestScope.myComponent.family}"></xp:text>
			</xp:td>
		</xp:tr>
		<xp:tr>
			<xp:td>
				<xp:label value="Renderer Type" id="label2"></xp:label>
			</xp:td>
			<xp:td>
				<!--
					Output the Component's Renderer Type using getRendererType()
					'rendererType' in EL Notation
				-->
				<xp:text escape="true" id="computedField2"
					value="#{requestScope.myComponent.rendererType}"></xp:text>

			</xp:td>
		</xp:tr>
		<xp:tr>
			<xp:td>
				<xp:label value="StyleKit Family" id="label3"></xp:label>
			</xp:td>
			<xp:td>
				<!--
					Output the Component's Style Kit Family using getStyleKitFamily()
					'styleKitFamily' in EL Notation
				-->
				<xp:text escape="true" id="computedField3"
					value="#{requestScope.myComponent.styleKitFamily}"></xp:text>
			</xp:td>
		</xp:tr>

	</xp:table>

</xp:view>
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...