How to use custom field chrome with the latest bits?

53 views
Skip to first unread message

Matt S.

unread,
Nov 15, 2012, 4:27:13 PM11/15/12
to fubumv...@googlegroups.com
I'm using Import<SiteHtmlConventions>() with success. However, within my SiteHtmlConventions ctor, I'm calling FieldChrome<UnorderedListFieldChrome>(), but the default DefinitionListFieldChrome is still being used.

Looking at the code in Fubu shows me that RegisterService<>() is being called by FieldChrome<>(). Will that replace the default IFieldChrome service or just add to it? How can I replace the default IFieldChrome with mine? This one feels simple, so I must be missing something trivial.


Thanks,

-Matt

RobertTheGrey

unread,
Nov 16, 2012, 6:15:11 AM11/16/12
to fubumv...@googlegroups.com
In my ConfigureFubuMVCcs I'm doing things like this:

            Services(s => s.ReplaceService(MyService)); and
            Services(s => s.SetServiceIfNone<IMyService, MyService>());

Alternatively if I have many related services to register (examples: AutoMapper or RavenDB), I create a class that inherits from Registry and put them in there instead

Is that what you're referring to?

Jeremy D. Miller

unread,
Nov 16, 2012, 7:04:00 AM11/16/12
to fubumv...@googlegroups.com
Not in this case.  With the very latest html conventions, the IFieldChrome is configured via the html conventions because it needs to be sorted out and used by html convention profile.

Matt,

I'll research this at some point this morning.
 
Jeremy D. Miller
The Shade Tree Developer
jeremy...@yahoo.com



From: RobertTheGrey <robertg...@gmail.com>
To: fubumv...@googlegroups.com
Sent: Fri, November 16, 2012 5:15:15 AM
Subject: [fubumvc] Re: How to use custom field chrome with the latest bits?
--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/fubumvc-devel/-/4sDSH7QfNhcJ.
To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.

Matt Sollars

unread,
Nov 16, 2012, 4:46:07 PM11/16/12
to fubumv...@googlegroups.com
Thanks, Jeremy. My guess is that the default IFieldChrome is being set after mine, thus overwriting mine.

I cannot even imagine how busy you are these days; especially with v1.0 coming so soon.


-Matt

Jeremy Miller

unread,
Nov 25, 2012, 9:04:14 PM11/25/12
to fubumv...@googlegroups.com
Matt,

I was able to find and fix this problem yesterday.  Thanks for reporting this.

Jeremy

Matt S.

unread,
Nov 25, 2012, 9:59:12 PM11/25/12
to fubumv...@googlegroups.com
Jeremy,

I grabbed the latest bits this afternoon. Everything is definitely working as expected with field chrome now. I'm glad to help where I can. Thank you for tracking down the issue and fixing so quickly.


-Matt
Reply all
Reply to author
Forward
0 new messages