You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ulrich Stärk <ul...@spielviel.de> on 2009/07/27 15:20:08 UTC

update a zone from within a component

Hi List,

How can I update a zone on a page from within a component placed on that 
page? I can successfully pass the zone's id to the enclosed component 
but I can't return the zone's body in any of the components handler 
methods. How can I get a handle on the zone?

Uli

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


Re: update a zone from within a component

Posted by Ulrich Stärk <ul...@spielviel.de>.
Indeed, that would do the trick just nicely. I was thinking way too 
complicated, thanks Igor.

Uli

On 27.07.2009 22:29 schrieb Igor Drobiazko:
> I'm not sure I understand completely what you are trying to do but why don't
> you publish an event inside the handler method of the component. This event
> can be handled in the handler method of the containing page by returning the
> zone's body.
>
> On Mon, Jul 27, 2009 at 8:41 PM, Ulrich Stärk <ul...@spielviel.de> wrote:
>
>   
>> That's not what I was asking for. Maybe I was a bit unclear. Triggering the
>> update itself is not the problem but returning the correct content for
>> updating the zone from the event handler method of the component. The zone
>> should update itself with it's own content and that's the problem. Inside
>> the component I don't have direct access to the Zone on the page. Passing
>> the Zone as a parameter to the component works but calling getBody() on it
>> returns nothing it seems. I now have to use ComponentSource to locate the
>> zone in the page and then I can return it's body from the event handler
>> mehtod. That works but is ugly.
>>
>> Uli
>>
>> On 27.07.2009 19:54 schrieb Thiago H. de Paula Figueiredo:
>>
>>     
>>> Em Mon, 27 Jul 2009 10:20:08 -0300, Ulrich Stärk <ul...@spielviel.de>
>>> escreveu:
>>>
>>>  Hi List,
>>>       
>>> Hi!
>>>
>>>  How can I update a zone on a page from within a component placed on that
>>>       
>>>> page? I can successfully pass the zone's id to the enclosed component but I
>>>> can't return the zone's body in any of the components handler methods. How
>>>> can I get a handle on the zone?
>>>>
>>>>         
>>> In https://issues.apache.org/jira/browse/TAP5-569, Fernando Padilla
>>> posted some very useful Javascript code that I've used successfully in a
>>> project.
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> 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: update a zone from within a component

Posted by Igor Drobiazko <ig...@gmail.com>.
I'm not sure I understand completely what you are trying to do but why don't
you publish an event inside the handler method of the component. This event
can be handled in the handler method of the containing page by returning the
zone's body.

On Mon, Jul 27, 2009 at 8:41 PM, Ulrich Stärk <ul...@spielviel.de> wrote:

> That's not what I was asking for. Maybe I was a bit unclear. Triggering the
> update itself is not the problem but returning the correct content for
> updating the zone from the event handler method of the component. The zone
> should update itself with it's own content and that's the problem. Inside
> the component I don't have direct access to the Zone on the page. Passing
> the Zone as a parameter to the component works but calling getBody() on it
> returns nothing it seems. I now have to use ComponentSource to locate the
> zone in the page and then I can return it's body from the event handler
> mehtod. That works but is ugly.
>
> Uli
>
> On 27.07.2009 19:54 schrieb Thiago H. de Paula Figueiredo:
>
>> Em Mon, 27 Jul 2009 10:20:08 -0300, Ulrich Stärk <ul...@spielviel.de>
>> escreveu:
>>
>>  Hi List,
>>>
>>
>> Hi!
>>
>>  How can I update a zone on a page from within a component placed on that
>>> page? I can successfully pass the zone's id to the enclosed component but I
>>> can't return the zone's body in any of the components handler methods. How
>>> can I get a handle on the zone?
>>>
>>
>> In https://issues.apache.org/jira/browse/TAP5-569, Fernando Padilla
>> posted some very useful Javascript code that I've used successfully in a
>> project.
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko

Re: update a zone from within a component

Posted by Ulrich Stärk <ul...@spielviel.de>.
That's not what I was asking for. Maybe I was a bit unclear. Triggering 
the update itself is not the problem but returning the correct content 
for updating the zone from the event handler method of the component. 
The zone should update itself with it's own content and that's the 
problem. Inside the component I don't have direct access to the Zone on 
the page. Passing the Zone as a parameter to the component works but 
calling getBody() on it returns nothing it seems. I now have to use 
ComponentSource to locate the zone in the page and then I can return 
it's body from the event handler mehtod. That works but is ugly.

Uli

On 27.07.2009 19:54 schrieb Thiago H. de Paula Figueiredo:
> Em Mon, 27 Jul 2009 10:20:08 -0300, Ulrich Stärk <ul...@spielviel.de> 
> escreveu:
>
>> Hi List,
>
> Hi!
>
>> How can I update a zone on a page from within a component placed on 
>> that page? I can successfully pass the zone's id to the enclosed 
>> component but I can't return the zone's body in any of the components 
>> handler methods. How can I get a handle on the zone?
>
> In https://issues.apache.org/jira/browse/TAP5-569, Fernando Padilla 
> posted some very useful Javascript code that I've used successfully in 
> a project.
>

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


Re: update a zone from within a component

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Mon, 27 Jul 2009 10:20:08 -0300, Ulrich Stärk <ul...@spielviel.de>  
escreveu:

> Hi List,

Hi!

> How can I update a zone on a page from within a component placed on that  
> page? I can successfully pass the zone's id to the enclosed component  
> but I can't return the zone's body in any of the components handler  
> methods. How can I get a handle on the zone?

In https://issues.apache.org/jira/browse/TAP5-569, Fernando Padilla posted  
some very useful Javascript code that I've used successfully in a project.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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