Xpage & computed custom control

hi,

is there a way to have xpage computed custom control in the same way as computed subform?

my current answer is: no, but I am not happy about that.

Subject: It should though it depends on your scenario

Forgetting about subforms for a minute a computed custom control on a XPage should be possible.What’s the detail on the scenario?

Subject: document header

i want to have document header with options, history, and many other things.

the right document (document type) would be a custom control hosted in header.

the document would have field that does specify what is the custom control for the document type. upon that value, proper custom control would be loaded and hosted in the header.

Subject: Have you considered using the visible option?

<?xml version="1.0" encoding="UTF-8"?>

<xp:view xmlns:xp=“http://www.ibm.com/xsp/core” xmlns:xc=“http://www.ibm.com/xsp/custom”>

<xc:ccRED>

	<xc:this.rendered><![CDATA[#{javascript:sessionScope.val01 == "red"}]]></xc:this.rendered>

</xc:ccRED>

<xc:ccGREEN>

	<xc:this.rendered><![CDATA[#{javascript:sessionScope.val01 == "green"}]]></xc:this.rendered>

</xc:ccGREEN>

<xp:br></xp:br>

<xp:button value="Change Colour" id="button1">

	<xp:eventHandler event="onclick" submit="true"

		refreshMode="complete">

		<xp:this.action>

			<xp:setValue binding="#{sessionScope.val01}">

				<xp:this.value><![CDATA[#{javascript:var clr = sessionScope.val01;

if (clr ==“red”){“green”

}

else{“red”

}}]]></xp:this.value>

			</xp:setValue>

		</xp:this.action>

	</xp:eventHandler>

</xp:button>

</xp:view>

Subject: will not work but i will try with ‘Include page’

will not work because it should be any control i create in future.