Hi,
How would one approach the problem of plumbing-in an external widget to Orbeon to fill in a form field? For example, to concretise the question, how would one plumb in a javascript widget which opened a new window containing a googlemap, allowed selection of a point and updated a pair of fields in the calling window with the selected latitude and longitude? is there anything similar in the examples? yours Tim -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Tim,
Using XBL. And since you are talking about a map component, Orbeon Forms already has one that does something similar to what you're describing. See: http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/map And if it doesn't do precisely what you want, you can extend it, or create your own component maybe starting from the existing map component. Alex On Wed, May 26, 2010 at 2:05 AM, Tim Pizey <[hidden email]> wrote: > Hi, > > How would one approach the problem of plumbing-in an external widget > to Orbeon to fill in a form field? > > For example, to concretise the question, how would one plumb in a > javascript widget which opened a new window containing a googlemap, > allowed selection of a point and updated a pair of fields in the > calling window with the selected latitude and longitude? > > is there anything similar in the examples? > > > yours > Tim > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex,
I just tried this out, and it works very nicely, except for a bit of weird behaviour when I put the map component inside an xforms:repeat or an xxforms:dialog. I've attached a standalone xhtml page (spike-map.xhtml) using the map component within a dialog, which you should be able to run in your xform sandbox. What I see is that, when the dialog is shown, the map view is not correctly aligned with the position of the dialog. If, however, you set the value of the @visible attribute on the dialog to "true", which makes the dialog initially visible when the page first loads, then close the dialog, enter some location data, and show the dialog again using the trigger, then the map *is* correctly aligned. Any tips on a fix or workaround? I also tried to add a map component directly within the xforms:repeat, so that each site had its own map. I've attached another xhtml page (spike-map2.xhtml) demonstrating that. Again, that works well, except if I delete any of the repeat items, then add new items, the map doesn't appear. Any thoughts? I haven't tried this on Orbeon 3.8, still on a 3.7 snapshot. Cheers, Alistair On Wed, May 26, 2010 at 07:09:35PM -0700, Alessandro Vernet wrote: > Tim, > > Using XBL. And since you are talking about a map component, Orbeon > Forms already has one that does something similar to what you're > describing. See: > > http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/map > > And if it doesn't do precisely what you want, you can extend it, or > create your own component maybe starting from the existing map > component. > > Alex > > On Wed, May 26, 2010 at 2:05 AM, Tim Pizey <[hidden email]> wrote: > > Hi, > > > > How would one approach the problem of plumbing-in an external widget > > to Orbeon to fill in a form field? > > > > For example, to concretise the question, how would one plumb in a > > javascript widget which opened a new window containing a googlemap, > > allowed selection of a point and updated a pair of fields in the > > calling window with the selected latitude and longitude? > > > > is there anything similar in the examples? > > > > > > yours > > Tim > > > > > > -- > > You receive this message as a subscriber of the [hidden email] mailing list. > > To unsubscribe: mailto:[hidden email] > > For general help: mailto:[hidden email]?subject=help > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - > http://www.orbeon.com/ > My Twitter: http://twitter.com/avernet > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- Alistair Miles Centre for Genomics and Global Health <http://cggh.org> The Wellcome Trust Centre for Human Genetics Roosevelt Drive Oxford OX3 7BN United Kingdom Web: http://purl.org/net/aliman Email: [hidden email] Tel: +44 (0)1865 287669 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Alex, Alistair,
So as to show the problem with least work I have deployed the examples. http://cloud1.cggh.org/manta/questionnaire/spike-map displays the point slightly off the screen, to the top left, rather than centralised. Also the dialogue is not completely filled. This behaviour on chrome, firefox and opera. My guess is that the google code is taking the central point of the map to be the top left hand corner. A colleague says that he has seen this when the google code starts torender before the div into which it is rendering is 'ready'. There is a strange interaction with firebug: open firebug and the map displays correctly but the pin still does not centre. This makes sense as it works if the dialog is not initially hidden. I noticed that the dialogue visibility is visible, rather than inherits, so hacking the visibility by enclosing the dialog is not available. http://cloud1.cggh.org/manta/questionnaire/spike-map2 The problem here is when you add a repeating element and then delete it and then add another the new one does not contain a map. If you add one after that it does contain a map. Is there a way to send additional data through to the google api? I saw a brainstorming session here: http://wiki.orbeon.com/forms/projects/xforms-xbl-parameters-passing but there is no mention of parameter passing on the map page. Any thoughts would be most welcome. yours Tim Pizey On 2 June 2010 15:24, Alistair Miles wrote: > Hi Alex, > > I just tried this out, and it works very nicely, except for a bit of > weird behaviour when I put the map component inside an xforms:repeat > or an xxforms:dialog. > > I've attached a standalone xhtml page (spike-map.xhtml) using the map > component within a dialog, which you should be able to run in your > xform sandbox. > > What I see is that, when the dialog is shown, the map view is not > correctly aligned with the position of the dialog. > > If, however, you set the value of the @visible attribute on the dialog > to "true", which makes the dialog initially visible when the page > first loads, then close the dialog, enter some location data, and show > the dialog again using the trigger, then the map *is* correctly > aligned. > > Any tips on a fix or workaround? > > I also tried to add a map component directly within the xforms:repeat, > so that each site had its own map. I've attached another xhtml page > (spike-map2.xhtml) demonstrating that. Again, that works well, except > if I delete any of the repeat items, then add new items, the map > doesn't appear. > > Any thoughts? > > I haven't tried this on Orbeon 3.8, still on a 3.7 snapshot. > > Cheers, > > Alistair > > On Wed, May 26, 2010 at 07:09:35PM -0700, Alessandro Vernet wrote: >> Tim, >> >> Using XBL. And since you are talking about a map component, Orbeon >> Forms already has one that does something similar to what you're >> describing. See: >> >> http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/map >> >> And if it doesn't do precisely what you want, you can extend it, or >> create your own component maybe starting from the existing map >> component. >> >> Alex >> >> On Wed, May 26, 2010 at 2:05 AM, Tim Pizey <[hidden email]> wrote: >> > Hi, >> > >> > How would one approach the problem of plumbing-in an external widget >> > to Orbeon to fill in a form field? >> > >> > For example, to concretise the question, how would one plumb in a >> > javascript widget which opened a new window containing a googlemap, >> > allowed selection of a point and updated a pair of fields in the >> > calling window with the selected latitude and longitude? >> > >> > is there anything similar in the examples? >> > >> > >> > yours >> > Tim >> > >> > >> >> >> -- >> Orbeon Forms - Web forms, open-source, for the Enterprise - >> http://www.orbeon.com/ >> My Twitter: http://twitter.com/avernet > >> > -- > Alistair Miles > Centre for Genomics and Global Health <http://cggh.org> > The Wellcome Trust Centre for Human Genetics > Roosevelt Drive > Oxford > OX3 7BN > United Kingdom > Web: http://purl.org/net/aliman > Email: [hidden email] > Tel: +44 (0)1865 287669 > Tim Pizey Centre for Genomics and Global Health <http://cggh.org> The Wellcome Trust Centre for Human Genetics Roosevelt Drive Oxford OX3 7BN United Kingdom Web: http://pizey.net/~timp Tel: +44 (0)1865 287532 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Tim, Alistair,
Thank you for the reproducible test case. I see the problem on your site, and can reproduce it locally. For now, I added a bug to track this: http://forge.ow2.org/tracker/index.php?func=detail&aid=315099&group_id=168&atid=350207 Unfortunately it looks like debugging this would take more time than what we can dedicate here. We can take care of this under a Development Support plan, or you can have a go at it yourself. If you checkout the source, the implementation for the map component, which is mostly in XForms and JavaScript, is in src/resources-packaged/xbl/orbeon/map. Alex On Wed, Jun 9, 2010 at 10:31 AM, Tim Pizey <[hidden email]> wrote: > Hi Alex, Alistair, > > So as to show the problem with least work I have deployed the examples. > > http://cloud1.cggh.org/manta/questionnaire/spike-map > > displays the point slightly off the screen, to the top left, rather > than centralised. > Also the dialogue is not completely filled. > This behaviour on chrome, firefox and opera. > My guess is that the google code is taking the central point of the > map to be the top left hand corner. > A colleague says that he has seen this when the google code starts > torender before the div into > which it is rendering is 'ready'. > There is a strange interaction with firebug: open firebug and the map > displays correctly but the pin still does not centre. > This makes sense as it works if the dialog is not initially hidden. > > I noticed that the dialogue visibility is visible, rather than > inherits, so hacking the visibility by enclosing the dialog is not > available. > > > http://cloud1.cggh.org/manta/questionnaire/spike-map2 > > The problem here is when you add a repeating element and then delete > it and then add another the new one does not contain a map. > If you add one after that it does contain a map. > > Is there a way to send additional data through to the google api? > I saw a brainstorming session here: > http://wiki.orbeon.com/forms/projects/xforms-xbl-parameters-passing > but there is no mention of parameter passing on the map page. > > > Any thoughts would be most welcome. > > yours > Tim Pizey > > > > > On 2 June 2010 15:24, Alistair Miles wrote: >> Hi Alex, >> >> I just tried this out, and it works very nicely, except for a bit of >> weird behaviour when I put the map component inside an xforms:repeat >> or an xxforms:dialog. >> >> I've attached a standalone xhtml page (spike-map.xhtml) using the map >> component within a dialog, which you should be able to run in your >> xform sandbox. >> >> What I see is that, when the dialog is shown, the map view is not >> correctly aligned with the position of the dialog. >> >> If, however, you set the value of the @visible attribute on the dialog >> to "true", which makes the dialog initially visible when the page >> first loads, then close the dialog, enter some location data, and show >> the dialog again using the trigger, then the map *is* correctly >> aligned. >> >> Any tips on a fix or workaround? >> >> I also tried to add a map component directly within the xforms:repeat, >> so that each site had its own map. I've attached another xhtml page >> (spike-map2.xhtml) demonstrating that. Again, that works well, except >> if I delete any of the repeat items, then add new items, the map >> doesn't appear. >> >> Any thoughts? >> >> I haven't tried this on Orbeon 3.8, still on a 3.7 snapshot. >> >> Cheers, >> >> Alistair >> >> On Wed, May 26, 2010 at 07:09:35PM -0700, Alessandro Vernet wrote: >>> Tim, >>> >>> Using XBL. And since you are talking about a map component, Orbeon >>> Forms already has one that does something similar to what you're >>> describing. See: >>> >>> http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/map >>> >>> And if it doesn't do precisely what you want, you can extend it, or >>> create your own component maybe starting from the existing map >>> component. >>> >>> Alex >>> >>> On Wed, May 26, 2010 at 2:05 AM, Tim Pizey <[hidden email]> wrote: >>> > Hi, >>> > >>> > How would one approach the problem of plumbing-in an external widget >>> > to Orbeon to fill in a form field? >>> > >>> > For example, to concretise the question, how would one plumb in a >>> > javascript widget which opened a new window containing a googlemap, >>> > allowed selection of a point and updated a pair of fields in the >>> > calling window with the selected latitude and longitude? >>> > >>> > is there anything similar in the examples? >>> > >>> > >>> > yours >>> > Tim >>> > >>> > >>> >>> >>> -- >>> Orbeon Forms - Web forms, open-source, for the Enterprise - >>> http://www.orbeon.com/ >>> My Twitter: http://twitter.com/avernet >> >>> >> -- >> Alistair Miles >> Centre for Genomics and Global Health <http://cggh.org> >> The Wellcome Trust Centre for Human Genetics >> Roosevelt Drive >> Oxford >> OX3 7BN >> United Kingdom >> Web: http://purl.org/net/aliman >> Email: [hidden email] >> Tel: +44 (0)1865 287669 >> > > -- > Tim Pizey > Centre for Genomics and Global Health <http://cggh.org> > The Wellcome Trust Centre for Human Genetics > Roosevelt Drive > Oxford > OX3 7BN > United Kingdom > Web: http://pizey.net/~timp > Tel: +44 (0)1865 287532 > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |