Versions Compared

Key

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

Web Application - Match Event

Panel
bgColor#2c3c4c

Signaled when the routing framework successfully matches a route with the current URL path component

Member of Web Application (PRIM_WEB.Application)

Details

The Match event is signaled when the routing framework successfully matches a route with the current URL path component. It is provided for the application to check its state and determine if the matched route is valid to continue.

Example

The following code snippet shows the handling of the Match event. Specifically, spotting the use of the protected route. The user does not need to be signed-in because it triggers a redirect to the "/SignIn" path.

     Evtroutine Handling(#Router.Match) Route(#Route) Allow(#Allow) Redirect(#Redirect) 
        If (#Route.IsProtected) 
           If (#IsSignedIn = true) 
              #Allow:= true 
           Else 
              #Redirect := #SignInRoute.Path 
              #RedirectOnSignIn := #Route.FullPath 
        Endif 
     Endroutine


See also

All Component Classes

Technical Reference