You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Wölm <mi...@net-m.de> on 2007/09/27 14:08:54 UTC

[4.1] AJAX Substituting a component

Hi,

I have a BasePage with a template which declares a component like this:

first.html:
<div jwcid="first">Hello World
</div>

Now I want a DirectLink thats update the content of the first.jwc and
substitute it with second.jwc:
second.html:
<div jwcid="second">ByeBye
</div>

(Imagine that the real components contain a complex template like the
short texts described here in the static way. Perhaps with further
encapsulated components...)

http://tapestry.apache.org/tapestry4.1/ajax/index.html gives information how to reload informations in a tapestry component like Insert, but I can not derive from that how to substitute 
a self-made component with another. The given example could be dissolved by an insert-component, but what happens, if I want to fully delete a complex component as the part of the actual dom and fully insert the substitute there? As like Prototypes AJAX.Update("<id of node>",...)

I would be very happy, to get a tip or link to get information about that. 
I could imagine that I have to declare a further component that encapsulate the component, which should be substitute (like first in example), but then I do not know how to substitute the inner component.


Regards,
Michael Wölm





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


Re: [4.1] AJAX Substituting a component

Posted by Marcus Schulte <et...@googlemail.com>.
have a look at @Block, @RenderBlock .


2007/9/27, Michael Wölm <mi...@net-m.de>:
> Hi,
>
> I have a BasePage with a template which declares a component like this:
>
> first.html:
> <div jwcid="first">Hello World
> </div>
>
> Now I want a DirectLink thats update the content of the first.jwc and
> substitute it with second.jwc:
> second.html:
> <div jwcid="second">ByeBye
> </div>
>
> (Imagine that the real components contain a complex template like the
> short texts described here in the static way. Perhaps with further
> encapsulated components...)
>
> http://tapestry.apache.org/tapestry4.1/ajax/index.html gives information how to reload informations in a tapestry component like Insert, but I can not derive from that how to substitute
> a self-made component with another. The given example could be dissolved by an insert-component, but what happens, if I want to fully delete a complex component as the part of the actual dom and fully insert the substitute there? As like Prototypes AJAX.Update("<id of node>",...)
>
> I would be very happy, to get a tip or link to get information about that.
> I could imagine that I have to declare a further component that encapsulate the component, which should be substitute (like first in example), but then I do not know how to substitute the inner component.
>
>
> Regards,
> Michael Wölm
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

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