Mate, thanks a lot for your effort I must say.  And you summed it up well
- how to get the source of a component event?   (if all the components have the 
same id)

At the moment, all 16 droppables have a component id of either "extensionZone" 
or "voicemailZone".

I can't set a "context" or custom id as I would like because you can't have 
property expansions passing into components - the exception is "...it must 
start with a letter and contain letters,numbers and underscore" - and for some 
reason "context" i passed in didn't stick.

If i leave no id so that tapestry assigns it, i get an exception.

I don't mind the "a lot of work aspect"  -- but my tapestry knowledge hasn't 
quite hit into environment (apart from heartbeat) and contributing/augmenting 
stuff.  My brain would explode at this point :)

I might try the MarkupWriter again and see if I can push t:id stuff through it 
- that way I may be able to do the Zone.getBody() or getId() to be unique

But last week when I was mucking around with this stuff, using the 
@ImportJQueryUI() with my own custom javascript for drag and drop (simple 
jqueryui samples) failed to do anything.  This tml based stuff was the only way 
to make drag'n'drop work.

If I can set up a clean project with the non-working drag and drop, maybe i can 
submit a bug to the github project.



> I think that you need a handle on the ComponentEventRequestParameters so
> that you can call getNestedComponentId() which will have the id of the zone
> which fired the event.
> 
> I'm not sure that this tapestry makes this avaliable to you by default but
> you could do it yourself.
> 
> 1. Writer a ComponentEventRequestFilter which @Injects the Environment and
> calls environment.push()  and pop() with the ComponentEventRequestParameters
> 
> 2. Contribute the filter to the AjaxComponentEventRequestHandler
> 
> 3. Your component could do this
>   @Environmental ComponentEventRequestParameters parameters;
>   @Inject ComponentResources resources;
> 
>   void myEventHandler() {
>      Component component =
> resources.getEmbeddedComponent(parameters.getNestedComponentId());
>   }
> 
> It sounds like a lot of work... perhaps someone else knows of an easier way
> to get the source of a component event?


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to