Re: Is fireModelChanged mandatory ?

[email protected] Fri, 23 Sep 2005 13:58:32 +0200 (CEST)
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1127476750-12931-148
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Diez,

nice to read you ...

> then declare it as a new FormElement.
> The same way as e.g. SelectFormElement.

Right, this is clearly much more powerful and clean approach... I probably
should reuse your concept of a RepopulationFormElement, maybe not to
repopulate directly in render, but to generate the right BComponent to be
repopulated (in say a getComponent() method).

Then my FormMapTemplateModel getComponent(FormElement) method could read as=
 :

protected BComponent getComponent(FormElement el) {
        if (el instanceof RepopulationFormElement) {
            return el.getComponent(); // element has a good idea of how it
should render
        } else {
            String type =3D null;
            if (el.getType() =3D=3D FormType.BOOLEAN) {
                type =3D BInput.CHECKBOX;
            } else {
                type =3D BInput.TEXT;
            }
            return new BInput(type, el.getKey(), null);
        }
    }

Thanks for you advice.

Franck



------------=_1127476750-12931-148
Content-Type: text/plain; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: 8bit



--

Barracuda mailing list

[email protected]

http://www.objectweb.org/wws/lists/projects/barracuda


------------=_1127476750-12931-148--