You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Markus Joschko <ma...@gmail.com> on 2010/09/23 14:27:33 UTC

Global events

Hi,
just wanted to ask what you guys think about a global server side
event functionality in tapestry.
Currently the events triggered by triggerEvent on ComponentResource
just bubble up and halt when the first handler returns non null.
It would be nice to have a event mechanism where matching handlers in
all components on a page (not only the ancestors)
are triggered, the results are collected and passed to the event
triggering method.

The use case I have in mind is a page which has three components that
each display different aspects of a group of users  (one component
listing all users of a group with details, one component with birth
dates of the users and one component with twitter messages from the
users).
The "list of users" component has a delete button which deletes a
specific user. This results into an Ajax request to the server and
triggers a zone update of the user list. However the birthday and the
twitter lists still show the previously deleted user, because the
components on the server side aren't informed that they also need to
refresh their zones.
Ideally they have had received a server side event and contributed
their zones to the Ajax event result.

What do you think? Should I add a JIRA for this?

Regards,
 Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Global events

Posted by Markus Joschko <ma...@gmail.com>.
> You can currently do what you are asking, and the method is not more
> complicated than the system you are asking to be designed. You simply
> leave it up to the page to determine what requires a refresh of the
> components.
>
> If you trigger an event from your delete handler then your
> page can handle it how it sees fit.
>
> // Component A
>  Object onDelete(Long idOfItemToDelete) {
>        final Object[] returnObject = new Object[]{null};
>        // Maybe you want to pass the id of the object that was deleted here?
>        _resources.triggerEvent("ChangedSomeSharedData", null, new
> ComponentEventCallback() {
>            public boolean handleResult(final Object result) {
>                if (result != null) {
>                    returnObject[0] = result;
>                }
>                return result != null;
>            }
>        });
>
>        return returnObject[0];
>    }
>
> // Page containing Component A
>  Object onChangedSomeSharedData() {
>        return "SomeOtherPage";
>    }
>

Thanks for some example code. However I don't quite get how this helps
with the ancestor problem where I want to render zones from components
that are not in the same hierarchy.
Let's try some ASCII art:

          page
        /        \
     comp1  comp2
     /              \
  comp3        comp4*
  /
comp5

If an event is triggered in comp4, but comp5 also wants to rerender
it's zone on this event. How does it get notified?
Do you propose that that information is hard coded in the page during
development? I don't like this as it reminds me of action oriented
frameworks where the page handler is the master of the universe.
I really like how tapestry has decentralised contributions and
configuration at its heart and would like to have the same in the
relationship between page and its components.
A page should not have hard coded information if a subsubsubcomponent
needs to rerender its xyz zone when the onDelete event is triggered
somewhere on the page.

The story is different if the components register themselves on page
level for events (see my mail to Thiago).






>
> On Thu, Sep 23, 2010 at 5:27 AM, Markus Joschko
> <ma...@gmail.com> wrote:
>> Hi,
>> just wanted to ask what you guys think about a global server side
>> event functionality in tapestry.
>> Currently the events triggered by triggerEvent on ComponentResource
>> just bubble up and halt when the first handler returns non null.
>> It would be nice to have a event mechanism where matching handlers in
>> all components on a page (not only the ancestors)
>> are triggered, the results are collected and passed to the event
>> triggering method.
>>
>> The use case I have in mind is a page which has three components that
>> each display different aspects of a group of users  (one component
>> listing all users of a group with details, one component with birth
>> dates of the users and one component with twitter messages from the
>> users).
>> The "list of users" component has a delete button which deletes a
>> specific user. This results into an Ajax request to the server and
>> triggers a zone update of the user list. However the birthday and the
>> twitter lists still show the previously deleted user, because the
>> components on the server side aren't informed that they also need to
>> refresh their zones.
>> Ideally they have had received a server side event and contributed
>> their zones to the Ajax event result.
>>
>> What do you think? Should I add a JIRA for this?
>>
>> Regards,
>>  Markus
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
>
> --
> --
> http://www.bodylabgym.com - a private, by appointment only, one-on-one
> health and fitness facility.
> --
> http://www.ectransition.com - Quality Electronic Cigarettes at a
> reasonable price!
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Global events

