Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Show Contents List
You are here:

...

The browser local and session storage features are available through the use of SYS_WEB.SessionStorage and SYS_WEB.LocalStorage properties.
SessionStorage and LocalStorage are physical storage areas belonging to the domain.

...

  • Save the supplied value in the browser local storage
    Mthroutine Name(SaveValue)
    Define_Map For(*Input) Class(#Prim_alph) Name(#Name)
    Define_Map For(*Input) Class(#Prim_alph) Name(#Value)
     
    If (#sys_web.localStorage<#Name> *Is *null)
     
    #sys_web.localStorage.Add( #Name #Value )
     
    Else
     
    #sys_web.localStorage<#Name> := #Value
     
    Endif
     
    Endroutine
     
  • Restore a value from the browser local storage
    Mthroutine Name(RestoreValue)
    Define_Map For(*Input) Class(#Prim_alph) Name(#Name)
    Define_Map For(*Result) Class(#Prim_alph) Name(#Result)
     
    If (#sys_web.localStorage<#Name> *IsNot *null)
     
    #Result := #sys_web.localStorage<#Name>
     
    Endif
     
    Endroutine
     
    Show Contents List