{"action":"created","issue":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/3906","repository_url":"https://api.github.com/repos/volkanceylan/Serenity","labels_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/3906/labels{/name}","comments_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/3906/comments","events_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/3906/events","html_url":"https://github.com/volkanceylan/Serenity/issues/3906","id":359968118,"node_id":"MDU6SXNzdWUzNTk5NjgxMTg=","number":3906,"title":"MySaveHandler doesn't call any of the override methods","user":{"login":"njdkj","id":32440319,"node_id":"MDQ6VXNlcjMyNDQwMzE5","avatar_url":"https://avatars2.githubusercontent.com/u/32440319?v=4","gravatar_id":"","url":"https://api.github.com/users/njdkj","html_url":"https://github.com/njdkj","followers_url":"https://api.github.com/users/njdkj/followers","following_url":"https://api.github.com/users/njdkj/following{/other_user}","gists_url":"https://api.github.com/users/njdkj/gists{/gist_id}","starred_url":"https://api.github.com/users/njdkj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njdkj/subscriptions","organizations_url":"https://api.github.com/users/njdkj/orgs","repos_url":"https://api.github.com/users/njdkj/repos","events_url":"https://api.github.com/users/njdkj/events{/privacy}","received_events_url":"https://api.github.com/users/njdkj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-09-13T16:19:38Z","updated_at":"2018-09-17T13:30:40Z","closed_at":"2018-09-17T13:30:40Z","author_association":"NONE","body":"Hi,\r\nI am a new Serenity user.  I have a custom screen which uses default Endpoint and Repository classes for save process.  The screen is not linked to any table.  User inputs some info here and the custom processed info then to be saved in multiple tables at the back end which is a SQL server.\r\n\r\nEndpoint class works fine.   I am trying to put all of my validation code in ValidateRequest() of MySaveHandler class.  However, it doesn't call any of the override methods defined in that class.\r\n\r\nHere is how I am trying to do:\r\npublic SaveResponse Update(IUnitOfWork uow, CustomSaveRequest request)\r\n{\r\n            return new MySaveHandler().Process(uow, request, SaveRequestType.Update);\r\n}\r\n\r\nprivate class MySaveHandler : SaveRequestHandler<MyRow, CustomSaveRequest, SaveResponse>\r\n{\r\n            protected override void ValidateRequest()\r\n            {\r\n                     base.ValidateRequest()\r\n                      //.....All of the validation code goes here.........\r\n            }\r\n\r\n            protected override void BeforeSave()\r\n            {\r\n                     base.BeforeSave();\r\n                     // Some more code goes here........\r\n            }\r\n}\r\n\r\npublic class CustomSaveRequest: SaveRequest<CustomRow>\r\n{\r\n        public CustomProps CustProps { get; set; }\r\n}\r\n\r\nIn the dialog, the update service is called this way on the click of 'save-and-close-button' :\r\nexport class MyDialog extends Serenity.EntityDialog<CustomRow, any> {\r\n........\r\n\r\n     onClick: () => {\r\n          var request = this.getSaveRequest(); \r\n          MyService.Update(\r\n                {\r\n                    Entity: request .Entity,\r\n                    EntityId: request .EntityId,\r\n                    CustProps : this.customProps\r\n                },\r\n                response => { ..... }\r\n           );\r\n     }\r\n}\r\n\r\nNote that I am using custom SaveRequest which is inherited from SaveRequest plus an additional parameter (a class of multiple variables).  When I debug, I see that the params that I send from the UI is correctly passed to MySaveHandler class, but the debugger doesn't get into ValidateRequest() method at all.  I have another screen which has similar setup but uses the default SaveRequest and it seem to work fine there.\r\n\r\nAny Idea on what I am doing wrong here?  Any clue or suggestions is greatly appreciated.\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/comments/422016701","html_url":"https://github.com/volkanceylan/Serenity/issues/3906#issuecomment-422016701","issue_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/3906","id":422016701,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjAxNjcwMQ==","user":{"login":"volkanceylan","id":752470,"node_id":"MDQ6VXNlcjc1MjQ3MA==","avatar_url":"https://avatars3.githubusercontent.com/u/752470?v=4","gravatar_id":"","url":"https://api.github.com/users/volkanceylan","html_url":"https://github.com/volkanceylan","followers_url":"https://api.github.com/users/volkanceylan/followers","following_url":"https://api.github.com/users/volkanceylan/following{/other_user}","gists_url":"https://api.github.com/users/volkanceylan/gists{/gist_id}","starred_url":"https://api.github.com/users/volkanceylan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volkanceylan/subscriptions","organizations_url":"https://api.github.com/users/volkanceylan/orgs","repos_url":"https://api.github.com/users/volkanceylan/repos","events_url":"https://api.github.com/users/volkanceylan/events{/privacy}","received_events_url":"https://api.github.com/users/volkanceylan/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T13:30:40Z","updated_at":"2018-09-17T13:30:40Z","author_association":"OWNER","body":"It works as long as you dont make it not call handler."}}
{"actor":{"display_login":"volkanceylan"}}