W3C home > Mailing lists > Public > www-forms@w3.org > December 2002

RE: Bindings to non-existing instance:data

From: Mark Seaborne <MSeaborne@origoservices.com>
Date: Mon, 2 Dec 2002 14:14:47 -0000
Message-ID: <DC65AE678B89004B9CCB202E19482CC704FB90@mail.origoservices.local>
To: "Roman Huditsch" <roman.huditsch@hico.com>
Cc: <www-forms@w3.org>


Can you not just do things the other way round? Create the empty elements first, which will trigger the form to display empty input elements, bound to those new empty instance nodes.

I think XForms often pushes you to think in terms of what you want to do to the XML instance(s) first and foremost, with the form almost being a side effect, required by the necessity to gather information directly from humans sometimes. So first you think about whether structures should repeat, then you think about how the action of repeating is triggered, and then about how the repeated structure is populated with values. I'm sure that is oversimplistic twaddle, but I do think it is valid to say that you need to think about your XML before your user interface when using XForms.

So you don't need to capture data until you have an empty structure needing to be filled.

All the best

Mark Seaborne

-----Original Message-----
From: Roman Huditsch [mailto:roman.huditsch@hico.com]
Sent: 02 December 2002 12:21
To: Roland Merrick
Cc: www-forms@w3.org
Subject: AW: Bindings to non-existing instance:data


What I want to do is the following: 
I would like to define some input field like:

<xforms:input ref="topicmap/topic/topicName">
    <xforms:label>Topic Name:</xforms:label>

<xforms:input ref="topicmap/topic/@id">
    <xforms:label>Topic ID:</xforms:label>


Is it possible to define somehow that as soon as the user has done some input on these fields the according elements (or attributes) in the instance are created ?

-----Ursprüngliche Nachricht-----
Von: Roland Merrick [mailto:roland_merrick@uk.ibm.com]
Gesendet: Montag, 2. Dezember 2002 12:07
An: Roman Huditsch
Cc: www-forms@w3.org
Betreff: Re: Bindings to non-existing instance:data

Greetings Roman, the section describing the xforms-form-control-initialize Event describes what happens. 
[ http://www.w3.org/TR/xforms/slice4.html#evt-formControlInitialize ] 

There are two basic situations which can lead to there being no instance data node for the UI element to bind to. 

1) No <instance> was supplied in which case an instance data node will be created when the UI element is initialised. 
2) There is an <instance> but there is nothing for the UI element to bind to, in this case the UI control should behave as if it was bound to a non-relevant node.

Regards, Roland 

"Roman Huditsch" <roman.huditsch@hico.com> 
Sent by: www-forms-request@w3.org 
02/12/2002 10:25 
        To:        <www-forms@w3.org> 
        Subject:        Bindings to non-existing instance:data 



I have quite a short question. I thought that I read it somewhere in the spec but I couldn't find the passage again.
What happens if I refer from a xform control to an element in my xforms:instance, which doesn't yet exist? Is it (the instance element)created when the user fills in the form control?

Or do I have to define a trigger, whichs creates the needed instance elements before?


Roman Huditsch (hRHU )
Developer .:. Information & Application Engineering
hico Informations- und Kommunikations-Management Gesellschaft m.b.H.
TechLab, Thomas A. Edison Straße 2.
A-7000 Eisenstadt / Austria
phone: +43/2682/704-61-73; fax: +43/2682/704-71-61-10
e-mail: roman.huditsch@hico.com
mobile: +43/664/4102715 

#### Roman Huditsch.vcf has been removed from this note on December 02 2002 by Roland Merrick 
Received on Monday, 2 December 2002 09:15:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:07 UTC