Hi
I am trying to create Orbeon form dynamically. For that, I have written an XSLT to generate the xml content for some controls. But there are lots of UI controls for which I have to stille write XSLT. The XSLT basically needs to create the xml content for the needed controls bsed on input data(text and text typ like text field, table etc.) . So wanted to know if there is any existing template which could help me write XSLT for all the avaiable orbeon form controls? -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Vikas,
You could use the template provided by each component. It is part of the component metadata, and is indeed used by Form Builder to insert the component into the form. For instance, search for `<templates>` in the source of the number component: https://github.com/orbeon/orbeon-forms/blob/master/form-runner/jvm/src/main/resources/xbl/orbeon/number/number.xbl Would this work for the use case you have in mind? -Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi
Thanks for the reply. So are you suggesting to use XBL and not XSLT?. I am not very much aware with XBL. Can I generate the the orbeon form data xml using XBL? -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by Alessandro Vernet
Also we have a scenario where we want to differentiate between the fields
which are dynamically generated and the one which are added using formBuilder. So is there any kind of metadata we can add in content xml during component creation, so that it does not break during rendering and we can use it for differentiating the component? -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by Alessandro Vernet
Hi
Thanks for your inputs. For our usecase, we need some kind of API if available from Orbeon Form engine which can take component name and return us the component xml. This will help us to create the component on the fly. Please provide your inputs. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
In reply to this post by vikaha
Hi Vikas,
I wasn't suggesting that you write your own form definition generation code in XBL, but that your code uses the control templates found in the XBL files bundled with Orbeon Forms. Currently, there is no API that returns the template: instead, you'll need to write code that locates the XBL for a given control, and extracts the template from that XBL. You'll let me know if this works for you. -Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Thanks Alex for the information.
I was thinking to use the template content to create form component on the fly. When creating a form definition, I need to set content in xml form for these component so that it can be rendered on Formbuilder UI. But the template content looks very much different from the xml content which gets generated for the UI component. So I am not getting how can I use the template part to replace in my content xml. Please let me know your suggestion. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by Alessandro Vernet
Thanks Alex for the information.
I was thinking to use the template content to create form component on the fly. When creating a form definition, I need to set content in xml form for these component so that it can be rendered on Formbuilder UI. But the template content looks very much different from the xml content which gets generated for the UI component. So I am not getting how can I use the template part to replace in my content xml. Please let me know your suggestion. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Vikas,
Let's make sure we're talking about the same thing: if you look at, say, `number.xbl`, under `/xbl:xbl/xbl:binding/fb:metadata/fb:templates/fb:view`, you will see: <fr:number xmlns:xf="http://www.w3.org/2002/xforms"> <xf:label ref=""/> <xf:hint ref=""/> <xf:help ref=""/> <xf:alert ref=""/> </fr:number> This is exactly what is inserted in the view when you add that control with Form Builder. In fact, this is what Form Builder does: it has no built-in knowledge of what a "number field" looks like, and it is the number field that tells Form Builder what should be inserted. Does this help? -Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
Hi Vikas, just curious: have you managed to use the XBL source to extract the
information you needed to insert in the form? -Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex
Thanks for the information. Currently focusing on other part. I will update once I am able to extract te component. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Got it Vikas, and thanks for the update. -Alex
----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |