Tuesday, June 2, 2009

Orbeon Development Tips

Debugging XPL pipelines

Debugging a pipeline (XPL) is not always easy but Orbeon has a handy "debug" attribute that can be added to any <p:input> or <p:output> . When this attribute is present, the document that passes through that input or output is logged to the Orbeon Forms log output. For example:
 <p:input name="data" href="#instance" debug="update-profile-instance"/>
Including custom CSS stylesheets

The Orbeon examples seem to suggest that if you need custom styles in your xforms page, you need to add inline styles directly in your page. In fact, trying to add a <link href="".../> does not work out of the box for some reason (I presume it is somehow related to the processing done by the epilogue processor). Anyway, this is not a problem if you have special needs for a specific page but if you want to reuse your style definitions across several pages, the cut and paste approach is simply not acceptable.

Here is a trick I found to easily add a file-based stylesheet to Orbeon xforms pages. Simply insert an element such as the following in the head section of your page:
 <xi:include href="oxf:/config/theme/my-styles.css"/>
Obviously, you need to add the "xi" namespace to your pages.

Epilogue (!)
Don't be shy to share your tips with other readers by commenting on this article.

No comments:

Post a Comment