Code review comment for lp:~michael.nelson/launchpad/652838-select-diffs-for-syncing

Revision history for this message
Michael Nelson (michael.nelson) wrote :

On Tue, Oct 5, 2010 at 6:18 PM, Gary Poster <email address hidden> wrote:
> I asked Leonard to comment on your (1), which he did, above.  formlib actions are unpleasantly limited.

Thanks Gary and Leonard.

>
> For (2), context-based vocabularies are what I expected you to use, but I see they are not sufficient for some reason.  Without looking at the code more carefully, I don't know why.  In their original usage, views are expected to be only a presentation of the context/model, so the context should be sufficient.  I'm not sure why views are more than a presentation here, but would be interested to hear why.  For the short term though, unless there's a nice way to refactor to actually use the context, hacks are the order of the day. :-(

In this case, the context is a distro series, the view is displaying a
batched (and soon to be filtered) list of items related to that
distroseries, which can be selected for an operation. Another similar
situation that comes to mind is copying packages for an archive. The
view's context is the archive, but the view lists the related batched
(and filtered) packages.

In both cases we've manually created a field with a vocabulary
matching the items listed on screen so that validation and the action
can only operate on the current batch of items. Does that make sense,
or is there a better way?

> --
> https://code.launchpad.net/~michael.nelson/launchpad/652838-select-diffs-for-syncing/+merge/37572
> You are the owner of lp:~michael.nelson/launchpad/652838-select-diffs-for-syncing.
>

« Back to merge proposal