oops..... wow, that's a first for me.... that message of course was
meant for the tapestry-user list.
Erik
On Mar 22, 2005, at 9:36 PM, Erik Hatcher wrote:
A common pattern I've been implementing is to throw a
RedirectException in my listener methods from form submits or
DirectLink's. I want to ensure the browser's URL is always
bookmarkable and refreshable. A DirectLink to add an item to a
shopping cart would add the item again when refreshed.
Are others doing this? Has anyone come up with clever and clean ways
to generalize this?
I'm considering implementing my own link service and component that
would redirect after the trigger, parameterizable on the link
component somehow. The defaults of redirecting to the current page as
if it was a PageLink would be ok, and if parameters are specified then
redirect like its an ExternalLink. Reasonable? What am I missing?
On a related note ExternalLink is beginning to frustrate me. I'd like
to be able to link to a page, pass it _named_ parameters and have the
page just get them automatically. Having to implement another
interface and ensure parameters are ordered is too brittle. I'd like
a link component/service that links to a page optionally with informal
named parameters, and sets the property for those names before
activating the page. That seems like it'd simplify a lot of what I
do. What else would something like this need to be robust and
generalizable?
Maybe there could be one link component to rule them all? :) Maybe
this isn't so far fetched, if a listener is not specified then it acts
as the named parameter link to just activate the page, but if a
listener is specified it still sets the parameters and then calls the
listener. Drawbacks?
Thanks,
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]