Re: inject component from parent component

2011-06-14 Thread Geoff Callender
The link http://jumpstart.doublenegative.com.au/jumpstart/examples/ajaxcomponentscrud has been replaced by: http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/componentscrud/persons On 11/08/2010, at 11:32 AM, Geoff Callender wrote: > It's best that the component knows not

Re: inject component from parent component

2010-11-01 Thread Muhammad Mohsen
This is an old thread but REALLY thank you all for the concepts you demonstrated and specially *Josh* for the code to clear everything out :) On Wed, Aug 11, 2010 at 3:32 AM, Geoff Callender < geoff.callender.jumpst...@gmail.com> wrote: > It's best that the component knows nothing of what's aroun

Re: inject component from parent component

2010-08-10 Thread Geoff Callender
It's best that the component knows nothing of what's around it. Instead, have it trigger an event to bubble up to its container and let the container decide what to do with it. Perhaps this example will help? http://jumpstart.doublenegative.com.au/jumpstart/examples/ajaxcomponentscrud

Re: inject component from parent component

2010-08-10 Thread Josh Canfield
> The Zone is just a component: > > MyPage.java: > > �...@injectcomponent @Property private Zone myZone; > > MyPage.tml: > >   > myZone.clientId is null until Zone.beginRender is called. If is rendered before the zone then zoneid will be null. Josh On Tue, Aug 10, 2010 at 12:34 PM, Howard Lewis

Re: inject component from parent component

2010-08-10 Thread Howard Lewis Ship
The Zone is just a component: MyPage.java: @InjectComponent @Property private Zone myZone; MyPage.tml: This passes the client element id of the Zone to your component. Alternately, you could pass the Zone itself (so that an ActionLink inside YourComponent could return zone.getBody() to re

Re: inject component from parent component

2010-08-10 Thread Josh Canfield
> I'm not sure how I can pass an embedded zone in the template as a parameter. It sounds like what you are trying to do is have your inner component render a block into a zone in the parent. What I would do is have the page tell your inner component which block to render, and what zone to update.

Re: inject component from parent component

2010-08-10 Thread Igor Drobiazko
Hi, On Tue, Aug 10, 2010 at 6:26 PM, Christian Koller wrote: > Hi > > I'm not sure how I can pass an embedded zone in the template as a > parameter. I tried for several hours but wasn't able to do that. > I can inject the zone to the page but then, how can I handle the zone down > to the sub com

inject component from parent component

2010-08-10 Thread Christian Koller
Hi I'm not sure how I can pass an embedded zone in the template as a parameter. I tried for several hours but wasn't able to do that. I can inject the zone to the page but then, how can I handle the zone down to the sub component as parameter? I know about the publish params and inherit params,

Re: inject component from parent component

2010-08-08 Thread Josh Canfield
It's generally not considered good design for a component to have knowledge of the design of it's container. This would be a universal design principle, not limited to tapestry. So if all you want to do is update a zone then couldn't you just pass the zone or zone id as a parameter to your comp

inject component from parent component

2010-08-08 Thread Christian Koller
In an inner component I handle an ajax request from an action link and want to update a zone in a outer component. As a work around I use the ComponentSource like: Object onActionFromMark(long wishedStartTime) { this.wishedStartTime = wishedStartTime; CalendarComponent cal = (CalendarComponent)

Re: inject component from parent component

2010-08-08 Thread Igor Drobiazko
Nope, this is not possible. What are you trying to do? On Sun, Aug 8, 2010 at 4:28 PM, Christian Koller wrote: > Hi > > With the annotation @Component I can inject components which are defined in > the component's template, for example: > @Component(id="myComponent") > private ActionLink link; >

inject component from parent component

2010-08-08 Thread Christian Koller
Hi With the annotation @Component I can inject components which are defined in the component's template, for example: @Component(id="myComponent") private ActionLink link; Is there a way to inject a component from the parent component? Something like: @Component(id="../myComponent") private Act