Kevin Dangoor, el viernes 23 de diciembre a las 15:18 me escribiste:
> On 12/23/05, Leandro Lucarella <[EMAIL PROTECTED]> wrote:
> > > This seems too painful, because you may end up repeating that
> > > information on multiple templates.
> >
> > About this, this is just an option, which makes much more clear the
> > separation between view, controller and model and can be used in a very
> > wide use cases. If you use the same form in 2 separated templates, you are
> > probably repeating information allready, so the ordering stuff is not you
> > bigger problem anyway.
> 
> Not really... you can drop a form object into multiple pages very
> easily, if it makes sense to do so.
> 
> That said, adding this as an optional override seems reasonable. I've
> generally figured that the widgets/forms would need the ability to
> override at many points along the chain (in order of preference,
> lowest to highest: defaults, at the model, at the controller, at the
> view).

I finally give it a thought and I dropped my other ideas (they were to fix
problems that, after giving a deeper look at the code, didn't even existed
;). So I will stick to the ordering option for the view that it looks like
the only thing I see it's missing the TableForm (and all the classes that
use it). I think the result is a simple and general solution, with an
extra feature (form fields selection).

I dropped the DataController modification to add ordering because this
solution is more general and I think it covers it.

Here's the ticket/patch:
http://trac.turbogears.org/turbogears/ticket/259

I've added the ordering option to insert/render which is really a way to
select which widgets (fields) to show in the inserted form, please take
a look to the ticket (there's an example showing how to adress the
ordering problem with DataController, the only disadvantage is you have to
redefine the form_template, but I think _everybody_ will do that anyway).

I've posted another patch/ticket to add more options to DataController
constructor (to fill the missing class attributes):
http://trac.turbogears.org/turbogears/ticket/260

I hope you (and the TG users ;) find them useful...

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
 .------------------------------------------------------------------------,
  \  GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05 /
   '--------------------------------------------------------------------'
You look so tired-unhappy,
bring down the government,
they don't, they don't speak for us.

Reply via email to