nunb <[email protected]> writes:
>> The problem is that I often have data that needs to a) be presented in a
>> very specific way, meaning I want to implement render-widget-body myself
>> and (more importantly) b) be dynamically modifiable, e.g. have actions
>> rendered, participate in flows, have an "Edit" button for in-place
>> editing, etc.
>>
>> The second issue (b) in particular is something presentations can't
>> easily do, because views are singletons and presentations share state.
>
> When you say data if you mean an individual unit of data that
> corresponds to a field, then yes, I have similar issues. Can you
> elaborate on why presentations are not useful to you in this context?

I often need to display, say a paragraph of text with an "edit" link
that would switch the paragraph to an YUI Rich Text Editor. Another case
is many-to-many relations (think tags), if you only have a small number
of them you can get away with presenting them as a bunch of checkboxes,
but for larger numbers you need an autocompleting input or something
entirely different, with widget-like behavior.

> In my case, often the presentations (someone else called them
> decorations) are object or context specific -- so what I usually do is
> create my views at the point of use with defview-anon; modify the view-
> suffix/prefix or field-suffix/prefix functions as necessary (that is,
> they become closures with access to the object on which their behavior
> depends) and then use them.

That is a neat trick (defview-anon), I haven't thought of that. But it
shows that something is wrong if we need to jump through hoops.

[...]

Thanks to everyone for the very helpful comments. I think I have a good
idea of what is wrong with our current views and how to fix it. I'll try
to work on it after I finish the navigation-rewrite branch, as time
permits. As usual, I'll do lots of experimentation to see what works and
what doesn't.

--J.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to