Thursday, May 30, 2013

Orbeon Forms 4.2

Today we released Orbeon Forms 4.2!

The defining feature of Orbeon Forms 4.2 is support for more powerful Form Runner buttons. Buttons can now be configured in a much more flexible way to trigger simple sequential processes to execute when the user presses a button. See the blog post for an introduction to this feature and the documentation for more in-depth details.

In addition, we introduce the following new features since Orbeon Forms 4.1:
  • Form Builder
    • More HTML labels. You can now enter HTML in the labels of checkboxes and radio buttons in the Edit Choices dialog (Orbeon Forms 4.1 introduced this ability for control labels and hints).
  • Form Runner
    • Improved attachment control. The "cancel" button works more promptly, user messages and error handling are improved, and the control is now localized in French.
    • Wizard view. Small improvements including more flexible buttons placement.
    • Dropdown-date control. There is a new property to configure the start date in the fr:dropdown-date control and the control is now localized in French.
  • XForms engine
    • Upload. We implemented many improvements to the xf:upload control, including a more efficient way to interrupt ongoing uploads and support for the new xxforms-upload-error event (documentation). We also documented the existing upload events: xxforms-upload-startxxforms-upload-cancel and xxforms-upload-done (documentation).
    • Internationalization. The new xxf:r() function (blog post, documentation) makes it easier to access resources for the current language, and readonly XBL components resources are now shared in memory for more efficiency.
    • New xxf:get-request-method() function. This XPath function allows you to get the current HTTP method. It adds to the existing functions to get request parameters, headers, and attributes (documentation).
    • New xxf:get-portlet-mode() and xxf:get-window-state() functions. These functions provide access to the portlet mode and window state when running in a portal with the full portlet.
