Posted by Grégoire Neuville on URL: https://discuss.orbeon.com/Custom-XBL-component-tp4196663p4196744.html
Hi,
The xforms:trigger control bears an id but is in outer scope in your
component. You cannot do that : every control with an id should be in
inner scope. So, you should end up with something like :
On 14 December 2011 20:36, marek2608 <[hidden email]> wrote:
> Hi I am trying to build a new component using the tutorial:
> http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components-guide >
> I'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.
>
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Custom-XBL-component-tp4196663p4196663.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws >