Search code examples
model-view-controllerfubumvc

How do I use continuations in FubuMVC


https://github.com/adymitruk/fubumvc/commit/083e1d593d4e797ac04fb493acd1e29a332cd303?w=1

It seems returning a continuation breaks the binding to the view. It used to work before I added the continuation. Now I get a blank page for the default view.


Solution

    1. You're using the same input model for your get and your post, so when you transfer, you get into an endless loop. I'm surprised you don't get a stackoverflow. There must be some checking in FubuContinuation that breaks the loop.

    2. You're using the input model as the view model which you (generally) shouldn't do.

    3. Your form tag needs to be a

    4. Also, it looks like due to the naming of your models and the folders, the default view conventions weren't matching up views to your actions. To get things working, I threw them all in the same folder (bad, I know).

    You'll want to sort out the folders and namespaces before doing anything serious with this.

    Here's the pull request which I was able to get working and posting and such: https://github.com/adymitruk/fubumvc/pull/1