views:

89

answers:

1

I am using orbeon to process my xforms. I am attempting to create a data grid that I can use to copy and paste rows/columns of data from my clipboard (excel).

Do you have any clue how I can implement this?

I just stumbled on the ajax dhtmlxgrid.

http://dhtmlx.com/docs/products/dhtmlxGrid/samples/12_initialization_loading/03_grid_int_from_html.html

I am attempting to use a dhtmlxgrid as the front end to an xform. My xform will generate an html table and the dxhtmlgrid will present the ajax component.

As anyone successfully used an external javascript library with an xform?

+1  A: 

There is no built-in functionality in Orbeon Forms to do this at the moment. I am thinking that the rich text editor might help:

http://wiki.orbeon.com/forms/how-to/htmlarea

What happens if you paste something from Excel in there?

If it does anything meaningful, then you could process the pasted HTML into something else, for example using XSLT.

Another possibly relevant component is the datatable:

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/datatable

That might be used for visualizing data previously captured.

ebruchez
The datatable is good for displaying the data, but doesn't allow data editing. The htmlarea doesn't do what I need it to do, because the rows and columns of pasted data aren't preserved. I just discovered a javascript library that creates a great grid from an html table. http://dhtmlx.com/docs/products/dhtmlxGrid/samples/12_initialization_loading/03_grid_int_from_html.html Now my challenge is to get orbean to support external javascript libraries. any help? any examples?
Erik, found this post: http://n4.nabble.com/Another-XBL-Event-Handling-Issue-using-old-XBL-scoping-rules-td586009.htmlCan the datatable component be used for editing data?
@user302254, yes the fr:datatable can also be used to edit data. For instance you place an `xforms:input` inside a cell.
Alessandro Vernet
There seems to be a bug, when I edit "samples/datatable-ng.xhtml" and change the <xf:output> statements to <xf:input> statements, I get the following error:XPath syntax error at char 12 in {$nodeset[1]/}:Unexpected token "<eof>" in path expression
For bugs, better post to the ops-users mailing-list.
ebruchez