In case it helps, here is an example of custom components triggering events
with no callback:
http://jumpstart.doublenegative.com.au/jumpstart/examples/component/crud/persons
and with callback (returning the zone(s) to update):
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/componentscrud/persons
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/gracefulcomponentscrud/persons
Geoff
On 24/09/2011, at 3:03 AM, Chris Poulsen wrote:
> Yeah I think that part should be mentioned - its a really neat feature! I'll
> dig into it and see if I can get around to whipping up a suggestion for
> JIRA.
>
> --
> Chris
>
> On Fri, Sep 23, 2011 at 6:56 PM, Thiago H. de Paula Figueiredo <
> [email protected]> wrote:
>
>> On Fri, 23 Sep 2011 13:11:25 -0300, Chris Poulsen <[email protected]>
>> wrote:
>>
>> Nice to know you got it working!
>>>
>>> I'm still interested in the docs mentioning the custom component events.
>>> If they are missing, it should definitely be added. (I was expecting to find
>>> it on
>>> http://tapestry.apache.org/**component-events.html<http://tapestry.apache.org/component-events.html>
>>> )
>>>
>>
>> Yep, that page is missing the event triggering part. Could you file a JIRA
>> for that so the committers don't forget it? :)
>>
>> Basically, @Inject ComponentResources and use the triggerEvent(String
>> eventType, Object[] contextValues, ComponentEventCallback callback) method.
>> You'll only need to implement a ComponentEventCallback if you want to get
>> the return value of the handler method. The return value of triggerEvent()
>> says if the event was handled or not. Very simple after you implement your
>> first one. :)
>>
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]