Here is the complete list of changes since Orbeon Forms 4.1:
  • Form Builder
    • FB: Ability to enter HTML labels in checkboxes and radio buttons itemsets (#965)
    • FB: Test mode shows warning icon (#883)
    • Move/nicer "Edit Itemset" icon (#662)
    • FB: Users with access to one app can't get past the initial dialog (#1006)
  • Form Runner
    • Universal send button (#885)
    • Wizard: support navigation buttons alongside other buttons (#937)
    • Wizard: scroll to section top when changing sections (#964)
    • Wizard: option to place buttons under section (#958)
    • Property to configure the start date in the dropdown-date control (#954)
    • Localize dropdown-date in French (#955)
    • attachment.xbl hardcodes "Download" string (#949)
    • Proxy portlet header forwarding must not change header case (#891)
    • Full portlet: PDF output fails (#882)
    • Move status icons to navbar (576bff4598)
    • PDF URL sent after first time (#948)
    • With PDF template, and barcode enabled, PDF generation fails (#1004)
    • PDF: font pitch and size are incorrectly updated in group (#1007)
    • DMV-14: use wizard view (8eee39bf3e)
    • Upload: FR must show informational/error messages (#1010)
    • Full portlet: Saving image attachment fails (#1038)
  • XForms engine
    • YUI wait_mask keeps being added (#957)
    • NPE in XFormsModelSchemaValidator on second page load (#951)
    • xxf:get-request-header('User-Agent') returning an empty sequence (#926)
    • XBL: share readonly inline instances (#969)
    • XPath dependencies: support AVT analysis (#972)
    • XPath dependencies: xxf:lang() and xxf:format-message() (69dfe25bb8)
    • xxf:r() function (#970)
    • Seeing message on the console: "Warning: Comparison of xs:untypedAtomic? to xs:integer will fail unless the first operand is empty" (#975)
    • Support xxf:expose-xpath-types on per-instance basis (3db9fb1510)
    • Lightweight syntax for HTML item labels (#945)
    • Upload: spinner shows over dialog for a while (#962)
    • Upload: temp file not deleted when user clears field (#983)
    • Upload: better way to interrupt upload from server (#985)
    • Upload: show message if upload fails (#1013)
    • Improve upload appearance with Firefox (2a3a7132fb)
    • JavaScript error when canceling upload (#999)
    • New xxf:get-request-method() function (#986)
    • Month/date date incorrectly parsed (#998)
    • New xxforms-upload-error event (f5365e55cb) (documentation)
    • Add xxf:get-portlet-mode()/xxf:get-window-state() (c70e342707)
    • `orbeon` class not added when going through XForms filter or when using theme-plain.xsl (#877)
NOTE: Alfresco support is removed in this version. Based on feedback, we hope to restore it for Orbeon Forms 4.3 (see #987).

You can download the latest version of Orbeon Forms from the downloads page.

Don't forget to grab a trial license for the PE version.

We hope you enjoy this release!

Please send feedback:

Wednesday, May 15, 2013

Automatic schema generation for forms you create in Form Builder

When you create a form with Form Builder, behind the scene, data entered by users in the form is collected in an XML document. That same XML document is sent to the persistence API, and if you are using one of the built-in implementations of the persistence API, that XML document is also saved in your database of choice.

The structure of those XML documents is driven by the names you give to sections, repeats, and controls when you create your form in Form Builder, so you know what the XML will look like. But what if downstream, software is consuming those XML documents? A better way to communicate what the XML "looks like" to software is by using an XML schema. And this is why Orbeon Forms 4.0 PE introduced a new service which can automatically produce an XML schema describing the structure of the XML data collected by each form you built with Form Builder.

The service that produces the schema is accessible at /fr/[app]/[form]/schema for versions 4.0 to 4.3 and at /fr/service/[app]/[form]/schema for versions 4.4 and newer. Like other services, since 4.0, it is protected by default, and thus isn't just accessible by end users trying to load that URL.

Tuesday, May 14, 2013

Easier localization

Image by Tobias Mikkelsen
Form Builder and Form Runner support internationalization out of the box. Concretely this means that you can create a form and localize resources such as control labels, hints, and selection lists into multiple languages.

Internally, this is implemented in Form Runner with:
  • A special XForms instance, fr-form-resources, which holds an XML document with the resources in one or more languages.
  • Logic to pick the current language based on a number of factors (such as whether a specific language was requested with a URL parameter, or was already stored in the session, or was selected by the user).
  • XForms logic which points to the current resources according to the current language and makes them available to all controls via an XForms variable called $form-resources.
One issue with this approach is that the logic must be duplicated, in particular within XBL components (including section templates).

So in Orbeon Forms 4.2, we introduce a new function called simply r (for "resource"), which you typically call with xxf:r('resource.name'). The function name is short as it might be used very often!

This function removes the need for the boilerplate logic in each form and XBL component (the resources instance, of course, remains). Here is a simple example:
<xf:item>
    <xf:label value="xxf:r('year')"/>
    <xf:value/>
</xf:item>
With Orbeon Forms 4.2, this function is only used by a few XBL components. In the future we plan to update all XBL components as well as Form Runner and Form Builder to use this mechanism.

Monday, May 6, 2013

Orbeon Forms 4.2 M1

Today we released Orbeon Forms 4.2 M1, a milestone build for the upcoming Orbeon Forms 4.2 release. This is not a stable release.

This release contains the following new features:
  • Form Builder
    • Ability to enter HTML labels in checkboxes and radio buttons itemsets.
  • Form Runner
    • More powerful buttons which allow specifying simple sequential processes to execute when the user presses a button (see this blog post).
    • Wizard view improvements including more flexible buttons placement.
Here is the complete list of changes since Orbeon Forms 4.1:
  • Form Builder
    • FB: Ability to enter HTML labels in checkboxes and radio buttons itemsets (#965)
    • FB: Test mode shows warning icon (#883)
    • Move/nicer "Edit Itemset" icon (#662)
  • Form Runner
    • Universal send button (#885)
    • Wizard: support navigation buttons alongside other buttons (#937)
    • Wizard: scroll to section top when changing sections (#964)
    • Wizard: option to place buttons under section (#958)
    • Property to configure the start date in the dropdown-date control (#954)
    • Localize dropdown-date in French (#955)
    • attachment.xbl hardcodes "Download" string (#949)
    • Proxy portlet header forwarding must not change header case (#891)
    • Move status icons to navbar (576bff4598)
    • Compatibility note: Alfresco support is removed in this version. If you have any interest, please contact us!
  • XForms engine
    • YUI wait_mask keeps being added (#957)
    • NPE in XFormsModelSchemaValidator on second page load (#951)
    • xxf:get-request-header('User-Agent') returning an empty sequence (#926)
    • XBL: share readonly inline instances (#969)
    • XPath dependencies: support AVT analysis (#972)
    • XPath dependencies: xxf:lang() and xxf:format-message() (69dfe25bb8)
    • xxf:r() function (#970)
    • Seeing message on the console: "Warning: Comparison of xs:untypedAtomic? to xs:integer will fail unless the first operand is empty" (#975)
    • Support xxf:expose-xpath-types on per-instance basis (3db9fb1510)
    • Lightweight syntax for HTML item labels (#945)
You can download the builds using these links:
Don't forget to grab a trial license for the PE version.

Please send feedback: