I think I understand what you are saying, but I just want to make sure. You are saying that instead of trying to define a view for the datalist widget to display the list how I want, it would probably be easier to just write my own list widget that has a render-widget-body that does what I want? But doesn't this make the code somewhat redundant/break the abstraction of views from widgets? Why even have views as a feature in the language? I see that form views and table views can add value, but even here, unless I am misunderstanding this, couldn't the form view or table view just be a form widget and table widget? In this case, if I wanted to use the free validation functionality, couldn't I just subclass a form widget (and instead of the form widget just calling "render-object-view" on a form view in it's render-widget-body, it would have the code that the form view normally renders directly in it's render-widget-body method)? I guess it just isn't very clear to me where to draw the lines of responsibility of views vs. widgets - like why does the dataform widget need to use a form view - why not just have it handle rendering on it's own?.
I guess I have so far thought of widgets handling the "innards" of the widget itself - keeping track of state and whatnot. The view, on the other hand, I have thought of as being responsible for determining the layout of the widget. I'm not sure if that is the proper abstraction, but if it is, I have one more question: why are datalist and datagrid separate widgets? Why not just have list and table be different views that can be used with a general data-viewer widget (I guess that would be dataseq)? It's probable that for whatever reason this is not possible (I am still trying to figure out the extent of the power of views), I am just curious as to why. My apologies if some of this has been answered elsewhere in the group - I saw some other threads about views, but much of it was over my head. Thanks! On Feb 17, 2:03 am, "Leslie P. Polzer" <[email protected]> wrote: > I usually don't bother with data views and write my own rendering > for just displaying stuff. > > Table views are nice though, and especially form views provide > real value because you can specify the form in a pure declarative > manner most of the time and get validation for free. > > > Additionally, I noticed that if I try to create a view that is any > > type other than sequence or table, datalist doesn't seem to work - why > > is that? Are there view-type specific implementations of methods in > > there that I am missing? > > I think the behaviour is just undefined if you pass a view to > an object that isn't prepared to take this kind of view (e.g. a data > view for a dataform's form view, non-sequential view for datalist's > view, ...). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
