You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kristian Marinkovic <kr...@gmail.com> on 2012/04/26 23:44:41 UTC
How do i trigger a zone update in the parent component or page?
Hi,
i have a loop in my page that renders some "rows" whereas each row is
a zone component. Each row represents some special data type that has
different properties when edited. Because i don't know in advance how
many data types will be supported (and i want to stay as flexible as
possible) i just return an instance of the data type in my event
handler method and contribute a data type specific
ComponentEventResultProcessor to the
AjaxComponentEventResultProcessor. There i use a name convention to
identify the page and component that is suited to render a specific
form for the specific data type and eventually return the component
for rendering. The benefit is that i can drop in new modules later to
support new data types without changing the existing page.
The problem i'm having is that i was not able to figure out how to
trigger a zone update of the very same row after i save or cancel the
data type specific form component. after rendering the edit component
i lost the zoneid that was associated with the edit link.
Does anyone have an idea how to solve this? Do i have to persist the
generated zoneId somehow to call some JS function manually?
g,
kris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How do i trigger a zone update in the parent component or page?
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Hi!
This is something to be avoided: one component triggering an event in
another component. Components should be self-contained.
I'd have a component in the child component to receive the zone id to be
updated.
--
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