#{id:} working weirdly

Hello all,I have another weird bug to submit you all.

Imagine a very basic custom control defining a field.

That field is defined via an inputText, with a simpleField ID.

Right after that field, we have a simple button executing client script :

alert(dojo.byId(“#{id:simpleField}”).value);

nOW, imagine an XPAGE including our custom control twice.

guess what?

the second button always displays the content of the first field.

Looks like an ugly bug to me.

Here is the source code :

1 : Multi custom control

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

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

<xp:inputText id=“simpleField”/>

<xp:button value=“display value” id=“btn”>

<xp:eventHandler event=“onclick” submit=“false”>

xp:this.handlers

<xp:handler type=“text/javascript”>

xp:this.script<![CDATA[

alert(dojo.byId(“#{id:simpleField}”).value);

]]></xp:this.script>

</xp:handler>

</xp:this.handlers>

</xp:eventHandler>

</xp:button>

</xp:view>

2 Main XPAGE

<?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:multi/

xp:br/

xc:multi/

</xp:view>

Looks like a serious hit in the xpage component approach to me.