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 component reference and things should work. I also have a few suggestions. Since it looks like you're on JDK 1.5, take advantage of auto-boxing feature. It makes life a whole lot easier. Another words, you don't need to worry about passing wrappers for simple types like: Long, Integer, etc.. Just use raw data type and 1.5 will auto-magically box it for you. Also, we recently discussed (in another thread) the fact that excessive dots in OGNL calls eventually make for lower performance. Try to wrap your call with a page-level Java method, and return directly an object you want. Then, just call that method instead. It will be a whole lot faster. > value="ognl:components.table.tableRow.title"/> Do something like: public String getTitle() { return getComponents(). etc... getTItle(); } Then: value="ognl:title" Regards, Adam On 3/28/06, Nima Boustanian <[EMAIL PROTECTED]> wrote: > 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); > > @InjectPage("Item") > public abstract IPage getItemPage(); > > public IPage selectAction(Long postId) { > //No code here yet. Just an empty listener. > } > > public void setNextPageProperties(IRequestCycle cycle) { > ConversationInfoJwc conversationInfoJwc = > (ConversationInfoJwc) cycle.getPage("ConversationInfo"); > //The component where I want to set the property in > conversationInfoJwc.setPostId(getPostId()); > cycle.activate(getItemPage()); //The page which contains the > component > } > ... > > Which is called by: > ... > <span jwcid="@DirectLink" listener="listener:selectAction" > parameters="ognl:components.table.tableRow.id"> <span jwcid="@Insert" > value="ognl:components.table.tableRow.title"/> </span> > ... > > I want to set the property of ConversationInfoJwc which is contained in > the Item page somehow, but don't know how one should go about to > do it. I don't even know if the IRequestCycle is the proper interface to > use when trying to set component parameters, are there other ways of > doing this? > > > Thanks! > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]