I'm working on a framework that builds the user interface (input fields,
labels, containers for layout, grids, ...) and one of the features is that
a custom field editor (for example a dropdown) can publish events (for
example value changed). Internally when creating the field editor I
register it it as a PropertyProvider somewhere ... in a shared
EditorContext. So this EditorContext is a central point in building a
particular form. One other fieldEditor can declare it's interest in events
of type valueCHanged published by the first field editor (the dropdown).
Well in EditorContext I have a map of propertyProviders and
PropertyChangeListeners ... But my framework generates also some links for
filtering and CRUD features ... and replaces dynamically the components
(for example the user click on add link and the list of persons is replaced
with a form that creates a new person). FInally every dynamically generated
form can have a field that listen for property change so I need a way to
unregister somewhere. Can I do it using the wicket component callbacks ...
like register the listener in onCreate and unregister it in onDestroy? (I
know that there is no onDestroy for component ... but maybe other
callbacks).


Thank you
On Wed, May 16, 2012 at 4:41 PM, Fernando Wermus
<fernando.wer...@gmail.com>wrote:

> May you explain further your user case? Thus, we can understand the needs.
>
>
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>
>
>
> On Wed, May 16, 2012 at 7:00 AM, elvis.ciocoiu
> <elvis.cioc...@synthesys.ro>wrote:
>
> > I'm working on something that uses custom information attached to the
> > components and needs some sort of a listeners mechanism. The path taken
> was
> > to register the needed listeners in onCreate() of some component but I
> > don't
> > have a solution to unregister ... The onRemove doesn't help because it's
> > called when replacing the component with another in an ajax call. Is
> there
> > a
> > way to be notified that a component is reatached to component hierarchy?
> > I'm
> > using wicket 1.4. Is there another solution? Imagine that using a
> ListView
> > that creates elements and every element registers some listeners ... I
> need
> > to clear those listeners when the element is destroyed.
> > Thak you
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/custom-listeners-tp4641122.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
_____________________________________________________
Elvis Ciocoiu
Senior Consultant

Synthesys Consulting ROMANIA

address: http://www.synthesys.ro
e-mail: elvis.cioc...@synthesys.ro
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@synthesys.ro. We appreciate your cooperation.

Reply via email to