I didn't think our default item renderers had skins.
I don't know if they do. I'm not referring to that. I'm referring to defining a custom itemrenderer class and a custom skin class (2 classes).
Are there ever cases where you might apply both a custom item renderer class and a custom skin class to a component, or is it one or the other?
If so, then I guess you could say that when you use a custom item renderer, it acts as a skin class and thus should do all that a skin class normally would do.
Hope this clears up the question.
1 person found this helpful
IIRC, our default renderers are not skinnable. A skin and a renderer are
both views in the MVC model, and some folks have tried to create a skinnable
renderer (which is possible, but in my mind, redundant).
I'm not sure we have an official statement, but here's how I think of it.
A component is a unit of functionality. A skinnable component supports a
skin that changes the visual aspects (the view) of that unit.
A renderer is really just a view, which is why it doesn't need a skin as
well. A custom renderer defines all of the visual aspects. Renderers don't
have to have functionality.
Yes, non-interactive components are essentially renderers, but the renderer
contract is much simpler and view-like (as in: here is your model/data, now
go display it). There is no notion of exposing properties that get tweaked
on a per-instance basis. Everything is data-driven. Renderers are only
used when merging a collection of data with views for that data. Components
and skins are declared, not generated from data.
That's my 2 cents.