Document saving and loading

david_dupont73's picture

Synchronization problem with Dynamic XForm

Hi,
It seems they're a synchronisation problem when i execute Xform code which has injected dynamically with an AJAX Method (using AJAX.NET and ASPX page).
Here, the dynamic code with as inserted in my Xform Code after a the user action.
<xf:trigger>
<xf:label>Rallye Orpi du Maroc 2005</xf:label> <xf:action ev:event="DOMActivate">
<xf:setvalue
ref="instance('inst-browsing')/id_session_sheet"
value="2" />
<xf:setvalue
ref="instance('inst-session-id')/study_id"
value="2" /> <xf:message level="modal">First Message</xf:message>
<xf:dispatch name="set-study" target="document"/>
</xf:action>
</xf:trigger>

The Xform Action 'set-study' is including in my Xform Code.
Here a code sample:
...
<xf:action ev:event="set-study">

Problem displaying angle brackets in a select1 list

Hi there,

Is there any way to display angle brackets in a select1 list? I have the following code:

<xf:item>
<xf:label><10m</xf:label>
<xf:value><10m</xf:value>
</xf:item>

When rendered, the list displays &lt;10m rather than <10m

Alternatively, the following behaves in the same way:

<xf:item>
<xf:label>&lt;10m</xf:label>
<xf:value>&lt;10m</xf:value>
</xf:item>

Cheers,

Anu

Submission datas problem with xsi:nil attribute

I used the examples in TutorialNillable (see attachment file) and it works find except on
submission instance (with http/post or http/put).
FP send an error message "xsi:nil attribute on element "X" is invalid.
Thanks.

Mark Birbeck's picture

Initialising a document on first use of a form

Use case

A model has some instance data which is loaded from a particular URL, and which the user can edit during the course of using the form. However, when the form is first used, an attempt to load this data will fail since the document won't yet exist. In this situation we would like to use some inline instance data to initialise the document.

Description

Two submissions are created in the model, one that performs a get and the other a put, and both using the same document URL for their @action value. The put submission can be used at any time to save the instance data, such as after the data has changed, or periodically to ensure no data is lost.

When the model is first loaded (i.e., on notification of xforms-ready), the get submission is attempted. If it is successful then it means that there was already existing data available, and a load event is dispatched to the model.

select1 binding issue

We are currently building an application using XForms and forms-
player. To provide navigation within our form, we have opted to use
the select1 construct in its compact format. Everytime the user
selects an item, the application sends a request to our server, which
conducts some processing and then returns a very similar form - in
this case, the <requestedSection> tag is bound to the select1,
causing the value in <requestedSection> to change depending on the
item selected.

The problem we have is when loading the form into forms-player. If
we pre-set the value of <requestedSection> to match one of the items
in the select1 control, the select1 does not select the item, hence