Monday, December 1, 2014

Orbeon Forms 4.7.1

Today we released Orbeon Forms 4.7.1 PE. This update to Orbeon Forms 4.7 PE contains bug-fixes, security fixes, performance improvements, and localization improvements. We recommend this update for all Orbeon Forms 4.7 PE users.

Specifically, this release addresses the following issues:
  • Form Builder
    • Renaming an action duplicates it (#1913)
    • FB user sees all forms in summary page if role is not found (#1963)
    • Test mode: Validate button shows instead of inner buttons (#2002)
    • Publish: document parameter value is not encoded (#1985)
    • Exception when calling dataMaybeMigratedTo() (#1986)
    • FB: Keyboard focus is not on first dropdown when present upon new (#2010)
  • Form Runner
    • Automatic PDF performance improvements
      • Requests for resources must be internal (#1995)
      • Don't store XForms document in cache (#1999)
      • Automatic PDF output should cache images (#1996)
    • Other automatic PDF improvements
      • Grid rows without visible controls must not take space (#2004)
      • Page number/count loses alignment if form title is too long (#2005)
      • Don't let long title wrap in header or footer (#2006)
      • Show form logo on PDF header (#2007)
      • Textarea content must wrap (#2008)
    • PDF templates improvements
      • Automatically decide whether to use label or value (#736)
      • Non-boolean checkboxes don't work (#1987)
      • fr:number is always blank (#1955)
      • fr:xforms-inspector causes PDF template error (#1949)
    • XVT not evaluated for `uri` in `send` action (#1972)
    • xxf:itemset() not working anymore now that we use fr:dropdown-select1 (#1856)
    • Add a few missing Swedish resources
  • XForms
    • Incorrect check on headers in Connection (#1933)
    • Error dialog not working (#1938)
    • Don't log full stack trace of session expiration messages (#1979)
    • Serializer not to filter elements in no namespace (#1981)
    • Default value for Dynamic Data Dropdown is lost when pasting form source (#1962)
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.

    Please send feedback:
    We hope you enjoy this release!

    PostgreSQL support in Orbeon Forms

    According to the DB-Engines database ranking by popularity, the top 5 relational databases are: Oracle, MySQL, SQL Server, PostgreSQL, and DB2. In 4.6 we added support for SQL Server. The upcoming 4.8 adds support for PostgreSQL, thus completing Orbeon Forms support for the top-5 relational databases.

    Past the top-5, we find Access and SQLite, which are typically not used in the type of server-side environments our customers have in place. The next candidate would be Sybase, but we're then getting pretty low on the popularity curve, and we've yet to encounter a customer who wouldn't be able to use Orbeon Forms without Sybase support. So it is with a certain sense of accomplishment that we're adding the support for PostgreSQL, thus allowing Orbeon Forms to reasonably claim it "supports, out-of-the-box, all the top relational databases".

    And for this, we have to thank Aaron Spike, from the Martin Luther College, who implemented and contributed the implementation for PostgreSQL. Thank you, Aaron!

    Friday, September 26, 2014

    Orbeon Forms 4.7

    Today we released Orbeon Forms 4.7!

    Major features and enhancements
    • Server-side embedding API. Orbeon Forms 4.7 introduces a new way to integrate forms within Java (and other Java Virtual Machine-based languages) applications: server-side embedding. (doc, blog)
    • Internal service requests. Orbeon Forms often needs to perform requests to itself, such as calling its own persistence layer implementations, as well as for internal page navigation. In previous versions, Orbeon Forms performed HTTP requests on itself. This could cause problems, such as using more servlet container threads, slower performance, and interference with servlet filters. Internal requests no longer use actual HTTP connections, which addresses these issues.
    • Improved Liferay proxy portlet support.
      • The proxy portlet uses a better and more configurable HTTP client to connect to Form Runner. In particular, this means that gzip compression can be supported between Form Runner and the portlet.  (doc)
      • The WAR file is much smaller than before (1.7 MB).
      • The portlet supports dynamic form selection from URL parameters. Note that this is disabled by default for security reasons. (doc)
    • Form Builder improvements.
      • Itemsets in actions support internationalization. (docblog)
      • You can control required values with formulas. (docblog)
    • Multiple remote servers. The Form Runner Home page supports multiple remote servers. You can, for example, configure a staging and a production server. (docblog)
    • Flat view support with DB2. Previously, the flat view was supported with Oracle only. It is now also supported with DB2. (doc)
    • Improvements to simple processes.
      • New set-data-status action. (doc)
      • New setvalue action. (doc)
      • Support XVT in success-message and error-message actions. (doc)
      • Ability to set and clear fields with the duplicate action. (doc)
      • Ability to send form metadata to a service. (doc)
    • New APIs.
      • Service API to duplicate form data. (doc)
      • Service API to list form data attachments. (doc)

    See Localizing Orbeon Forms for the latest localization support. Localization depends on volunteers, so please let us know if you want to help!

    Other new features and bug-fixes

    Including the major features and enhancements above, we closed about 40 issues since Orbeon Forms 4.6.2 (and over 60 since 4.6).
    Current browser support
    • Form Builder (creating forms):
      • Chrome 38 (latest stable version, plus the current dev channel)
      • Firefox 32 (latest  stable version, plus the current Firefox ESR)
      • IE 11
      • Safari 8
      • Additional support for Form Runner (accessing form):
        • IE 8 and IE 9
        • Safari Mobile on iOS 6, iOS 7 and iOS 8
        • Chrome for Android (stable channel)
      Compatibility notes
      • Browser support
        • For end-users (when accessing forms, e.g. through Form Runner) – Support for IE7 was deprecated in Orbeon Forms 4.5, and isn't supported anymore started with Orbeon Forms 4.7.
        • For form authors (using Form Builder) – In Orbeon Forms 4.7, we used to support both IE10 and IE11; since in most cases IE10 auto-updates to IE11, the share of IE10 dropped very quickly after IE11 was released in October 2013. So, in Orbeon Forms 4.7, we decided to drop support for IE10. Going forward, for Form Builder, we plan to only support the latest release of IE.
      • Portlets. Support for loading portlet content asynchronously has been removed. This had been introduced to improve portlet loads with slower browsers such as IE 7, which is no longer supported.
      • Property deprecation. The property is deprecated and replaced with the new property.  If is set and not empty, it takes precedence over the new property, for backward compatibility.
      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.

        Please send feedback:
        We hope you enjoy this release!

        Monday, September 22, 2014

        Internationalization in actions used to populate selection controls

        When you create a form in Form Builder, if you have selection controls (dropdowns, checkboxes, radio buttons, lists, and the like), in most cases you know in advance what choices you want to offer your users. For instance, this is the case if you have a field allowing users to select a state, or marital status, or age bracket.

        But in other cases you don't want to hard-code the choices in the form; maybe you don't know ahead of time what the choices are, or they are likely to change, or you don't want to duplicate that list across several forms. In all those cases, you'll want to rely on a list returned by a service (a database query or a REST/web service).

        Starting with the upcoming 4.7 release, if your form is available in several languages, you can also define how the labels in those different languages is to be extracted from what is returned by the service. For more on this, see the documentation on internationalization in actions.

        Thursday, September 11, 2014

        Control required values with formulas in Orbeon Forms 4.7

        Up to Orbeon Forms 4.6, Form Builder only lets you determine whether a field is required or not once and for all, by saying "Yes" or "No.

        With the upcoming Orbeon Forms 4.7, you can also choose to use a formula, which means that the choice can be dynamic: for example, a field might be required only if another field is set to a specific value.

        As usual, you express the formula with an XPath expression, which gives you access to all of the form's data as well as the Orbeon Forms XPath function library.

        For more details, see the documentation.

        Wednesday, September 3, 2014

        Embedding support in Orbeon Forms 4.7

        So far there have been a couple of ways to integrate Orbeon Forms with existing applications:
        • Side by side: linking or posting data from other applications to Orbeon Forms pages, and linking or posting data from Orbeon Forms to other applications.
        • Embedded in a portal: using the full portlet or the proxy portlet within Liferay.
        Orbeon Forms 4.7 introduces a new way to integrate forms within Java (and other Java Virtual Machine-based languages) applications: server-side embedding.

        Your application simply includes a small JAR file, adds some configuration parameters, and then each page which needs to embed a form simply calls the API to tell which form to embed. You control where in your page the form must show, which means that your page can include your own header, footer, sidebars, and other content in addition to the form.

        A form embedded in a simple page with a top banner
        See the documentation for more details.

        Monday, August 25, 2014

        Fail to handle the session properly, and make your site useless

        I was recently on vacation abroad. Just before taking the flight back home, I embarked on the mundane task of doing the online check-in for my return flight. The process started nicely, on what looked like a modern and well designed site; it was obvious that a lot of care went into creating that site.

        Then, I arrived at the page where you need to enter information about yourself and family members traveling with you: passport number, expiration date, address of residence, information about the green card when it applies, and so on. In my case, with 4 family members, that was a pretty long page. I had all the passports handy, but it still took me maybe 10 minutes to enter that information. Apparently, I wasn't fast enough: upon pressing the Next button, I got that dreadful your session has expired message.

        I ended up preparing all the information required for the form in a text file, so I could just copy-paste it very quickly, and fill out the form before the session could expire. Check-in done. But I seriously doubt that many people manage to get through this process. See such a nicely designed site completely fail because of a session issue is a shame.

        The thing is that doing it right isn't as easy as it seems. You have to deals with competing requirements:

        1. Having a session last for a longer time is worse for security and uses more resources on your servers.
        2. But of course, the session should last long so the site is actually usable, and users don't get a session expired while filling out a form.

        Say you setup your server to have the session last only 10 minutes, favoring security and lower resource usage on your server. The issue is that the "counter" typically gets reset every time users submit a form, e.g. click on the next button in a wizard. This means that if you have a long form, you're saying your users must fill it out in less than 10 minutes, which might not be possible. But of course, you can do better:

        1. Why not "reset the counter" every time users fill out a field? This way, whatever the length of the form is, the session will only expire after 10 minutes of true inactivity.
        2. If you want to be more aggressive about keeping the session alive, why not prevent it from expiring as long as users have a tab open pointing to your site?

        Orbeon Forms does both. Out-of-the-box1. And we think every site should do the same. (Especially if those I use to check-in before an international flight with 4 family members.)

        1 In Orbeon Forms, the feature that keeps the session alive as long as users have a tab open is called session heartbeat. Since doing this does put more strain on your servers, you have the option of disabling session heartbeat.