25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5KB

  1. <%
  2. Class ErrorController_Class
  3. Private m_useLayout
  4. Private Sub Class_Initialize()
  5. m_useLayout = True
  6. End Sub
  7. Public Property Get useLayout
  8. useLayout = m_useLayout
  9. End Property
  10. Public Property Let useLayout(v)
  11. m_useLayout = v
  12. End Property
  13. Public Sub Index()
  14. Response.Write "Index called"
  15. End Sub
  16. Public Sub NotFound()
  17. Response.Status = "404 Not Found"
  18. %>
  19. <!--#include file="../views/Error/NotFound.asp" -->
  20. <%
  21. End Sub
  22. ' Static action dispatch (AxonASP mishandles runtime-built Eval/Execute calls),
  23. ' called through <Name>Controller_Invoke at the bottom of this file.
  24. Public Sub Invoke(actionName, args)
  25. Select Case LCase(actionName)
  26. Case "index" : Index
  27. Case "notfound" : NotFound
  28. Case Else
  29. Err.Raise 438, "ErrorController_Class", "Action '" & actionName & "' not found"
  30. End Select
  31. End Sub
  32. End Class
  33. Dim ErrorController_Class__Singleton
  34. Function ErrorController()
  35. If IsEmpty(ErrorController_Class__Singleton) Then
  36. Set ErrorController_Class__Singleton = New ErrorController_Class
  37. End If
  38. Set ErrorController = ErrorController_Class__Singleton
  39. End Function
  40. ' Global entry point used by MVC_InvokeAction via GetRef. A separate call site per controller
  41. ' avoids AxonASP binding a shared call site to the first controller's Invoke.
  42. Sub ErrorController_Invoke(actionName, args)
  43. ErrorController().Invoke actionName, args
  44. End Sub
  45. %>

Powered by TurnKey Linux.