Posted by Josh Canfield <jo...@gmail.com>.
> just wanted to ask what you guys think about a global server side
> event functionality in tapestry.

I don't think it's needed, and complicates a system that some people
already have trouble understanding.

You can currently do what you are asking, and the method is not more
complicated than the system you are asking to be designed. You simply
leave it up to the page to determine what requires a refresh of the
components. If you trigger an event from your delete handler then your
page can handle it how it sees fit.

// Component A
 Object onDelete(Long idOfItemToDelete) {
        final Object[] returnObject = new Object[]{null};
        // Maybe you want to pass the id of the object that was deleted here?
        _resources.triggerEvent("ChangedSomeSharedData", null, new
ComponentEventCallback() {
            public boolean handleResult(final Object result) {
                if (result != null) {
                    returnObject[0] = result;
                }
                return result != null;
            }
        });

        return returnObject[0];
    }

// Page containing Component A
 Object onChangedSomeSharedData() {
        return "SomeOtherPage";
    }

> What do you think? Should I add a JIRA for this?

Nope.

Josh

On Thu, Sep 23, 2010 at 5:27 AM, Markus Joschko
<ma...@gmail.com> wrote:
> Hi,
> just wanted to ask what you guys think about a global server side
> event functionality in tapestry.
> Currently the events triggered by triggerEvent on ComponentResource
> just bubble up and halt when the first handler returns non null.
> It would be nice to have a event mechanism where matching handlers in
> all components on a page (not only the ancestors)
> are triggered, the results are collected and passed to the event
> triggering method.
>
> The use case I have in mind is a page which has three components that
> each display different aspects of a group of users  (one component
> listing all users of a group with details, one component with birth
> dates of the users and one component with twitter messages from the
> users).
> The "list of users" component has a delete button which deletes a
> specific user. This results into an Ajax request to the server and
> triggers a zone update of the user list. However the birthday and the
> twitter lists still show the previously deleted user, because the
> components on the server side aren't informed that they also need to
> refresh their zones.
> Ideally they have had received a server side event and contributed
> their zones to the Ajax event result.
>
> What do you think? Should I add a JIRA for this?
>
> Regards,
>  Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Global events

Posted by Markus Joschko <ma...@gmail.com>.
> It bubbles up in the ancestor chain until the callback passed to the
> triggerEvent method says the event was handled.

Ah, missed that somehow. That helps returning multiple Zones but
leaves the ancestor problem.

>> Can you be more specific what I should pay attention for? Isn't
>> validation done when the page is fully rendered?
>
> No. It is done when the form is submitted (which is an event too). The form
> fields store commands in an object in the Environment that is put in a
> hidden field by Form. Later, when the form is submitted, Form executes these
> commands.

OK, went through it and I am not sure if I got everything, as there
are quite some concepts in it I am not very familiar with.

However I give it a try and transfer the logic to my situation:  You
propose to store an environment object in the page/component close to
the root and let all
components register there (e.g. in a map where the keys are events
they are interested in) during page rendering.
This map is then serialized and stored.
Later when the event is triggered the very first event handler looks
up that map, gets all registered components for that event and asks
them to
respond to that event?

Mhm, basically I build my own event bus. Shouldn't be necessary. But
maybe I am too blinded by my event approach and you meant something
different?

I also have thought about your performance argument. I doubt that this
is a huge problem. Tapestry has a static page structure. Therefore it
should be possible to go through all the components during page
construction
and register them for the events they listen on in an internal map on
page level. When a global event is fired, the registered components
can be simply looked up and notified. Virtually no performance impact.
Sounds rather simple. But ok, might not be the tapestry way of doing
things.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Global events

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 23 Sep 2010 11:32:09 -0300, Markus Joschko  
<ma...@gmail.com> wrote:

