Hello,
I am trying to update value of an instance node on button click. I am expecting that after setvalue and refresh events, the instance node as well as the form controls are updated with the new value. Here is the code. <xforms:trigger appearance="full"> <xforms:label>Update</xforms:label> <xforms:setvalue bind="instance('person-instance')/person/status" value="active"> <xforms:message ev:event="xforms-binding-exception " level="modal"> bind error </xforms:message> </xforms:setvalue> <xforms:refresh ev:event="DOMActivate"/> <xforms:message ev:event="DOMActivate" level="modal">Updated value is <xforms:output value="instance('person-instance')/person/status"></xforms:output> </xforms:message> </xforms:trigger> Nothing happens after i click the button. I also observed that i am not getting any bind errors even if the node binding expression is invalid. I think I am missing on something very preliminary. Madhuri -- 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 Madhuri, Note that value="active" is different than value="'active'" such that without quotes (single quote) around the value it is interpreted as an XPath statement. Cheers, Hank On Jul 7, 2009, at 12:29 PM, Madhuri Deodhar wrote: Hello, Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 |
Thanks Hank. I did not realize that.
But even when I correct it to value="'active'" no luck :( Madhuri On Tue, Jul 7, 2009 at 4:19 PM, Hank Ratzesberger <[hidden email]> wrote:
-- 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 |
Well, there are better "code whisperers" than me, so I can only suggest that you comment out all but the setvalue and include the instance inspector widget to see if if the update happens. You can also use it to run XPath statements, but be aware of the default single node binding, such that you ignore the top element within xforms (but use it in the instance inspector). Cheers, Hank On Jul 7, 2009, at 1:25 PM, Madhuri Deodhar wrote: Thanks Hank. I did not realize that. Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 |