web storage on local system using HTML5

web storage on local system using HTML5

  


Hello All,


I am new to OutSystems and this is my first project.  I am developing an web application using outsystems.  i need to store user id, user address, lat, lon in html5 web storage and retrieve this information on need basis.  can you please help me if any video or url available for implementing this feature.  Else please provide me suggestion / solution.


Thanks in advance.

Regards

Ryoto

Hi Ryoto,

where do you want to perform this ? you can simply do it using java script . Also any specific reason you want this to be stored in web storage. You can store this information in session also.



Regards

-PJ-

Pramod Jain wrote:

Hi Ryoto,

where do you want to perform this ? you can simply do it using java script . Also any specific reason you want this to be stored in web storage. You can store this information in session also.



Regards

-PJ-

Hi Pramod,

Thanks for quick reply.  I need to perform below mentioned tasks.

1. As soon as i click on the url the browser should look for the data like store id, address, lat lon.

2. if the details are not available then it should prompt for login page

3. if he details are available it should not ask for login.

for doing this activity i am not sure on page load how to trigger javascript.  

if you can let me know that would be great help.


Regards

Ryoto


So is this page is directly accessible without login ? When will you capture these details from user?

Regards

-PJ-

Pramod Jain wrote:

So is this page is directly accessible without login ? When will you capture these details from user?

Regards

-PJ-

first time during the configuration of the application one of the admin will visit the site and configure.  After configuration it should not display login screen. it should directly redirect to homepage.

Regards

Ryoto


Hi Ryoto,

I think the best way to handle this using OutSystems would be to store most of this information in the database, and use a cookie to store a GUID that can be used to identify a specific user/computer. This way, if there's no cookie you can ask the user for their login credentials, and otherwise if the user is not logged in log them in using the GUID to retrieve their credentials.

For storing and retrieving cookies, use SetCookie and GetCookie from the HTTPRequestHandler extension. For loging in a user, use the Login action from System.

Solution

Hi Ryoto,

I created a sample of similar behavior in JavaScript executed after accessing the login page.

It is not a page transition within Preparetion, but I propose it as one method.


1. Access the login page.
2. Extract localStorage to Widget with JavaScript immediately after reading.
3. Call ScreenAction to check the contents after expansion.
4. Move to the main page if check is appropriate.

Solution

Yoshiyasu Hatano wrote:

Hi Ryoto,

I created a sample of similar behavior in JavaScript executed after accessing the login page.

It is not a page transition within Preparetion, but I propose it as one method.


1. Access the login page.
2. Extract localStorage to Widget with JavaScript immediately after reading.
3. Call ScreenAction to check the contents after expansion.
4. Move to the main page if check is appropriate.


Thank you very much Hatano San,  I sincerely appreciate your effort.  It is exactly as per my requirement.

Thanks a ton 

Regards

Ryoto