> Eventlink triggers an event in one component that is then bubbling up
> the ancestor chain, or?

It bubbles up in the ancestor chain until the callback passed to the  
triggerEvent method says the event was handled.

> Still only the ancestor chain. Even if you rethrow the event all the
> time and do a manual aggregation.

You don't need to retrigger the event. See comment above.

>> You can use the Environment to
>> make components communicate in ways that triggering events can't. Look  
>> at how validation works for form fields.
>
> Can you be more specific what I should pay attention for? Isn't
> validation done when the page is fully rendered?

No. It is done when the form is submitted (which is an event too). The  
form fields store commands in an object in the Environment that is put in  
a hidden field by Form. Later, when the form is submitted, Form executes  
these commands.

-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Global events

Posted by Markus Joschko <ma...@gmail.com>.
>> Actually, you can reach all the component's ancestor, if you do not
>> return anything in the event handler.

That's not what I want as this is the problem: Only the ancestors.

>> You can use eventlink to hit multiple components, but only one handler
>> can return the final result.

Eventlink triggers an event in one component that is then bubbling up
the ancestor chain, or?
So all the limitations I am talking about apply here. Feel free to correct me.

> In addition, you could pass some object in the event context that would
> aggregate

Still only the ancestor chain. Even if you rethrow the event all the
time and do a manual aggregation.

> In my humble opinion, triggering an event for all components in a page would
> be a bad thing with probably bad performance.

This might be true. But what is the alternative. I don't get what you
want to tell me with the Environment reference.
I have not used it actively but what I understand:
a) It works in a parent/child relationship.
b) Components must be "rendered"  to have a look into the environment.

-> In my case that means: the event is catched by the page, an
environment object is setup and all components are rendered to
   work with the environment. This can't be more efficient then going
through the components to search for specific event handlers and
only do partial renderings.

> You can use the Environment to
> make components communicate in ways that triggering events can't. Look at how validation works for form fields.

Can you be more specific what I should pay attention for? Isn't
validation done when the page is fully rendered? I talk about partial
renderings and events. I'll have a look anyway.

Thanks,
 Markus



>
> --
> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Global events

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 23 Sep 2010 11:07:13 -0300, Christophe Cordenier  
<ch...@gmail.com> wrote:

> Actually, you can reach all the component's ancestor, if you do not
> return anything in the event handler.
> You can use eventlink to hit multiple components, but only one handler
> can return the final result.
>
> see  
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/EventLink.html

In addition, you could pass some object in the event context that would  
aggregate
In my humble opinion, triggering an event for all components in a page  
would be a bad thing with probably bad performance. You can use the  
Environment to make components communicate in ways that triggering events  
can't. Look at how validation works for form fields.

-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Global events

Posted by Christophe Cordenier <ch...@gmail.com>.
Actually, you can reach all the component's ancestor, if you do not
return anything in the event handler.
You can use eventlink to hit multiple components, but only one handler
can return the final result.

see http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/EventLink.html


