We are using xbl to write our components which has its own javascript file. These components are then used in xform definition files.
Case 1: WORKS Custom component1 Custom component1 used in xform definition Case 2: DOES NOT WORK Custom component1 containing component2 Component 1 used in xform definition Result: Component1 is rendered properly but I see component2 tag definition in html. Basically component2 is not processed. Both components have same name space. Case 3: WORKS Custom component1 containing component2 Component1 used in xform definition Component2 used in xform definition Result: Magically component2 is displayed twice one from component1 and other from xform definition. Case 3 is not what I want. I want component1 to containing a reusable custom component2 but can't seem to make it work. Any help is appreciated. I would be more than happy to provide further information. Thank you. |
Administrator
|
Binesh,
See my response to the thread linked below (I think we can keep the discussion in that thread, since this is the same topic): http://orbeon-forms-ops-users.24843.n4.nabble.com/Embedded-xbl-components-td2227131.html#a2227131 Alex On Fri, May 21, 2010 at 7:51 PM, Binesh Gummadi <[hidden email]> wrote: > We are using xbl to write our components which has its own javascript file. > These components are then used in xform definition files. > > Case 1: WORKS > Custom component1 Custom component1 used in xform definition > > Case 2: DOES NOT WORK > Custom component1 containing component2 Component 1 used in xform definition > Result: Component1 is rendered properly but I see component2 tag definition > in html. Basically component2 is not processed. Both components have same > name space. > > Case 3: WORKS > Custom component1 containing component2 Component1 used in xform definition > Component2 used in xform definition Result: Magically component2 is > displayed twice one from component1 and other from xform definition. > > Case 3 is not what I want. I want component1 to containing a reusable custom > component2 but can't seem to make it work. Any help is appreciated. I would > be more than happy to provide further information. Thank you. > ________________________________ > View this message in context: Having trouble using a component inside an > other component > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Thanks for your reply.
I have created two components separately i.e two xbl files. <fr:image-manager> image-manager.xbl image-manager.js This is how <fr:image-manager> looks <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml" <xbl:binding id="fr-banner-manager" element="fr|banner-manager"> <xbl:template xxbl:transform="oxf:unsafe-xslt"> <xsl:transform version="2.0"> <xsl:import href="oxf:/oxf/xslt/utils/xbl.xsl" /> <xsl:template match="/*"> <xforms:group xbl:attr="model context ref bind" xxbl:scope="outer"> <fr:image-preview /> </xforms:group> </xsl:template> </xsl:transform> </xbl:template> </xbl:binding> </xbl:xbl> I am unable to use <fr:image-preview> inside <fr:image-manager>. You think this should work? We might be doing something silly. |
Administrator
|
Hi Binesh,
Yes, this should work. For instance, as a "user" of the <fr:tabview>, you can place a <fr:button> in a tab. Or as an author of the <fr:alert-dialog>, in the XBL code implementing the <fr:alert-dialog>, you can use an <fr:button>. This reminds me that it was not possible at some point in the past; are you using Orbeon Forms 3.8 or a recent nightly build? Alex On Mon, May 24, 2010 at 2:58 PM, Binesh Gummadi <[hidden email]> wrote: > > Thanks for your reply. > > I have created two components separately i.e two xbl files. > > <fr:image-manager> > image-manager.xbl > image-manager.js > > This is how <fr:image-manager> looks > <xbl:xbl xmlns:xhtml="http://www.w3.org/1999/xhtml" > <xbl:binding id="fr-banner-manager" element="fr|banner-manager"> > <xbl:template xxbl:transform="oxf:unsafe-xslt"> > <xsl:transform version="2.0"> > <xsl:import href="oxf:/oxf/xslt/utils/xbl.xsl" /> > <xsl:template match="/*"> > <xforms:group xbl:attr="model context ref bind" xxbl:scope="outer"> > > <!-- this is where the problem is. I see this tag in html --> > <fr:image-preview /> > > </xforms:group> > </xsl:template> > </xsl:transform> > </xbl:template> > </xbl:binding> > </xbl:xbl> > > I am unable to use <fr:image-preview> inside <fr:image-manager>. You think > this should work? We might be doing something silly. > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Having-trouble-using-a-component-inside-an-other-component-tp2226879p2229267.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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
I am able to use built in components. I am not able to use custom components that I created. I am using 3.7.2-SNAPSHOT.
Thanks |
Administrator
|
Binesh,
The XBL engine doesn't make a difference between components that ship with Orbeon Forms, or your own. They are all treated the same. So again, I suggest you create a simple test case to reproduce this, so we can have a look at it. Alex On Mon, May 24, 2010 at 7:53 PM, Binesh Gummadi <[hidden email]> wrote: > > I am able to use built in components. I am not able to use custom components > that I created. I am using 3.7.2-SNAPSHOT. > > Thanks > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Having-trouble-using-a-component-inside-an-other-component-tp2226879p2229437.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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Thanks for your suggestion Alessandro. Issue was with 3.7.1 release. I upgraded to latest 3.8 and it is working now.
|
Administrator
|
Binesh,
Thank you for confirming this indeed works. For a second, you got me worried there :). Alex On Fri, May 28, 2010 at 12:41 PM, Binesh Gummadi <[hidden email]> wrote: > > Thanks for your suggestion Alessandro. Issue was with 3.7.1 release. I > upgraded to latest 3.8 and it is working now. > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Having-trouble-using-a-component-inside-an-other-component-tp2226879p2235095.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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |