3

I am very familiar with web technologies (HTML, JavaScript, CSS), but not with XBL and XForms. I would like to package a "widget" inside an XBL component, so it can be exposed to Form Builder, and used by form authors creating forms with Form Builder. What would be a good place to start learning how to do this? Do you have recommendation on the tools to use to edit XBL/XForms?

avernet
  • 30,895
  • 44
  • 126
  • 163

1 Answers1

2

Getting started

  • This answer provides a good overview of what needs to be added to your XBL control so it can be used in Form Builder.
  • For more information on how to provide Form Builder specific metadata for your XBL control, see the documentation on <fb:metadata>.
  • Looking at examples always helps: the source of all the build-in XBL controls is available on GitHub.
  • If you want Form Builder to reload the component, all you need to do is click on the green icon with 2 arrows at the top of the Form Builder left bar (no need to restart your app server, or even reload Form Builder).

Tools and debugging

  • When editing XML, it helps to have a decent editor that would at least make sure what you type is well-formed XML, and maybe help you indent things properly. At Orbeon, we use IntelliJ because in addition to XML it also has good support for Scala, Java, JavaScript, CSS, LESS, which we use in Orbeon Forms.
  • For debugging, you can enable the XForms inspector. The inspector helps you see live what the state of all the instances is, including those inside XBL components. Make sure the property is set to false when you first load Form Builder (the inspector doesn't show properly with Form Builder), then set it to true, and hit the test button on your forms: the inspector will show at the bottom of your form.

Specific questions

If you have specific questions about programming with XBL in Orbeon Forms, I would encourage you to use Stack Overflow and ask them with the tags orbeon and xbl, so they can then be found more easily.

Community
  • 1
  • 1
avernet
  • 30,895
  • 44
  • 126
  • 163