2010/9/23 Markus Joschko <ma...@gmail.com>:
>> I would chose to get the list of Zones from the page either by
>> implementing the event handler in it or by triggering an event from
>> the component...
>
> Yep, and here we are back to my original mail where I ask whether it
> might be a useful addition to tapestry
> to reach all components in a page with an event.
> Currently you only reach components that are ancestors (at least that
> is what I understand from the documentation) and you only reach one
> event handler (if you not rethrow the event and aggregate the result
> in every handler).
>
>>
>>
>> ---------- Forwarded message ----------
>> From: Markus Joschko <ma...@gmail.com>
>> Date: 2010/9/23
>> Subject: Re: Global events
>> To: Tapestry development <de...@tapestry.apache.org>
>>
>>
>> Ok, sorry. I thought the dev list is for questions regarding
>> development of tapestry in contrast to questions regarding the usage.
>>
>> The MultiZoneUpdate indeed solves one part: Delivering the content of
>> multiple zones to the client.
>> But how should the event handler know, which zones to return in the
>> MultiZoneUpdate? I can only think of three ways:
>> a) Zones configured as parameters. However with deeply nested
>> components that can lead to long chains of getters to reference the
>> zones.
>> b) Zones received as results of an event -> however the current event
>> mechanism is limited to one receiver/result.
>> c) Hardcoded. Only listed for completeness.
>>
>> Regards,
>>  Markus
>>
>> On Thu, Sep 23, 2010 at 2:31 PM, Christophe Cordenier
>> <ch...@gmail.com> wrote:
>>> Hi !
>>>
>>> Please, use the user mailing list for this kind of question.
>>>
>>> Anyway, i think that the MultiZoneUpdate should solve your problem.
>>>
>>> 2010/9/23 Markus Joschko <ma...@gmail.com>:
>>>> Hi,
>>>> just wanted to ask what you guys think about a global server side
>>>> event functionality in tapestry.
>>>> Currently the events triggered by triggerEvent on ComponentResource
>>>> just bubble up and halt when the first handler returns non null.
>>>> It would be nice to have a event mechanism where matching handlers in
>>>> all components on a page (not only the ancestors)
>>>> are triggered, the results are collected and passed to the event
>>>> triggering method.
>>>>
>>>> The use case I have in mind is a page which has three components that
>>>> each display different aspects of a group of users  (one component
>>>> listing all users of a group with details, one component with birth
>>>> dates of the users and one component with twitter messages from the
>>>> users).
>>>> The "list of users" component has a delete button which deletes a
>>>> specific user. This results into an Ajax request to the server and
>>>> triggers a zone update of the user list. However the birthday and the
>>>> twitter lists still show the previously deleted user, because the
>>>> components on the server side aren't informed that they also need to
>>>> refresh their zones.
>>>> Ideally they have had received a server side event and contributed
>>>> their zones to the Ajax event result.
>>>>
>>>> What do you think? Should I add a JIRA for this?
>>>>
>>>> Regards,
>>>>  Markus
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Christophe Cordenier.
>>>
>>> Committer on Apache Tapestry 5
>>> Co-creator of wooki @wookicentral.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>>
>>
>> --
>> Regards,
>> Christophe Cordenier.
>>
>> Committer on Apache Tapestry 5
>> Co-creator of wooki @wookicentral.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Regards,
Christophe Cordenier.

Committer on Apache Tapestry 5
Co-creator of wooki @wookicentral.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Global events

Posted by Markus Joschko <ma...@gmail.com>.
> I would chose to get the list of Zones from the page either by
> implementing the event handler in it or by triggering an event from
> the component...

Yep, and here we are back to my original mail where I ask whether it
might be a useful addition to tapestry
to reach all components in a page with an event.
Currently you only reach components that are ancestors (at least that
is what I understand from the documentation) and you only reach one
event handler (if you not rethrow the event and aggregate the result
in every handler).

