lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject DirectLink followed by redirect
Date Wed, 23 Mar 2005 02:36:28 GMT
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message