Hello,
Is there a "best way" to set the xs:dateTime value of a date element in an instance during submission? I've tried <setvalue ref="/forms/DateHeureEmission" value="current-dateTime()"/> in pageflow, <setvalue ref="instance('document-instance')/DateHeureEmission" value="current-dateTime()"/> in detail and model, but have been unable to make it work. Thanks in advance, -- einar |
You are doing this in the page-flow.xml? You probably want to put this logic in your xforms/xhtml page and not in the controller part where setvalue was more for parameter passing. What about something like this? <xforms:bind nodeset="dateTime" type="xs:dateTime" calculate="if (. = '') then current-dateTime() else ." /> which will set to now if the content is empty --Hank On May 23, 2008, at 3:18 AM, parisiana wrote: > > Hello, > > Is there a "best way" to set the xs:dateTime value of a date > element in an > instance during submission? > > I've tried > > <setvalue ref="/forms/DateHeureEmission" value="current-dateTime()"/> > > in pageflow, > > <setvalue ref="instance('document-instance')/DateHeureEmission" > value="current-dateTime()"/> > > in detail and model, but have been unable to make it work. > > Thanks in advance, > > -- einar > > -- > View this message in context: <a href="http://www.nabble.com/setvalue-xs%">http://www.nabble.com/setvalue-xs% > 3AdateTime-tp17422837p17422837.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.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 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 |
Thanks, Hank! Like magic -- on the nightly built -- in the model.
On Fri, May 23, 2008 at 6:14 PM, Hank Ratzesberger <[hidden email]> wrote:
-- -- Einar Moos -- parisiana.com Tel: 0676660080 -- 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 |
<quote author="parisiana">
Thanks, Hank! Like magic -- on the nightly built -- in the model. On Fri, May 23, 2008 at 6:14 PM, Hank Ratzesberger <hankr@crustal.ucsb.edu> wrote: > > You are doing this in the page-flow.xml? > > You probably want to put this logic in your > xforms/xhtml page and not in the controller part > where setvalue was more for parameter passing. > > What about something like this? > > <xforms:bind nodeset="dateTime" type="xs:dateTime" > calculate="if (. = '') then current-dateTime() else ." /> > > which will set to now if the content is empty > > --Hank > > > On May 23, 2008, at 3:18 AM, parisiana wrote: > > >> Hello, >> >> Is there a "best way" to set the xs:dateTime value of a date element in an >> instance during submission? >> >> I've tried >> >> <setvalue ref="/forms/DateHeureEmission" value="current-dateTime()"/> >> >> in pageflow, >> >> <setvalue ref="instance('document-instance')/DateHeureEmission" >> value="current-dateTime()"/> >> >> in detail and model, but have been unable to make it work. >> >> Thanks in advance, >> >> -- einar >> >> -- >> View this message in context: <a href="http://www.nabble.com/setvalue-xs%">http://www.nabble.com/setvalue-xs% >> 3AdateTime-tp17422837p17422837.html >> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. >> >> >> -- >> You receive this message as a subscriber of the ops-users@ow2.org mailing >> list. >> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org >> For general help: mailto:sympa@ow2.org?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> > > Hank Ratzesberger > NEES@UCSB > Institute for Crustal Studies, > University of California, Santa Barbara > 805-893-8042 > Hank, I discovered that your xpath entering dateTime on Orbeon 3.6 but acted strangely on the nightly built. I played around with it: <xforms:bind nodeset="DateHeureEmission" type="xs:dateTime" calculate="if (. = '') then xs:dateTime(now()) else ." /> The next issue is getting xs:dateTime "2008-06-01T10:33:02.31Z" w/o the timezone; ::2008-06-01T10:33:02.31. Tried a number of fixes, even in properties.xml and haven't gotten there. Thanks, -- einar |
Free forum by Nabble | Edit this page |