>
>
> ---------- Forwarded message ----------
> From: Markus Joschko <ma...@gmail.com>
> Date: 2010/9/23
> Subject: Re: Global events
> To: Tapestry development <de...@tapestry.apache.org>
>
>
> Ok, sorry. I thought the dev list is for questions regarding
> development of tapestry in contrast to questions regarding the usage.
>
> The MultiZoneUpdate indeed solves one part: Delivering the content of
> multiple zones to the client.
> But how should the event handler know, which zones to return in the
> MultiZoneUpdate? I can only think of three ways:
> a) Zones configured as parameters. However with deeply nested
> components that can lead to long chains of getters to reference the
> zones.
> b) Zones received as results of an event -> however the current event
> mechanism is limited to one receiver/result.
> c) Hardcoded. Only listed for completeness.
>
> Regards,
>  Markus
>
> On Thu, Sep 23, 2010 at 2:31 PM, Christophe Cordenier
> <ch...@gmail.com> wrote:
>> Hi !
>>
>> Please, use the user mailing list for this kind of question.
>>
>> Anyway, i think that the MultiZoneUpdate should solve your problem.
>>
>> 2010/9/23 Markus Joschko <ma...@gmail.com>:
>>> Hi,
>>> just wanted to ask what you guys think about a global server side
>>> event functionality in tapestry.
>>> Currently the events triggered by triggerEvent on ComponentResource
>>> just bubble up and halt when the first handler returns non null.
>>> It would be nice to have a event mechanism where matching handlers in
>>> all components on a page (not only the ancestors)
>>> are triggered, the results are collected and passed to the event
>>> triggering method.
>>>
>>> The use case I have in mind is a page which has three components that
>>> each display different aspects of a group of users  (one component
>>> listing all users of a group with details, one component with birth
>>> dates of the users and one component with twitter messages from the
>>> users).
>>> The "list of users" component has a delete button which deletes a
>>> specific user. This results into an Ajax request to the server and
>>> triggers a zone update of the user list. However the birthday and the
>>> twitter lists still show the previously deleted user, because the
>>> components on the server side aren't informed that they also need to
>>> refresh their zones.
>>> Ideally they have had received a server side event and contributed
>>> their zones to the Ajax event result.
>>>
>>> What do you think? Should I add a JIRA for this?
>>>
>>> Regards,
>>>  Markus
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Regards,
>> Christophe Cordenier.
>>
>> Committer on Apache Tapestry 5
>> Co-creator of wooki @wookicentral.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Committer on Apache Tapestry 5
> Co-creator of wooki @wookicentral.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Fwd: Global events

Posted by Christophe Cordenier <ch...@gmail.com>.
I would chose to get the list of Zones from the page either by
implementing the event handler in it or by triggering an event from
the component...


---------- Forwarded message ----------
From: Markus Joschko <ma...@gmail.com>
Date: 2010/9/23
Subject: Re: Global events
To: Tapestry development <de...@tapestry.apache.org>


Ok, sorry. I thought the dev list is for questions regarding
development of tapestry in contrast to questions regarding the usage.

The MultiZoneUpdate indeed solves one part: Delivering the content of
multiple zones to the client.
But how should the event handler know, which zones to return in the
MultiZoneUpdate? I can only think of three ways:
a) Zones configured as parameters. However with deeply nested
components that can lead to long chains of getters to reference the
zones.
b) Zones received as results of an event -> however the current event
mechanism is limited to one receiver/result.
c) Hardcoded. Only listed for completeness.

Regards,
 Markus

On Thu, Sep 23, 2010 at 2:31 PM, Christophe Cordenier
<ch...@gmail.com> wrote:
> Hi !
>
> Please, use the user mailing list for this kind of question.
>
> Anyway, i think that the MultiZoneUpdate should solve your problem.
>
> 2010/9/23 Markus Joschko <ma...@gmail.com>:
>> Hi,
>> just wanted to ask what you guys think about a global server side
>> event functionality in tapestry.
>> Currently the events triggered by triggerEvent on ComponentResource
>> just bubble up and halt when the first handler returns non null.
>> It would be nice to have a event mechanism where matching handlers in
>> all components on a page (not only the ancestors)
>> are triggered, the results are collected and passed to the event
>> triggering method.
>>
>> The use case I have in mind is a page which has three components that
>> each display different aspects of a group of users  (one component
>> listing all users of a group with details, one component with birth
>> dates of the users and one component with twitter messages from the
>> users).
>> The "list of users" component has a delete button which deletes a
>> specific user. This results into an Ajax request to the server and
>> triggers a zone update of the user list. However the birthday and the
>> twitter lists still show the previously deleted user, because the
>> components on the server side aren't informed that they also need to
>> refresh their zones.
>> Ideally they have had received a server side event and contributed
>> their zones to the Ajax event result.
>>
>> What do you think? Should I add a JIRA for this?
>>
>> Regards,
>>  Markus
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Committer on Apache Tapestry 5
> Co-creator of wooki @wookicentral.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org




