Hi

I am having a problem updating the Instance data from a submitted form. The action item it setting properly (using <xforms:setvalue>), but none of the other data seems to be updating into the Instance data , when it arrives in the xpl model file. After the form is submitted, the instance data is updated through a web service call, and then the same form is displayed again, with this new data. The form is displayed, but without the updated data. I must be missing something about how the Instance data is updated, in both directions.

Here is an example of my page-flow.xml

<page id="EventPage" path-info="/pages/event/eventTest" xforms="oxf:/pages/event/xforms_event_model.xml"  model="oxf:/pages/event/event_model.xpl" view="oxf:/pages/event/view_event.xsl">        
                <action when="/instance/ui/action = ''">
                        <result page="NextEventPage">
                                <xu:update select="/instance/document"><xu:copy-of select="document('oxf:action')/*" />                                        </xu:update>
                        </result>
                </action>
                <action when="/instance/ui/action = ''" action="oxf:/pages/event/event_model.xpl">
                        <result>
                                <xu:update select="/instance/document">
                                    <xu:copy-of select="document('oxf:action')/instance/document/*"/>
                                </xu:update>
                        </result>                        
                </action>                        
        </page>
 Using debugging in Orbeon Studio, I can see the action item being updated in the instance data, but not the regular xforms field data, as the example below demonstrates.

<instance>    
    <ui>
        <action>search</action>
        <create_button/>
        <search_button/>
    </ui>
    <document>
        <event>
            <eventnumber></eventnumber>
            <eventdescription/>            
        </event>
    </document>
</instance>

I can see the data being updated properly in the xpl file,, but the updated instance data does not seem to populate the fields on the form.

Any help would be appreciated.

Thanks,

Brian

Reply via email to