NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on June 13, 2009, 03:51:27 AM

Title: Date picture format
Post by: Alberto on June 13, 2009, 03:51:27 AM
Hi,
In the NTWS extension, general tab, we can see a Date picture format field.
Is is in dd/mm/yyyy by defalut but if I , by ex, add a date column to a browse it comes with @d17
So, What is it for?

Thanks
Alberto
Title: Re: Date picture format
Post by: Bruce on June 14, 2009, 10:40:35 PM
date entry - ie forms.

The browse uses the date pic from your dictionary.

On a browse use
p_web.site.datepicture
as the picture, then it'll match the forms.

Cheers
Bruce
Title: Re: Date picture format
Post by: Alberto on June 16, 2009, 02:51:44 AM
Thanks, but then, how is the best way to change the date picture at runtime for all the system, browses, forms, etc?
I thought it was suficient to set it to @d17
Dont forget I need to change it at runtime depending on the user language, then one session may be using @d2 and another session using @d6

Thanks
Alberto
Title: Re: Date picture format
Post by: Bruce on June 16, 2009, 04:30:14 AM
Use p_web.site.datepicture
Then you can set this to anything you like based on the session in WebHandler.
(ProcessLink, before parent call)

Cheers
Bruce
Title: Re: Date picture format
Post by: Rene Simons on June 17, 2009, 02:17:12 PM
Hey Bruce,
Can you give me an example on that?
Rene
Title: Re: Date picture format
Post by: Alberto on June 18, 2009, 02:02:59 AM
Hi Rene,

I think the only change we need to add is.

p_web.site.datepicture = '@d17'

for every user to use its own machine declared pcture format.

Am I wrong Bruce?

Thanks
Alberto
Title: Re: Date picture format
Post by: Bruce on June 18, 2009, 10:38:57 PM
Hi Alberto,

D17 would give you the date setting for the server, not the client machines. There's no way to get the date setting from a client machine.

Hence you need to explicitly set what you want, either at the server, or session level.

cheers
Bruce
Title: Re: Date picture format
Post by: Bruce on June 18, 2009, 10:40:46 PM
Hi Rene,

Assuming the user logs on.
And in your login you have something like
p_seb.SSV('PreferredDatePic','@d6')

Then in WebHandler, ProcessLink, before parent call
self.site.datepicture = self.GSV('PreferredDatePic')

Cheers
Bruce