Re: Setting a component property in another page

2006-03-28 Thread Nima Boustanian
Works like a freakin' charm. Thanks! Mike Snare wrote: Inject the item page via an annotation. get it, set the property, and return it all in your select action: // returns the page to go to public ItemPage selectAction(Long postId) { //Grabs the postId from a directLink parameter //setPost

Re: Setting a component property in another page

2006-03-28 Thread Mike Snare
Inject the item page via an annotation. get it, set the property, and return it all in your select action: // returns the page to go to public ItemPage selectAction(Long postId) { //Grabs the postId from a directLink parameter //setPostId(postId); don't think you need this... ItemPage ip =

Re: Setting a component property in another page

2006-03-28 Thread Nima Boustanian
Okay guys, I took your advice and made the appropriate changes (am using the InjectComponent annotation, made a page property that maps to the component property and so forth.) The only thing that's left is that I can't figure out how to call the goItemPage method in the first page class: pub

Re: Setting a component property in another page

2006-03-28 Thread Mike Snare
Doesn't it make more sense to set the value on the page and have the page deal with it however it needs to -- in this case by setting the id on the component in the page. It seems that the components used by a particular page are implementation details for that page that should not be exposed when

RE: Setting a component property in another page

2006-03-28 Thread James Carman
Have you tried using a ComponentAddress object to find the component? -Original Message- From: Mike Snare [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 28, 2006 8:57 AM To: Tapestry users Subject: Re: Setting a component property in another page Are you trying to set a property of

Re: Setting a component property in another page

2006-03-28 Thread Adam Zimowski
Nima, I'd be curious to see the code for your "next" page. I'm guessing you don't have: @InjectComponent("nameofyourcomponent") public abstract ConversationInfoJwc getConversationInfoJwc(); Then, from the previous page (the one you showed us), just call the abstract getter to get ahold of compon

Re: Setting a component property in another page

2006-03-28 Thread Mike Snare
Are you trying to set a property of component that is contained within a page? How do you have any idea that the instance of ConversationInfoJwc you are getting is the one used by the ItemPage you are getting? I think you have to assume that it isn't. I think you need an ID setter on the ItemPag

Setting a component property in another page

2006-03-28 Thread Nima Boustanian
Hey all Okay, I thought this was easy but I've been trying to set a component property for a couple of hours now without getting anywhere. First off, I have my page class along with a listener method: .. public abstract Long getPostId(); public abstract void setPostId(Long postId); @InjectPag