Updated complex models processing to work correctly in the model binding tab #655

Merged
merged 5 commits into from Dec 18, 2013

Conversation

Projects
None yet
3 participants
@CGijbels
Collaborator

CGijbels commented Nov 27, 2013

Name Prefix issue in ModelBinding tab

Deeply nested complex types got the wrong name prefix in the ModelBinding tab when rendered

Buggy version :
bad name prefixes

Fixed version:
bad name prefixes solved

Involved ValueProvider assumption

When showing the value providers next to a model binding entry, the assumption was made that the last one is the one that provided the value, which is not always the case, therefore I added the IsMatch property to give a clear indication whether or not that ValueProvider was involved

Buggy version
seems as if last valueprovider was ok

Fixed version
seems as if last valueprovider was ok solved

Support for DictionaryValueProvider and JsonValueProviderFactory

Added support for the way the JsonValueProviderFactory works (turning Json payload into a DictionaryValueProvider) and dictionaries and arrays in general
Also changed the way models are being popped from the stack, inside the ModelBinding tab, so that models are also found when dealing with dictionaries and arrays

Buggy version:
json posted data is missing parts

Fixed version (with the same posted data):
json posted data is missing parts solved

You can see for yourself by first doing a git checkout 41d2817bf850c0e7a0e4a696ff3c33faad4feb62 which will give you the test cases commit (/ModelBindingTests) in MVC4 Sample project without the fixes and then comparing it with the latest version.

@avanderhoorn

This comment has been minimized.

Show comment
Hide comment
@avanderhoorn

avanderhoorn Nov 27, 2013

Member

Looks good to me. @nikmd23 this good to you? (note, it will take a few days to get around to this, as we are on holidays he in the states till Monday).

Member

avanderhoorn commented Nov 27, 2013

Looks good to me. @nikmd23 this good to you? (note, it will take a few days to get around to this, as we are on holidays he in the states till Monday).

@avanderhoorn

This comment has been minimized.

Show comment
Hide comment
@avanderhoorn

avanderhoorn Nov 27, 2013

Member

p.s. EXCELLENT writeup. Made it really clear.

Member

avanderhoorn commented Nov 27, 2013

p.s. EXCELLENT writeup. Made it really clear.

@ghost ghost assigned CGijbels and avanderhoorn Dec 13, 2013

@nikmd23

This comment has been minimized.

Show comment
Hide comment
@nikmd23

nikmd23 Dec 18, 2013

Member

I'm happy with this.

Member

nikmd23 commented Dec 18, 2013

I'm happy with this.

@avanderhoorn

This comment has been minimized.

Show comment
Hide comment
@avanderhoorn

avanderhoorn Dec 18, 2013

Member

Trying to merge this in atm but can't. Can you rebase it?

Member

avanderhoorn commented Dec 18, 2013

Trying to merge this in atm but can't. Can you rebase it?

@CGijbels

This comment has been minimized.

Show comment
Hide comment
@CGijbels

CGijbels Dec 18, 2013

Collaborator

Ok, I'll make sure it can be merged

Do I merge it in myself afterwards?

Collaborator

CGijbels commented Dec 18, 2013

Ok, I'll make sure it can be merged

Do I merge it in myself afterwards?

@avanderhoorn

This comment has been minimized.

Show comment
Hide comment
@avanderhoorn

avanderhoorn Dec 18, 2013

Member

Go for it :D

Member

avanderhoorn commented Dec 18, 2013

Go for it :D

CGijbels added some commits Nov 20, 2013

Fixes #637 and also issues with complex models
- Added support for the way the JsonValueProviderFactory works (turning
Json payload into a DictionaryValueProvider) and dictionaries and arrays
in general
- Changed the way models are being popped from the stack, inside the
ModelBinding tab, so that models are also found when dealing with
dictionaries and arrays
- Fixed issues with name prefixes not being correctly rendered when
models are deeply nested

CGijbels added a commit that referenced this pull request Dec 18, 2013

Merge pull request #655 from Glimpse/no637-ienumerablevalueprovider-n…
…ot-proxied


Fixes #637 and also issues with complex models

@CGijbels CGijbels merged commit dbe6f33 into master Dec 18, 2013

@avanderhoorn

This comment has been minimized.

Show comment
Hide comment
@avanderhoorn

avanderhoorn Dec 18, 2013

Member

Again great work on this one mate!!!

Member

avanderhoorn commented Dec 18, 2013

Again great work on this one mate!!!

@nikmd23 nikmd23 deleted the no637-ienumerablevalueprovider-not-proxied branch Jul 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment