Thanks Donf and Otho, my two menu components work like a charm. I used
the MultiZoneUpdate method. I now have a very interactive menu system !
-Original Message-
From: donf yang [mailto:donf.y...@gmail.com]
Sent: Thursday, June 11, 2009 3:31 PM
To: Tapestry users
Subject: Re: Two Menu
On Wed, Jun 17, 2009 at 3:35 AM, Eldred Mullany
wrote:
> Hi Guys
Hi!
> No problem, thanks Otho and donf yang for helping a newbie at Tapestry.
> Am still trying get my head around how to pass data between components
> (not same as pages) ie how to pass data from one component to another.
Take
a NullPointerException. If I use @Component annotation then I need to
> nest then it will work.
> But because my sidemenu component sits further down in my Layout.tml
> page, how can I do this ?
>
> Thanks again for the assistance.
>
>
>
> -Original Message
.
-Original Message-
From: Otho [mailto:taa...@googlemail.com]
Sent: Friday, June 12, 2009 2:55 PM
To: Tapestry users
Subject: Re: Two Menu Components
Oops, sorry. My bad.
This doesn't work with components in this way.
If you want to update with Ajax I suggest you try donf jangs solution
ng a serviceID ?
>
> Using T5 5.1.0.5
>
> How do I provide a serviceID to ComponentResourcesInjectionProvider ?
>
> Thank you
>
> -Original Message-
> From: Otho [mailto:taa...@googlemail.com]
> Sent: Thursday, June 11, 2009 3:33 PM
> To: Tapestry users
> Su
?
Thank you
-Original Message-
From: Otho [mailto:taa...@googlemail.com]
Sent: Thursday, June 11, 2009 3:33 PM
To: Tapestry users
Subject: Re: Two Menu Components
Create an eventhandler in your MainMenu component which fires on select
and
gives the selected menuitem as context.
For example
Create an eventhandler in your MainMenu component which fires on select and
gives the selected menuitem as context.
For example
class MainMenu
@Inject
private SideMenu sideMenu;
Object onActionFromYourMenu(String context)
{
sideMenu.setSelectedMainMenuItem(context);
return null;
}
class
Oh, some mistakes:
- >
---MyMenu.java
---
Object onShowSubMenu(String submenuId){
this.submenuId = submenuId;
//It's depends on which zone u linked
//MultiZoneUpdate multiZoneUpdatenew = new
MultiZoneUpdate("majorMen
codes fragements:
Main.tml
sub1-menu1 sub1-menu2
sub2-menu1 sub2-menu2
---Main.java---
//Provide menu source, key-title of sub menu | value - content block of sub
menu
@Inject
Block subMenuBlock1, subMenuBlock2;
Ma