jedivind / ubiquity-xforms

Automatically exported from code.google.com/p/ubiquity-xforms
1 stars 0 forks source link

Is relativePath singles out http and javascript #587

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The isRelativePath() function mentioned below shouldn't just single out
javascript: but rather should follow the URI spec and say that anything
with a proper URI scheme (selected chars ending in colon) should be
classified as absolute.

A test form should still be made that uses the change to invoke a piece of
trivial javascript from xf:load.

Original message from Fiodar  Zboichyk:

following is the scenario where an <xforms:trigger> control calls a
javascript function and passes some context information.

excerpt from the form:

===

<xforms:repeat id="rep_entry" bind="bind_entries">

...

<xforms:trigger>

<xforms:label>calc</xforms:label>

<xforms:load ev:event="DOMActivate">

<xforms:resource
value="concat('javascript:showDosageDialog(',index('rep-entry'),')')"></xforms:r
esource>

</xforms:load>

</xforms:trigger>

</xforms:repeat>

===

the function is "showDosageDialog( index )", which then uses index to get
the right data from the model and do something. It sets the data back into
the model using model.setValue method. The function itself does not return
anything.

In order for this to work, "isRelativePath" function needs to be updated in
ubiquity xforms, file "lib/_backplane/xlink.js"

Original issue reported on code.google.com by erik...@gmail.com on 14 Oct 2009 at 3:34

GoogleCodeExporter commented 8 years ago
In review at r3039.

Original comment by erik...@gmail.com on 14 Oct 2009 at 3:34

GoogleCodeExporter commented 8 years ago
Issue has been commited to trunk at r3066.

Original comment by erik...@gmail.com on 6 Nov 2009 at 6:37