cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Larson <...@keow.org>
Subject cforms: add initialize widgets stage?
Date Thu, 09 Sep 2004 13:36:26 GMT
A little context first:
I was working with the union widget and decided to change the
case id lookup to use lookupWidget(path) so it could reference
widgets at other levels in the widget tree ("../../somewidget".)
While implementing this I found that this lookup needs to happen
after all the setParent(widget) calls have happened (after the
widget tree has been fully built) or the lookup can fail.

Because widgets are not currently notified when tree building is
finished, there was no place to plug in this lookupWidget() call,
so I added initialize() to the Widget interface and added code to
the form manager, AbstractContainerWidget, etc. to propagate a
notification so I would have a place to initialize union widgets.

Now I realize I could have instead used a lazy lookup when the
case widget is first referenced, and I wonder if I should strip
out the initialize() code or if it would help a use case anyone
else has. WDYT?

--Tim Larson

Mime
View raw message