XForms

Books

by Dan

Implementations

- Server side solution stack
Mozilla XForms
XSmiles

XForms Blog
Last changed Oct 28, 2008 23:22 by Arun Batchu
Labels: orbeon, xforms, error, tip, workaround, calculate

Discovered what appears to be a problem in calculating big decimals (greater than 1,000,000 ). I have a requirement where the total is a sum of all line items.

Each of the $ amounts on the line items is an xs:decimal . The sum is also a decimal. When the sum is greater than 1,000,000, [Orbeon] seems to store the result in an exponential format (e.g. 1.000000E6). This representation is invalid for an xs:decimal (the pink background is a style applied to invalid fields).


I solved the problem by casting the result back into a decimal:
- XPath to the rescue.


Now it looks the way it is desired:

Posted at Oct 27, 2008 by Arun Batchu | 0 comments
Last changed Oct 27, 2008 13:28 by Arun Batchu
Labels: orbeon, xforms

If you want to format a number such as 8988981.00 to look like 8,988,981.00, you would do it like this:

  • Works in <xf:input> element too (according to documentation)
  • Works only with 'ref' attribute and does not work with 'value'
Posted at Oct 27, 2008 by Arun Batchu | 0 comments
Last changed Sep 23, 2008 10:23 by Arun Batchu
Labels: xforms, output-element, image

Use output element for showing images in XForms. Here is how you render an image when you have a URL for an image:

That should render this picture:

Posted at Aug 29, 2008 by Arun Batchu | 0 comments
Last changed May 25, 2008 02:50 by Arun Batchu
Labels: xml, xforms, xquery, xpath, rest

DanMcCreary recently blogged about what he terms XRX on http://xml.com . I could not post my comments there, so I will keep them here until I can...

An elegant introduction to an elegant architecture, Dan. Thank you. The essential takeaway from what you describe is the exploitation of XML from one end to the other end - especially from the Developer's perspective, for, how XRX actually manifests in runtime could be left to implementation technologies. Thus the logical architecture of XRX could be realized by a few variations of concrete technology - which is great. The XForms could be realized by XForms server technology (such as the excellent Orbeon stack), the ReST could be realized by any middle tier and the XQuery could be realized by an XQuery engine (such as Data Direct) that may actually be driving any one or a combination of datastores (XML, SQL, file system or ...) . The symmetrical and consistent leverage of XML as a data model from creation to transport to rest and back eliminates a whole lot of wasteful work. Like you point out, XPath is one of the most powerful query systems I have encountered; you can pack so much in so little and reuse it across the board with little if any change from the drawing board to production. In such a system as you describe, a business rule expressed once can be reused anywhere - from one end-to-end , however long the travel, as long as the architecture is XRX, like you have described. Thanks for expressing it so well. A few of your readers will not get it - it is one of those things that once you experience it, you are left wondering why this did not happen before. Oh, well!

Posted at May 25, 2008 by Arun Batchu | 0 comments
Last changed Jun 24, 2008 14:25 by Arun Batchu
Labels: xforms, xml, builder, orbeon

helps to cross the chasm with their XForms builder. Thanks to AlexBleasdale for sharing.


Tips
*Passing XML as input to your XForm*
In your XForm:

<xf:instance id="edit-params" src="input:instance"/>
makes your input reference reference-able.
You can pass your input like this in your page-flow.xml:

The test.xml looks like this:

The "setValue" tag tells Orbeon to take the user and crvid passed to via the HTTP Querystring like so: &user=john?crvid=19-08-178 and sticks them into the fields.

Figuring these connections out is a nightmare. However, once you figure it out, its nectar.

Posted at May 15, 2008 by Arun Batchu | 0 comments
0%

Task List

Quick Add
  1. handler

    Experiment with xforms prompt element in Orbeon

    MEDIUM
    arun batchu
    Created:
    Nov 11, 2008

Labels

 
  1. Aug 28

    Arun Batchu says:

    Xforms Recursive Action: <xf:action ev:event="checkremoveallfinancearrange...

    Xforms Recursive Action:

Add Comment