What we have used for this type of behaviour is to have a user class/
object which gets session and user specific data populated upon
successful login and when the user logs out the user and session data
from user class gets wiped.
Also, other requests to the server while the user is logged in will
send the user authentication details or the session id as each
request to the server can take session_id param and return data for
the authenticated user and when not logged in will return data for a
generic user.
Here's a slim version of our user class if its any help:
[code]
<class name="User">
<attribute name="nickname" value="" type="string"/>
<attribute name="session_id" value="" type="string"/>
<attribute name="logged_in" value="" type="boolean"/>
</class>
<User />
[/code]
You can have an LzDelegate watching the "logged_in" attribute and
change parts of the GUI accordingly, e.g. the login panel.
Hope this helps.
Adeola.
On 7 Jan 2006, at 22:41, James Howe wrote:
I'm working on a Laszlo application which requires a user to login
before they can get to the application. I've got it such that I
display a login dialog into which the user enters name/password and
once validated the main display becomes visible. I've implemented
a 'logout' action which basically hides the app and reshows the
login dialog. The problem is that the login dialog still has the
information from the last time and when the app reshows, the
previous data displays briefly before the new data loads. What is
the proper way to clean out data from the previous user when a user
logs out of an application? Or would I just get the application to
reload itself from the server? If so, how do I do that?
Thanks!
--
James Howe
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user