InputBuilder for Nullable properties

1 view
Skip to first unread message

k03123

unread,
Nov 3, 2009, 8:16:49 PM11/3/09
to mvccontrib-discuss
Hi,

I am trying out InputBuilder and it's raising excepiton for Nullable
value types (eg. Int32?). It says can't find the view for Nullable'1.
Shouldn't it be using the same view for both Nullable and non-nullable
property? Or am I missing something?

Appreciate any help.







Eric Hexter

unread,
Nov 3, 2009, 8:41:49 PM11/3/09
to mvccontri...@googlegroups.com
There is not default convention that handles nullable types.  You would need to create a convention to decide what partial should be rendered for each nullable type. And register them with a factory.
 
 
 
Line 18 shows how to wire up your own factory into the input builders.
 

Eric Hexter

Principal Consultant | Headspring Systems | www.HeadspringSystems.com
email | ehe...@HeadspringSystems.com
blog | http://Hex.LosTechies.com
info | http://www.linkedin.com/in/erichexter




k03123

unread,
Nov 3, 2009, 9:56:48 PM11/3/09
to mvccontrib-discuss
Thanks a lot Eric.

Appreciated.


On Nov 4, 12:41 pm, Eric Hexter <eric.hex...@gmail.com> wrote:
> There is not default convention that handles nullable types.  You would need
> to create a convention to decide what partial should be rendered for each
> nullable type. And register them with a factory.
>
> http://code.google.com/p/codecampserver/source/browse/trunk/src/Infra...
>
> http://code.google.com/p/codecampserver/source/browse/trunk/src/Infra...
>
> Line 18 shows how to wire up your own factory into the input builders.http://code.google.com/p/codecampserver/source/browse/trunk/src/Infra...
>
> Eric Hexter
>
> Principal Consultant | Headspring Systems |www.HeadspringSystems.com
> email | ehex...@HeadspringSystems.com

Eric Hexter

unread,
Nov 3, 2009, 10:28:24 PM11/3/09
to mvccontri...@googlegroups.com
No problem, ashikgrg

Eric Hexter

Principal Consultant | Headspring Systems | www.HeadspringSystems.com
email | ehe...@HeadspringSystems.com
Reply all
Reply to author
Forward
0 new messages