cookies not working in 6.1.2 developer webclient ?

Forum to discuss the Web client version of Servoy.

cookies not working in 6.1.2 developer webclient ?

Postby stefanoni » Sat Dec 29, 2012 8:12 pm

I write the state of a combobox during a webclient-session:

application.setUserProperty('cMonatsCombo', newValue)

after restarting the developer, I read the cookie with

application.getUserProperty('cMonatsCombo')

but it it doesn't exist.

with the same code, but runing with Smartclient it works fine.

Question 1:
At what time the cookie should be written to the disk ?
Is it at the moment of the statment "application.setUserProperty()",
or do i have to close the window /solution /session in anyway to write
the Property persistant to the harddisk ?

Question 2:
Is the Userproperty stored on the same location for Smartclient / Webclient

Thank you for any suggestions
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: cookies not working in 6.1.2 developer webclient ?

Postby rgansevles » Wed Jan 02, 2013 3:08 pm

Alessandro,

The user property for the webclient is stored in the web browser, it sends it again with each request.
This is the same in developer and web client running on application server.

For smart client in developer it is stored in the servoy.properties file.

I just tried it and it seems to work as expected, after browser and developer restart the correct user property is retrieved.

Can you try with latest 6.1 release?

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: cookies not working in 6.1.2 developer webclient ?

Postby stefanoni » Mon Jan 07, 2013 5:10 pm

rgansevles wrote:...
For smart client in developer it is stored in the servoy.properties file.
I just tried it and it seems to work as expected, after browser and developer restart the correct user property is retrieved.
Rob

Thank You Rob,
I found the bug: The user property for the webclient (run in developer) is read from servoy.properties too,
not from the browsers-cookie !

That's why it was so confusing, the user property for the webclient is stored in the web browser like expected, but
not read again at the next session (after restarting developer).

This for 6.1.2 (Can't update to 6.1.3 at the moment, because a view days before holyday). Now I check how it works
with the servoy-server.

best wishes
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: cookies not working in 6.1.2 developer webclient ?

Postby ptalbot » Mon Jan 07, 2013 5:48 pm

stefanoni wrote:I found the bug: The user property for the webclient (run in developer) is read from servoy.properties too,
not from the browsers-cookie !

I think it might be behaving like that for you because you are using application.setUserProperty() from an authenticator solution...

I recently discovered that using application.setUserProperty() inside an authenticator in Web client was actually saving the property inside the server servoy.property (not only in developer but also on a real server) instead of in a Cookie
Thinking about it, it makes sense because the authenticator is a short-lived headless client, who knows nothing of the Web client session.

I believe this iswhat's happening to you. Move your application.setUserProperty() to your login solution, or any other solution opened after that and the user properties will be saved in cookies (in developer or server mode).

Hope this helps,
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: cookies not working in 6.1.2 developer webclient ?

Postby stefanoni » Mon Jan 07, 2013 6:24 pm

ptalbot wrote:I think it might be behaving like that for you because you are using application.setUserProperty() from an authenticator solution...


No, the solution type is "normal". the user can change the range of a calendar, then is save the new range with setUserProperty()
an rebuild the UI with solution-model. this is done, for example, hours after login.

it's the combo on top right of the screen:
http://www.dsug.eu/forum/index.php?page ... mentID=120


Is this a bug ?
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 5 guests