Login  Register

RE: Error when using xforms:action with xforms:setValue

Posted by Steve Bayliss on Nov 11, 2009; 11:47am
URL: https://discuss.orbeon.com/Error-when-using-xforms-action-with-xforms-setValue-tp585594p585820.html

Message
Hi Stephanie
 
Your error I think is because xforms:setValue should be xforms:setvalue.
 
However, the "ref" attribute of xforms:setvalue is a single node binding (http://www.w3.org/TR/xforms/#action-setvalue) - from your code it looks like you are attempting to update all or part of an instance (ie more than one node) - I don't think that will work.
 
Instead consider defining a submission to update the instance, and within your xforms:action have an xforms:send to kick off the submission.
 
Also, instead of calling your XPL directly, an alternative approach is to define a URL in your page-flow.xml which executes the XPL, and call that URL to update your instance.
 
Regards
Steve
-----Original Message-----
From: Stephanie Hall (TT) [mailto:[hidden email]]
Sent: 10 November 2009 22:25
To: [hidden email]
Subject: [ops-users] Error when using xforms:action with xforms:setValue

Hi,

 

I keep running into errors when trying to run the following code:

 

<xforms:action ev:event="xforms-ready">

      <xforms:setValue ref="instance('categories-instance')/categories"

            value="xxforms:call-xpl('http://localhost:8080/forms/categories.xpl', instance('categories-instance'),'formatted-output')/*, 'output')"/>

</xforms:action>

 

The exact error I get each time is: Invalid action: {http://www.w3.org/2002/xforms}setValue.  My purpose here is try to populate an instance using a pipeline, but I don’t think it’s even getting there. Can anyone tell me what I am doing wrong to cause this error?   It would probably be better if the error message told me what I was doing wrong, because I’ve seen people use xforms:action with setValue in some of the archives with no errors.

 

More detail, from the logs:

 

009-11-10 16:18:51,910 ERROR ProcessorService  - Exception at line 24 of oxf:/config/xforms-widgets.xsl (running XForms action: action name='{http://www.w3.org/2002/xforms}setValue')

org.orbeon.oxf.common.ValidationException: line 24 of oxf:/config/xforms-widgets.xsl (running XForms action: action name='{http://www.w3.org/2002/xforms}setValue'): Invalid action: {http://www.w3.org/2002/xforms}setValue

oxf:/config/xforms-widgets.xsl, line 24, column -1: Invalid action: {http://www.w3.org/2002/xforms}setValue

                at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runAction(XFormsActionInterpreter.java:166)

                at org.orbeon.oxf.xforms.action.actions.XFormsActionAction.execute(XFormsActionAction.java:62)

                at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runSingleIteration(XFormsActionInterpreter.java:286)

                at org.orbeon.oxf.xforms.action.XFormsActionInterpreter.runAction(XFormsActionInterpreter.java:246)

                at org.orbeon.oxf.xforms.event.XFormsEventHandlerImpl.handleEvent(XFormsEventHandlerImpl.java:153)

                at org.orbeon.oxf.xforms.xbl.XBLContainer.dispatchEvent(XBLContainer.java:878)

                at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:999)

                at org.orbeon.oxf.xforms.xbl.XBLContainer.initializeModels(XBLContainer.java:289)

                at org.orbeon.oxf.xforms.xbl.XBLContainer.initializeModels(XBLContainer.java:267)

                at org.orbeon.oxf.xforms.XFormsContainingDocument.initialize(XFormsContainingDocument.java:1414)

                at org.orbeon.oxf.xforms.XFormsContainingDocument.<init>(XFormsContainingDocument.java:179)

                at org.orbeon.oxf.xforms.processor.XFormsToXHTML.createCacheContainingDocument(XFormsToXHTML.java:325)

 

Thanks!

Stephanie



--
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