W3C home > Mailing lists > Public > www-forms@w3.org > February 2014

Re: Get the values of an element and combine them

From: John Boyer <boyerj@ca.ibm.com>
Date: Thu, 20 Feb 2014 10:31:44 -0800
To: Erik Bruchez <ebruchez@orbeon.com>
Cc: ebruchez@gmail.com, Jean-Baptiste Pressac <Jean-Baptiste.Pressac@univ-brest.fr>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>, "www-forms@w3.org" <www-forms@w3.org>
Message-ID: <OF7863DBA7.04FCF6C2-ON88257C85.0064939C-88257C85.0065C8E2@ca.ibm.com>
A component UI control is typically these are handled in the IBM 
implementation.  The control only has one xf:input, but as a matter of 
presentation, the "style" of the control is a group of related UI elements 
that collect the pieces of the datum. The control knows how to parse and 
shred the datum into its parts on startup and when the instance data value 
is changed by something else, like a setvalue or the completion of a 
submission.  And changes to the parts are commited by the component UI 
control at times that are determined by the control.

For example, gathering the input of an ip address or a long credit card 
number or even a good dateTime input would not be different than your 
case. I'd also expect that the control would focus on the two numbers 
involved and use presentational labels for the east and north parts, since 
you may want to present those labels in another language. It's only the 
data that has to say literally 'east' and 'north', and the control is free 
to mix in extra non-editable characters with the editable parts.

You could also build this up yourself out of a group of pure XForms 
controls, combined with some model logic and/or event handlers. 

John M. Boyer, Ph.D.
IBM Distinguished Engineer & IBM Master Inventor
@johnboyerphd | boyerj@ca.ibm.com




From:   Erik Bruchez <ebruchez@orbeon.com>
To:     Jean-Baptiste Pressac <Jean-Baptiste.Pressac@univ-brest.fr>, 
Cc:     "public-xformsusers@w3.org" <public-xformsusers@w3.org>, 
"www-forms@w3.org" <www-forms@w3.org>
Date:   02/20/2014 10:08 AM
Subject:        Re: Get the values of an element and combine them
Sent by:        ebruchez@gmail.com



Jean-Baptiste,

Some implementations have a component system allowing you do do that
kind of things, but it's not part of standard XForms.

In plain XForms, an input field can only bind to a single element or
attribute and edit its character content.

Regards,

-Erik

On Thu, Feb 20, 2014 at 7:13 AM, Jean-Baptiste Pressac
<Jean-Baptiste.Pressac@univ-brest.fr> wrote:
> Hello,
> I would like to use Xform to edit the following element :
> <dcterms:spatial xsi:type="dcterms:Point">east=456;
> north=123;</dcterms:spatial>
>
> I could use :
> <xf:input ref="dcterms:spatial[@xsi:type='dcterms:Point']"
> class="dcterms:spatial">
>     <xf:label>Latitude / Longitude:</xf:label>
> </xf:input>
>
> But is there a way to display two inputs to let the user enter the east
> value and the north value separately ?
>
> Thanks,
>
> --
> Jean-Baptiste Pressac
> Traitement et analyse de bases de données
> Centre de Recherche Bretonne et Celtique
> UMS 3554
> 20 rue Duquesne
> CS 93837
> 29238 Brest cedex 3
>
> tel : +33 (0)2 98 01 68 95
> fax : +33 (0)2 98 01 63 93
>
Received on Thursday, 20 February 2014 18:32:18 UTC

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