cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [cforms] add getDefinition to Widget interface?
Date Wed, 17 Dec 2003 12:02:44 GMT
Bruno Dumon wrote:

>On Tue, 2003-12-16 at 20:34, Timothy Larson wrote:
>>>>From the binding and other places I would like access to information about
where widgets are defined, so it can be reported in exceptions.
>>I added code to the widget definitions and builders to get and store this information
from the DOM.  The question is whether this info should be retrieved from the definition directly
>>  // This would require adding a getDefinition() method to the
>>  // Widget interface and thereby exposing the definition.
>>  somewidget.getDefinition().getLocation()
>>or indirectly from the widget
>>  // Definition shielded by widgets' getLocation() method performing:
>>  //   return definition.getLocation()
>>  somewidget.getLocation()
>Until now I tried to hide the fact that widgets have an underlying definition equivalent.
I don't have any particular reason for it, except that it might allow widgets which don't
have a definition equivalent. This is currently already somewhat the case with the RepeaterRow.

Agree. +1 for adding getLocation() on Widget (implemented internally by 
asking the definition when applicable), but -1 for adding getDefinition().


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message