Today I discovered that in Monorail you must add an HTML name attribute to each element you want the SmartDispatchController to autowire for controller method parameters.
Without any name attributes on my emailAddress and password text boxes, the values were null that were passed into my controller method (BTW - isn't that a nice clean controller method?):
public void CreateAccount(string emailAddress, string password, string returnUrl){ UserServiceResponse response = userService.CreateNewAccount(emailAddress, password); if (response.HasErrors) { Flash.Add("Summary", response.ErrorMessages); RedirectToAction("New", "ReturnUrl=" + returnUrl); } else { CancelView(); Session[AuthenticationFilter.UserKey] = response.User; Redirect(returnUrl); }}
Adding the "name" HTML attribute made the values auto populate as needed:
<input id="emailAddress" name="emailAddress" type="text" tabindex="1" />
Powered by: newtelligence dasBlog 2.1.8102.813
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2012, Shawn Neal
E-mail