-- 
Regards,
Christophe Cordenier.

Committer on Apache Tapestry 5
Co-creator of wooki @wookicentral.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Global events

Posted by Markus Joschko <ma...@gmail.com>.
Ok, sorry. I thought the dev list is for questions regarding
development of tapestry in contrast to questions regarding the usage.

The MultiZoneUpdate indeed solves one part: Delivering the content of
multiple zones to the client.
But how should the event handler know, which zones to return in the
MultiZoneUpdate? I can only think of three ways:
a) Zones configured as parameters. However with deeply nested
components that can lead to long chains of getters to reference the
zones.
b) Zones received as results of an event -> however the current event
mechanism is limited to one receiver/result.
c) Hardcoded. Only listed for completeness.

Regards,
 Markus

On Thu, Sep 23, 2010 at 2:31 PM, Christophe Cordenier
<ch...@gmail.com> wrote:
> Hi !
>
> Please, use the user mailing list for this kind of question.
>
> Anyway, i think that the MultiZoneUpdate should solve your problem.
>
> 2010/9/23 Markus Joschko <ma...@gmail.com>:
>> Hi,
>> just wanted to ask what you guys think about a global server side
>> event functionality in tapestry.
>> Currently the events triggered by triggerEvent on ComponentResource
>> just bubble up and halt when the first handler returns non null.
>> It would be nice to have a event mechanism where matching handlers in
>> all components on a page (not only the ancestors)
>> are triggered, the results are collected and passed to the event
>> triggering method.
>>
>> The use case I have in mind is a page which has three components that
>> each display different aspects of a group of users  (one component
>> listing all users of a group with details, one component with birth
>> dates of the users and one component with twitter messages from the
>> users).
>> The "list of users" component has a delete button which deletes a
>> specific user. This results into an Ajax request to the server and
>> triggers a zone update of the user list. However the birthday and the
>> twitter lists still show the previously deleted user, because the
>> components on the server side aren't informed that they also need to
>> refresh their zones.
>> Ideally they have had received a server side event and contributed
>> their zones to the Ajax event result.
>>
>> What do you think? Should I add a JIRA for this?
>>
>> Regards,
>>  Markus
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Committer on Apache Tapestry 5
> Co-creator of wooki @wookicentral.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Global events

Posted by Christophe Cordenier <ch...@gmail.com>.
Hi !

Please, use the user mailing list for this kind of question.

Anyway, i think that the MultiZoneUpdate should solve your problem.

2010/9/23 Markus Joschko <ma...@gmail.com>:
> Hi,
> just wanted to ask what you guys think about a global server side
> event functionality in tapestry.
> Currently the events triggered by triggerEvent on ComponentResource
> just bubble up and halt when the first handler returns non null.
> It would be nice to have a event mechanism where matching handlers in
> all components on a page (not only the ancestors)
> are triggered, the results are collected and passed to the event
> triggering method.
>
> The use case I have in mind is a page which has three components that
> each display different aspects of a group of users  (one component
> listing all users of a group with details, one component with birth
> dates of the users and one component with twitter messages from the
> users).
> The "list of users" component has a delete button which deletes a
> specific user. This results into an Ajax request to the server and
> triggers a zone update of the user list. However the birthday and the
> twitter lists still show the previously deleted user, because the
> components on the server side aren't informed that they also need to
> refresh their zones.
> Ideally they have had received a server side event and contributed
> their zones to the Ajax event result.
>
> What do you think? Should I add a JIRA for this?
>
> Regards,
>  Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Regards,
Christophe Cordenier.

Committer on Apache Tapestry 5
Co-creator of wooki @wookicentral.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org