This project is read-only.

Setting a default action

Feb 22, 2013 at 3:20 PM

I'd like to be able to set a default action which is loaded after the user logs in. Ideally this will be a configurable setting in the Web.config.

I can see a route in NakedObjects.Web.Mvc.RunMvc for Actions but when I try to form a URL which matches that route I get a Http 404.

Any pointers or suggestions would be appreciated.

Feb 22, 2013 at 7:31 PM
If you are trying to invoke an action - are you invoking it with a POST? (In NO MVC all action invokes are POSTs I think even if they have no arguments.)

Please be aware, though (I have mentioned this before) in regard to any form of deep linking like this - that UR formats and Http methods are likely to change in a future release of Naked Objects - when we intend to align them more closely with the Restful Objects url formats and methods. So make sure that you:
  • Write automated tests for your functionality that would detect any such break
  • Abstract away the formatting of URLs and Http methods so they can be easily changed.