cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <>
Subject Event handling in form libraries
Date Sat, 03 Sep 2005 12:48:05 GMT
Sylvain Wallez wrote:

>>  - event handlers in libraries are allowed, but I don't think they
>>    make sense there (e.g. on-value-changed)
> Why not? A library may for example contain a group of related widgets 
> with some interactions between them, e.g. a reusable car selector :-)

[Moving this discussion between Sylvain, Max and me to cocoon-dev as it's of 
general interest]

my wording was bad: I think they would make sense but I think the implementation 
is a bit difficult or at least this can cause strange errors. Maybe I'm wrong ...

Here a simple example why I don't think that it can work with simply using the 
eventhandler code of the library in the form definition.


  libWidget1 has eventhandler that references libWidget2

FORM DEFINITION (imports above library)

  myWidget1 extends libWidget1

What happens now? The form doesn't has a reference to libWidget2. And if it had, 
how could the reference in the event handler code can work as it probably has a 
different name than libWidget2 or is reused several times in the form definition.


Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}


View raw message