Optional date field

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Optional date field

Vancheri, Alessandro
In the mine model I have an instance bind to an xs:date type (so in the view a calendar control is showed). But this instance is optional (it can be empty). How can I model this situation?
Many thanks.

Alessandro



--
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
Reply | Threaded
Open this post in threaded view
|

RE: Optional date field

Vancheri, Alessandro
I have a related issue: the optional field has to be written on a DB by the sql processor. So when it's empty a null value has to be written in the db. But how can I specify this in the sql:param? I tried to use an xpath 'if' but it doesn't work. Any idea? Thanks.




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Optional date field

Erik Bruchez
Administrator
In reply to this post by Vancheri, Alessandro
You can use the xforms:date type instead. It's the same as xs:date  
except it supports empty values.

-Erik

On Jan 31, 2008, at 4:31 AM, Vancheri, Alessandro wrote:

> In the mine model I have an instance bind to an xs:date type (so in  
> the view a calendar control is showed). But this instance is  
> optional (it can be empty). How can I model this situation?
> Many thanks.
>
> Alessandro
>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
Reply | Threaded
Open this post in threaded view
|

Re: RE: Optional date field

Erik Bruchez
Administrator
In reply to this post by Vancheri, Alessandro
I think this may be undocumented but sql:param has an optional @null-
if attribute which can contain an XPath expression. If that expression  
is true, the SQL processor sets the parameter to null.

-Erik

On Jan 31, 2008, at 6:09 AM, Vancheri, Alessandro wrote:

> I have a related issue: the optional field has to be written on a DB  
> by the sql processor. So when it's empty a null value has to be  
> written in the db. But how can I specify this in the sql:param? I  
> tried to use an xpath 'if' but it doesn't work. Any idea? Thanks.
>
>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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