Hi Peter,

I have added a page that implements this example. You can view online:

http://www.orbeon.com/oxf/examples/xforms-ubl

It will be included in the next release of OXF, but you can already run it on the local copy of OXF 2.2 by uncompressing the attached file in the resources directory and adding this to the config/controller.xml:

    <page path-info="/examples/xforms-ubl"
        xforms="oxf:/xforms-ubl/xforms.xpl"
        model="oxf:/xforms-ubl/model.xpl"
        view="oxf:/xforms-ubl/view.xsl"/>

This is a good example because it shows how you implement this in OXF, versus how you would implement it with a client-side XForms engine. At a high level:

1) With OXF, the UI is described with XForms controls embedded in XHTML. You create the UI with XSLT, so you can customize the UI at will and you can change it to react to user events (this is how the "details" part is hidden).

2) Actions are handled on the server-side, in the model (MVC model). The upside is that you can anything you want when handling events (accessing a database, calling and EJB, running some XUpdate, etc), and you don't break that MVC model. But for very simple actions (like "add line"), I guess it would be nice to be able to do this directly in XForms. So we are thinking about supporting this in a future version of OXF.

3) Since OXF does not support <xforms:repeat>, the XForms model gets more complex than it should be. To get around this you need to create the appropriate number of order lines with XSLT in the XForms model. We will definitely support <xforms:repeat> in a future version of OXF.

Now let's get down to the details and let's see what is not supported by the OXF XForms implementation:

1) Storing the instance in a separate file, and referencing this file from the XForms model. The instance must be inline in the XForms model.
2) itemset is not supported (i.e. in a list control, referencing the items from the instance, instead of listing the items in the list control). Right now, you need to specify the items in the XForms control.
3) Nested groups are not supported. Instead, you need to specify the full path in the ref attribute of the XForms controls (or at least the path from the node referenced from the top <xforms:group>).
4) The XForms switch module is not supported. If you are fine with a server side implementation of this module, you can easily do this in XSLT (and the example just does that).
5) The XForms repeat module is not supported. Right now, you have to unfold the repeat with XSLT in the view, and create the appropriate number of order lines in the XForms model.
6) The XForms range control is not supported, as there is no equivalent HTML form control.
7) Triggers are not supported. Instead you handle events on the server-side, with actions, or in the model.

Alex


Peter Raftos wrote:

Apologies if this has been asked before:

How do I go about implementing the example XForm presented by Micah Dubinko in "XForms Essentials"? It's available online at http://dubinko.info/writing/xforms/book.html#id2800591

The individual files listed are at
http://dubinko.info/writing/xforms/ubl/

I've downloaded them, and they load without problem in XSmiles. What should my controller.xml file look like to load these from within OXF, and what functionality is missing?

I've had a brief look at this, but feel I'm blundering in the dark.

Thanks

Peter Raftos



Attachment: xforms-ubl.zip
Description: Zip compressed data

_______________________________________________
oxf-users mailing list
[EMAIL PROTECTED]
http://mail.orbeon.com/mailman/listinfo/oxf-users

Reply via email to