Documentation / Tutorials / Awesome Enterprise,Generic,Quick Samples,SPA
/ Awesome Enterprise,Generic,Quick Samples,SPA / Ticket Handler
- Ticket Handler module works as intermediate module between destination module and route call
- For eg: route_ajax=“ticket-handler/<ticket_id>/submit”
- Here submit module is destination module
- At first ticket-handler module will get executes and here session ticket get verified.
- Use session_ticket.get to get session ticket data.
- Check details here – session_ticket-get
- Please consider following example,
- Calling Code snippet in samples app:
- In this code, session activity is set as app=”samples” which is used as router
and destination module is “test_2” in samples app.
- When Call Test will get click event, route will happen to ticket-handler module in same app.
- Ticket handler code:
- In above snippet, qs.0 is valued as ticket_id since route call is like that.
- Using the same ticket_id, ticket_data is getting fetched.
- If: ticket_data is not_empty which means ticket is valid and it has data.
- Further, you can execute the routing as per session ticket activity.
- It can be service, module or template.
- So simple it is, try this in your app.
- Happy coding.
- Ps: In near future, this will get update as ticket-handler as service perhaps there will be modification in routing too.