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

Zbigniew Lukasiak zzbbyy at gmail.com
Wed Sep 19 17:54:25 GMT 2007


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.

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

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'.

Cheers,
Zbyszek



More information about the HTML-FormFu mailing list