I'm having a hard time trying to get something to work. I have an
instance element that does not have an attribute called "action" and
want to create one with the value "delete" when the user presses a
button. I can get this to work if the attribute already exists using
the following:
That snippet is inside a repeat that sets the nodeset to the element that should receive the attribute.<xforms:trigger> <xforms:label>Delete</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="@action">delete</xforms:setvalue> <!--<xforms:insert origin="xxforms:attribute('action', 'delete')"/>--> </xforms:action> </xforms:trigger> If I replace the "setvalue" line with the commented-out "insert" line and the instance does not yet have an "action" attribute, it doesn't do anything. Can anyone tell me what I'm doing wrong? Thanks, -Jim -- 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
|
Jim,
Try: <xforms:insert context="." origin="xxforms:attribute('action', 'delete')"/> This is because when inserting *into* an element, an explicit insertion context is required. -Erik On May 7, 2008, at 9:26 AM, Jim Logan wrote: > I'm having a hard time trying to get something to work. I have an > instance element that does not have an attribute called "action" and > want to create one with the value "delete" when the user presses a > button. I can get this to work if the attribute already exists using > the following: > <xforms:trigger> > <xforms:label>Delete</xforms:label> > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="@action">delete</xforms:setvalue> > <!--<xforms:insert origin="xxforms:attribute('action', > 'delete')"/>--> > </xforms:action> > </xforms:trigger> > > > That snippet is inside a repeat that sets the nodeset to the element > that should receive the attribute. > > If I replace the "setvalue" line with the commented-out "insert" > line and the instance does not yet have an "action" attribute, it > doesn't do anything. Can anyone tell me what I'm doing wrong? > > Thanks, > -Jim > > > > -- > 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 for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Erik Bruchez wrote:
Jim,Erik, I tried that, but I get this error message: What would cause this to happen, just by adding a context? (BTW, I'm using the latest stable version of Orbeon.) Thanks, -Jim -- 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
|
What version are you running? xxforms:attribute() was introduced
fairly recently. -Erik On May 7, 2008, at 10:05 AM, Jim Logan wrote: > Erik Bruchez wrote: >> >> Jim, >> >> Try: >> >> <xforms:insert context="." origin="xxforms:attribute('action', >> 'delete')"/> >> >> This is because when inserting *into* an element, an explicit >> insertion context is required. >> >> -Erik > Erik, > > I tried that, but I get this error message: > XPath syntax error at char 37 in {...:attribute('action', 'delet...}: > Cannot find a matching 2-argument function named {http://orbeon.org/oxf/xml/xforms > }attribute() > > What would cause this to happen, just by adding a context? (BTW, I'm > using the latest stable version of Orbeon.) > > Thanks, > -Jim > > > -- > 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 for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Erik Bruchez wrote:
> What version are you running? xxforms:attribute() was introduced > fairly recently. The latest stable version. Was this function added since then? -- 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
|
Yes, along with tons of other changes:
http://www.orbeon.com/ops/doc/home-changes-37#changes-37-full You may want to try a nightly build. -Erik On May 7, 2008, at 10:12 AM, Jim Logan wrote: > Erik Bruchez wrote: >> What version are you running? xxforms:attribute() was introduced >> fairly recently. > The latest stable version. Was this function added since then? -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Erik Bruchez wrote:
> Yes, along with tons of other changes: > > http://www.orbeon.com/ops/doc/home-changes-37#changes-37-full > > You may want to try a nightly build. Erik, Thanks, that worked. It strikes me as odd that the documentation contained a function not in the stable release. Are there more waiting to be discovered? I am using Orbeon as part of a product to be delivered in June. When do you expect the nightly build to become a stable release? Thanks, -Jim -- 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
|
>
> It strikes me as odd that the documentation contained a function not > in the stable release. Are there more waiting to be discovered? We regularly update the documentation online as we go. So usually the doc is more in sync with the latest code than with the latest stable release. I can see how this may be a little confusing, but we wanted people to see the latest and greatest right away ;-) > I am using Orbeon as part of a product to be delivered in June. When > do you expect the nightly build to become a stable release? We are hoping for a 3.7 "real soon". -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Free forum by Nabble | Edit this page |