Posted by
marek2608 on
URL: https://discuss.orbeon.com/Custom-XBL-component-tp4196663.html
Hi I am trying to build a new component using the tutorial:
http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components-guideI'v created a file under /WEB-INF/resources/xbl/rpm/hyperlink.xbl
and coded the following contents:
<xbl:xbl xmlns:xhtml="
http://www.w3.org/1999/xhtml" xmlns:xforms="
http://www.w3.org/2002/xforms" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:ev="
http://www.w3.org/2001/xml-events" xmlns:xxforms="
http://orbeon.org/oxf/xml/xforms" xmlns:fr="
http://orbeon.org/oxf/xml/form-runner" xmlns:xbl="
http://www.w3.org/ns/xbl" xmlns:xxbl="
http://orbeon.org/oxf/xml/xbl" >
<xbl:binding element="fr|hyperlink">
<xbl:template>
<xforms:group xbl:attr="model context ref bind" xxbl:scope="outer">
<xbl:content includes="xforms|label,xforms|help,xforms|hint,xforms|alert"/>
<xforms:trigger xmlns=""
appearance="minimal"
id="">
<xforms:action ev:event="DOMActivate">
<xforms:load ref="fr|hyperlink > xforms|label" show="new"/>
</xforms:action>
</xforms:trigger>
</xforms:group>
</xbl:template>
</xbl:binding>
</xbl:xbl>
And reference it in the form definition in the heading:
<xi:include href="oxf:/xbl/rpm/hyperlink/hyperlink.xbl" xxi:omit-xml-base="true"/>
When I add my component to the form definition in Form Builder:
<fr:hyperlink id="control-2-control" bind="control-2-bind">
<xforms:label ref="$form-resources/control-2/label"/>
<xforms:hint ref="$form-resources/control-2/hint"/>
<xforms:help ref="$form-resources/control-2/help"/>
<xforms:alert ref="$fr-resources/detail/labels/alert"/>
</fr:hyperlink>
And test run it, I get the following error:
Duplicate id found for effective id: control-2-control$xf-454
I'm not to sure where it comes from, what is it refering too?
Thanks in advance.