Re: Get the values of an element and combine them
John Boyer <[email protected]> Thu, 20 Feb 2014 10:31:44 -0800
| Newsgroups | gmane.comp.web.xforms |
|---|---|
| Message-ID | <OF7863DBA7.04FCF6C2-ON88257C85.0064939C-88257C85.0065C8E2@ca.ibm.com> |
This is a multipart message in MIME format. --=_alternative 0065C8A888257C85_= Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable A component UI control is typically these are handled in the IBM=20 implementation. The control only has one xf:input, but as a matter of=20 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=20 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=20 submission. And changes to the parts are commited by the component UI=20 control at times that are determined by the control. For example, gathering the input of an ip address or a long credit card=20 number or even a good dateTime input would not be different than your=20 case. I'd also expect that the control would focus on the two numbers=20 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=20 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=20 controls, combined with some model logic and/or event handlers.=20 John M. Boyer, Ph.D. IBM Distinguished Engineer & IBM Master Inventor @johnboyerphd | [email protected] From: Erik Bruchez <[email protected]> To: Jean-Baptiste Pressac <[email protected]>,=20 Cc: "[email protected]" <[email protected]>,=20 "[email protected]" <[email protected]> Date: 02/20/2014 10:08 AM Subject: Re: Get the values of an element and combine them Sent by: [email protected] 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 <[email protected]> wrote: > Hello, > I would like to use Xform to edit the following element : > <dcterms:spatial xsi:type=3D"dcterms:Point">east=3D456; > north=3D123;</dcterms:spatial> > > I could use : > <xf:input ref=3D"dcterms:spatial[@xsi:type=3D'dcterms:Point']" > class=3D"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=E9es > 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 > --=_alternative 0065C8A888257C85_= Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable <font size=3D2 face=3D"sans-serif">A component UI control is typically these are handled in the IBM implementation. The control only has one xf:in= put, 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 setva= lue or the completion of a submission. And changes to the parts are commi= ted by the component UI control at times that are determined by the control.</f= ont> <br> <br><font size=3D2 face=3D"sans-serif">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.</font> <br> <br><font size=3D2 face=3D"sans-serif">You could also build this up yourself out of a group of pure XForms controls, combined with some model logic and/or event handlers. </font> <br> <br><font size=3D2 face=3D"sans-serif">John M. Boyer, Ph.D.<br> IBM Distinguished Engineer & IBM Master Inventor<br> @johnboyerphd | [email protected]<br> </font> <br> <br> <br> <br><font size=3D1 color=3D#5f5f5f face=3D"sans-serif">From: = </font><font size=3D1 face=3D"sans-serif">Erik Bruchez <ebruchez@o= rbeon.com></font> <br><font size=3D1 color=3D#5f5f5f face=3D"sans-serif">To: &n= bsp; </font><font size=3D1 face=3D"sans-serif">Jean-Baptiste Pressac <[email protected]>, </font> <br><font size=3D1 color=3D#5f5f5f face=3D"sans-serif">Cc: &n= bsp; </font><font size=3D1 face=3D"sans-serif">"public-xformsusers@w3= .org" <[email protected]>, "[email protected]" <www-for= [email protected]></font> <br><font size=3D1 color=3D#5f5f5f face=3D"sans-serif">Date: = </font><font size=3D1 face=3D"sans-serif">02/20/2014 10:08 AM</font> <br><font size=3D1 color=3D#5f5f5f face=3D"sans-serif">Subject: &nbs= p; </font><font size=3D1 face=3D"sans-serif">Re: Get the values of an element and combine them</font> <br><font size=3D1 color=3D#5f5f5f face=3D"sans-serif">Sent by: &nbs= p; </font><font size=3D1 face=3D"sans-serif">[email protected]</= font> <br> <hr noshade> <br> <br> <br><tt><font size=3D2>Jean-Baptiste,<br> <br> Some implementations have a component system allowing you do do that<br> kind of things, but it's not part of standard XForms.<br> <br> In plain XForms, an input field can only bind to a single element or<br> attribute and edit its character content.<br> <br> Regards,<br> <br> -Erik<br> <br> On Thu, Feb 20, 2014 at 7:13 AM, Jean-Baptiste Pressac<br> <[email protected]> wrote:<br> > Hello,<br> > I would like to use Xform to edit the following element :<br> > <dcterms:spatial xsi:type=3D"dcterms:Point">east=3D456= ;<br> > north=3D123;</dcterms:spatial><br> ><br> > I could use :<br> > <xf:input ref=3D"dcterms:spatial[@xsi:type=3D'dcterms:Point']&= quot;<br> > class=3D"dcterms:spatial"><br> > <xf:label>Latitude / Longitude:</xf:label><b= r> > </xf:input><br> ><br> > But is there a way to display two inputs to let the user enter the east<br> > value and the north value separately ?<br> ><br> > Thanks,<br> ><br> > --<br> > Jean-Baptiste Pressac<br> > Traitement et analyse de bases de donn=E9es<br> > Centre de Recherche Bretonne et Celtique<br> > UMS 3554<br> > 20 rue Duquesne<br> > CS 93837<br> > 29238 Brest cedex 3<br> ><br> > tel : +33 (0)2 98 01 68 95<br> > fax : +33 (0)2 98 01 63 93<br> ><br> <br> </font></tt> <br> --=_alternative 0065C8A888257C85_=--