Hello,
I've a date field in a xml with yyyy-mm-dd format, and this is ok. Now, I'm trying to show this date with dd-mm-yyyy format in a read only input field, and then, when i save the form, i want this field don't change in my xml file. How can i do that? Thanks in advance. Jesús Consigue el nuevo Windows Live Messenger Pruébalo -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Jesús,
On 9/27/07, aa aa <[hidden email]> wrote: > I've a date field in a xml with yyyy-mm-dd format, and this is ok. Now, I'm > trying to show this date with dd-mm-yyyy format in a read only input field, > and then, when i save the form, i want this field don't change in my xml > file. How can i do that? You can use the xxforms:format attribute on <xforms:output> or <xforms:input>. (See "2.2.2. xforms:input" and "2.2.3. xforms:output" on http://www.orbeon.com/ops/doc/reference-xforms-2.) And if this is something you want to do across your application, you can set your default formatting in properties.xml, and you don't have to include that xxforms:format attribute. (See "2.2.4. Default Formatting" that follows.) Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
i've tried that and it doesn't work as i want.
The following code is my code: <xforms:bind readonly=". != ''" nodeset="/documento/Cuenta-04-Simp/Entidad/FAprPres"/> [.....] <xforms:input ref="FAprPres" xxforms:format="format-date(xs:date(.), '[D]-[M]-[Y]', 'es', (), ())"> <xforms:label class="sort-label">Fecha de aprobación del presupuesto</xforms:label> </xforms:input> FAprPres has, for instance, '2007-01-29' and i want to show it like '29-01-2007', but with that code i show it like '2007-01-29' Thank you > Date: Thu, 27 Sep 2007 23:46:56 -0700 > From: [hidden email] > To: [hidden email] > Subject: Re: [ops-users] String format > > Jesús, > > On 9/27/07, aa aa <[hidden email]> wrote: > > I've a date field in a xml with yyyy-mm-dd format, and this is ok. Now, I'm > > trying to show this date with dd-mm-yyyy format in a read only input field, > > and then, when i save the form, i want this field don't change in my xml > > file. How can i do that? > > You can use the xxforms:format attribute on <xforms:output> or > <xforms:input>. (See "2.2.2. xforms:input" and "2.2.3. xforms:output" > on http://www.orbeon.com/ops/doc/reference-xforms-2.) > > And if this is something you want to do across your application, you > can set your default formatting in properties.xml, and you don't have > to include that xxforms:format attribute. (See "2.2.4. Default > Formatting" that follows.) > > Alex > -- > Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise > http://www.orbeon.com/ Consigue el nuevo Windows Live Messenger Pruébalo -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by aa aa-2
Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by aa aa-2
aa aa wrote: i've tried that and it doesn't work as i want. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hello!
It's works almost perfectly but it shows like a label and i want show it like an input text (read only, but in an input text). Is it possible? Thank you.
Busca desde cualquier página Web con una protección excepcional. Consigue la Barra de herramientas de Windows Live hoy mismo GRATUITAMENTE. Pruébalo -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
¡Ya está aquí Windows Live Spaces! Ahora podrás crear fácilmente tu propio sitio Web. Pruébalo -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws message-footer.txt (352 bytes) Download Attachment |
Administrator
|
In reply to this post by aa aa-2
On 10/1/07, aa aa <[hidden email]> wrote:
> It's works almost perfectly but it shows like a label and i want show it > like an input text (read only, but in an input text). Is it possible? If you want to use an xforms:input, you need to bind it to a node that contains the data already formated. You can do this by having a "working" instance with a node calculated based on the instance that contains the real date, e.g.: <xforms:bind nodeset="instance('work')/date" calculate="format-date(xs:date(instance('real-instance')/your-date), '[D]-[M]-[Y]', 'es', (), ())"/> Because of the "calculate" the node will be made read-only, so your input field bound to that now will show as read-only. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
I cann't do that because i only want show the data in this format, and i think if i do that (with calculate), the data is saving with this format in the xml.
> Date: Mon, 1 Oct 2007 11:52:51 -0700 > From: [hidden email] > To: [hidden email] > Subject: Re: [ops-users] String format > > On 10/1/07, aa aa <[hidden email]> wrote: > > It's works almost perfectly but it shows like a label and i want show it > > like an input text (read only, but in an input text). Is it possible? > > If you want to use an xforms:input, you need to bind it to a node that > contains the data already formated. You can do this by having a > "working" instance with a node calculated based on the instance that > contains the real date, e.g.: > > <xforms:bind nodeset="instance('work')/date" > calculate="format-date(xs:date(instance('real-instance')/your-date), > '[D]-[M]-[Y]', 'es', (), ())"/> > > Because of the "calculate" the node will be made read-only, so your > input field bound to that now will show as read-only. > > Alex > -- > Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise > http://www.orbeon.com/ Busca desde cualquier página Web con una protección excepcional. Consigue la Barra de herramientas de Windows Live hoy mismo GRATUITAMENTE. Pruébalo -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
On 10/2/07, aa aa <[hidden email]> wrote:
> > I cann't do that because i only want show the data in this format, and i > think if i do that (with calculate), the data is saving with this format in > the xml. What you can do is have a separate instance that contains the data in that format. So you don't change your original instance. You create a new one, and have an element of that new instance calculated based on the non-formated value in the original instance. You the bind the control to the element in the new instance. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Alessandro Vernet wrote:
No fault of yours Alex (rather the spec), but the problem with this sort of solution is that it becomes unworkable as soon as a repeat is involved.On 10/2/07, aa aa [hidden email] wrote:I cann't do that because i only want show the data in this format, and i think if i do that (with calculate), the data is saving with this format in the xml.What you can do is have a separate instance that contains the data in that format. So you don't change your original instance. You create a new one, and have an element of that new instance calculated based on the non-formated value in the original instance. You the bind the control to the element in the new instance. Alex -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Adrian,
On 10/2/07, Adrian Baker <[hidden email]> wrote: > No fault of yours Alex (rather the spec), but the problem with this sort of > solution is that it becomes unworkable as soon as a repeat is involved. We'll say it is Erik's fault, since he is working on the spec! ;) You are right; this gets complicated with repeats, especially when you have to handle insert/delete and maintain this additional instance as well as the "original" instance. The WG is aware of this, and in fact this has already been discussed at a meeting I attended earlier this year. I can't quite remember was the suggestion was; ideally it would have been capture (http://www.w3.org/MarkUp/Forms/wiki/XForms_Future_Features), but it either wasn't or I can't find it. But if you have suggestions, please pass them along :). Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |