Re: How do I render zone from component A in component B

2014-10-28 Thread John
log.debug("onContactDetailsComplete " + java.util.Arrays.asList(contextValues)); Integer clientId = (Integer) contextValues[0]; ajaxResponseRenderer.addRender(wizardZone); } -Original Message- From: Lance Java Sent: Tuesday, October 14, 2014 5:47 PM To: Tapestry users Subj

Re: How do I render zone from component A in component B

2014-10-14 Thread Geoff Callender
I'm nodding enthusiastically as I read Kalle's comments. He's right - the differences between being in an authenticated state and non-authenticated state are so significant and it simplifies matters if a page can assume it is dealing with just one state or the other. I should have mentioned this

Re: How do I render zone from component A in component B

2014-10-14 Thread Kalle Korhonen
On Tue, Oct 14, 2014 at 11:11 AM, George Christman wrote: > Commented inline > On Tue, Oct 14, 2014 at 12:15 PM, Kalle Korhonen < > kalle.o.korho...@gmail.com > > wrote: > > On Tue, Oct 14, 2014 at 8:18 AM, George Christman < > gchrist...@cardaddy.com > > wrote: > > My original response still sta

Re: How do I render zone from component A in component B

2014-10-14 Thread George Christman
Commented inline On Tue, Oct 14, 2014 at 12:15 PM, Kalle Korhonen wrote: > On Tue, Oct 14, 2014 at 8:18 AM, George Christman > > wrote: > > > Geoff, I always try to follow you suggested pattern, but unfortunately I > > don't think it's always possible. I'd like to present a use case scenario >

Re: How do I render zone from component A in component B

2014-10-14 Thread Lance Java
I think you might be having the same issue I had a while ago [1] Both the layout and the component are defined by the page. It's a bit counter intuitive but the layout is not the component's parent so events will not bubble up to it. The page is the parent to both. [1] http://apache-tapestry-mail

Re: How do I render zone from component A in component B

2014-10-14 Thread Kalle Korhonen
On Tue, Oct 14, 2014 at 8:18 AM, George Christman wrote: > Geoff, I always try to follow you suggested pattern, but unfortunately I > don't think it's always possible. I'd like to present a use case scenario > and perhaps maybe you guys can break me out of my current design rut. > *Use case 1* >

Re: How do I render zone from component A in component B

2014-10-14 Thread George Christman
Geoff, I always try to follow you suggested pattern, but unfortunately I don't think it's always possible. I'd like to present a use case scenario and perhaps maybe you guys can break me out of my current design rut. *Use case 1* 1. My navigation bar is contained within my layout component which

Re: How do I render zone from component A in component B

2014-10-13 Thread Kalle Korhonen
On Mon, Oct 13, 2014 at 9:52 PM, Geoff Callender < geoff.callender.jumpst...@gmail.com> wrote: > On 14 Oct 2014, at 1:14 pm, George Christman > wrote: > > So I was able to get it working by using the following code inside of > > SiteIndex, but this does not seem very reusable. > > @InjectComponen

Re: How do I render zone from component A in component B

2014-10-13 Thread Geoff Callender
On 14 Oct 2014, at 1:14 pm, George Christman wrote: > So I was able to get it working by using the following code inside of > SiteIndex, but this does not seem very reusable. > > @InjectComponent >private Layout layout; > > void onShowLoginRegister() { >layout.onShowLoginRegister()

Re: How do I render zone from component A in component B

2014-10-13 Thread George Christman
So I was able to get it working by using the following code inside of SiteIndex, but this does not seem very reusable. @InjectComponent private Layout layout; void onShowLoginRegister() { layout.onShowLoginRegister(); } So is this the correct way to do this for this scenario? My

Re: How do I render zone from component A in component B

2014-10-13 Thread George Christman
John I'm a little confused with step 2. > > 1) componentA - trigger event > onSuccessFromLogin() { > componentResources.triggerEvent("LoginComplete"... > > 2) container of both A and B components - handover event > onLoginComplete(Object[] ctxValues) { > componentB.onLoginComplete(ctxValues

Re: How do I render zone from component A in component B

2014-10-13 Thread George Christman
Thanks everyone. Geoff, I ended up finding your jumpstart example soon after my reply. I've been studying your way of doing it. I'm still learning it, but thus far I like it much better than my original approach. - To unsubscribe,

Re: How do I render zone from component A in component B

2014-10-13 Thread John
upled with respect to the components. :) regards, John - Original Message - From: George Christman To: Tapestry users Sent: Monday, October 13, 2014 6:38 AM Subject: How do I render zone from component A in component B I have a modal login box. When a user logs in through the log

Re: How do I render zone from component A in component B

2014-10-13 Thread Geoff Callender
IMHO, a better technique is to bubble up an event. It's better because it doesn't require the component to know anything about its container. In the example below, PersonUpdate bubbles up UPDATED like this... componentResources.triggerEvent(UPDATED, new Object[] { person }, null); ...wh

Re: How do I render zone from component A in component B

2014-10-12 Thread Chris Mylonas
Hi george, On phone. @injectcontainer may give u access to layout to from your login refresh the navbar zone. http://tapestry.apache.org/injection-faq.html On 13/10/2014 4:39 pm, "George Christman" wrote: > I have a modal login box. When a user logs in through the login box, I > would like to r

Re: How do I render zone from component A in component B

2014-10-12 Thread George Christman
Nvm, After all these years, I was still completely unaware of @InjectContainer. Thanks. On Mon, Oct 13, 2014 at 1:38 AM, George Christman wrote: > I have a modal login box. When a user logs in through the login box, I > would like to reload a zone in the nav bar containing the user name which >

How do I render zone from component A in component B

2014-10-12 Thread George Christman
I have a modal login box. When a user logs in through the login box, I would like to reload a zone in the nav bar containing the user name which is contained within the layout component. I've tried to use @InjectComponent and call a method from within the layout component, but I get *Unable to at