So going forward is Tapestry going to no longer support transparently working with objects across a request response cycle? Is there going to be a way to take an object that is in a list on a page and perform an action on it without using an id and looking the object up again?
--Mark -----Original Message----- From: Alan Chandler [mailto:[EMAIL PROTECTED] Sent: Wed 11/2/2005 5:17 PM To: [email protected] Subject: Re: What to replace ActionLinks with? On Wednesday 02 Nov 2005 21:50, Mark Shead wrote: > I have a page that lists names like this: > Bob Martin _edit_ _delete_ > Tom Smith _edit_ _delete_ > Greg Jones _edit_ _delete_ > > The _edit_ and _delete_ are hyperlinks that bind to something like: > > <a jwcid="@ActionLink" listener="listener:deleteEntry">delete</a> > > However I see that ActionLink is deprecated. So I tried replacing it > with a DirectLink, but now it gives me an error saying: Heres one I do in a loop. See how the parameters defines two parameters <a jwcid="@DirectLink" listener="listener:doMarriage" parameters="ognl: {relationship.spouse.id,marriage.m_no}"> <span jwcid="@Insert" value="ognl:marriage.DOD">~May 2005</span> > > attempt to create delete event with null entity > > The listener looks like: > > public void deleteEntry(IRequestCycle cycle) { > PhoneBook book = PhoneBook.getInstance(); > book.delete(getSelectedEntry()); > } My listener looks like this @InjectPage("MarriagePage") public abstract MarriagePage getMarriagePage(); public MarriagePage doMarriage(Integer spouseId, Short mno) { Marriage marriage = getMarriage(); if (getPerson().getGender().isMale()) { marriage.setHusband(getPerson().getId()); marriage.setWife(spouseId); } else { marriage.setWife(getPerson().getId()); marriage.setHusband(spouseId); } marriage.setM_no(mno); MarriagePage marriagePage = getMarriagePage(); marriagePage.setFunction(Function.EDIT); return marriagePage; } The getMarriage() and getPerson functions are retrieving a session scoped application state objects which have been populated by @Textfields on this current page. ... -- Alan Chandler http://www.chandlerfamily.org.uk Open Source. It's the difference between trust and antitrust. --------------------------------------------------------------------- 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]
