[html-formfu] HTML::FormFu::Element::DBIC::Select for review

Mario Minati mario.minati at googlemail.com
Sat Sep 22 22:47:49 GMT 2007


On Wednesday 19 September 2007 18:54:25 Zbigniew Lukasiak wrote:
> On 9/19/07, Mario Minati <mario.minati at googlemail.com> wrote:
> > On Wednesday 19 September 2007 14:56:16 Zbigniew Lukasiak wrote:
> > > This argument gets a bit out of proportions - so I will not extend it.
> >
> > Didn't want to set you up. Generalising can get difficult (for me)
> > without cases in (my) mind.
>
> Thanks Mario for your patience.  I really like the 'search' and
> 'where' attributes you introduced - this should make it quite general
> solution and perhaps the change that I propose will not be needed by
> anyone.  But I'll try to explain myself once again.
>
> What I am trying to say is that it is easier to manipulate something
> that you see then something unvisible.  It is easier to manipulate the
> Select element when you see it's options then when it does not have
> any options but you know that at some point in the future they'll be
> added.  This is the same when you create the element by
> 'load_config_file' and want to change it somehow via overriding a
> method and when you create it 'by perl' and want to change it by
> directly adding something to it 'by perl'.
>
> More directly: when you need to change some of the options - modify
> them (set some of them 'on') or delete some of them or add some others
> (like the 'choose country' option) you need to have access to them and
> if they only appear at when the form is rendered this might be too
> late.

See me post about callbacks. Maybe we need to introduce a general callback 
function that is called for every element before process/render?


> And another point - you are now overriding two methods - what I
> propose is to override just one.

I copied that behaviour from the Date element. If I remember right both 
functions are needed as render holds his own data set.

> Finally I found that populate is actually not called for every element
> - and what should be overriden instead seems to be 'new' or perhaps
> 'setup'.

Sorry I don't understand how this is connected to DBIC::Select.

Greets,
Mario



More information about the HTML-FormFu mailing list