Both AbtractEngine and AbstractComponent implement a
listeners property. Your visit should add something
like:
private transient ListenerMap listeners = null;
public ListenerMap getListeners()
{
if (listeners == null)
listeners = new ListenerMap(this);
return listeners;
}
That should do it. Note that the listener map should be
transient ... it can be reconstructed in a new JVM after
de-serialization. Pardon any typos.
--
[EMAIL PROTECTED]
http://tapestry.sf.net
>
> Hello all,
>
> I want to put a listener method in the Visit Object,
> but I don't know how to bind to it from other pages
>
> I thought that it would be something like this:
>
> <component id="addItem" type="Direct">
> <binding name="listener" property-path="visit.listeners.directAddItem" />
> <binding name="context" property-path="intemID" />
> <field-binding name="stateful" field-name="Boolean.FALSE" />
> </component>
>
> but Tapestry complains that:
>
> "Class TapestryCIO.Visit does not implement a listeners property."
>
> This is weird because I have a method that has "listener
> method" signature, and the same method works fine if put it
> in every individual page that calls it.
>
> My guess is that I'm screwing up the property-path somehow.
> Does anyone know the proper way of doing this?
>
>
> Thanks,
>
>
> Luis Neves
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer