Feature Requests item #603132, was opened at 2002-09-01 09:09
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=354754&aid=603132&group_id=4754

Category: framework
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Mind Bridge (mindbridge)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add a service similar to ExternalService

Initial Comment:
Rationale: At the moment Tapestry provides 3 standard 
types of links and services for invoking Tapestry pages: 
Action (invokes same page w/ rewind), Direct (invokes 
same page w/ parameters but w/o rewind), Page 
(invokes a different page w/o parameters). These are 
generally sufficient when you develop apps running 
within a single window and force the developer to think of 
pages in terms of objects and pass parameters via 
method calls, rather than arguments in the URL.

If the app needs to open new windows via JavaScript, or 
needs to create "bookmarkable" URLs, it is essential to 
use a service that opens a new page, but allows 
parameters to be passed in the URL. An example of 
such a service is given in the Vlib example application -- 
the ExternalService. I am sure that most of the regular 
users of Tapestry have implemented their own versions 
of such a service (we have, for example).

Proposal: Add a standard service and a component to 
create links to that service for invoking a new page and 
pass parameters to it via the URL. Needless to say, this 
is a relatively quick thing to do using AbstractService, 
but it would be great to have a standard implementation 
in the Tapestry framework. It would make sense to 
clearly explain in the documentation that using it in the 
general case is not the Tapestry way in order to prevent 
new users used to JSP and similar frameworks from 
using this service when not necessary. 


----------------------------------------------------------------------

>Comment By: Howard Lewis Ship (hship)
Date: 2002-09-02 09:49

Message:
Logged In: YES 
user_id=26816

I'm not sure skipping the call to validate() is a good thing, 
BTW.

For example, imagine that a page is "protected" and you 
need to login.  A validate() method could setup a Login-type 
page, with a callback to return to the external page when the 
user succesfully logs in.  PageRedirectException exists to 
allow for this ... validate() can throw PageRedirectException 
to redirect to the Login page and the Login page uses a 
persistently-stored callback to return the external page once 
login is complete.

I do this kind of thing in the Vlib example.

----------------------------------------------------------------------

Comment By: Howard Lewis Ship (hship)
Date: 2002-09-02 09:44

Message:
Logged In: YES 
user_id=26816

Also, I would change things so that you use the context to 
define the page (in which case, at least the page name is not 
affected by DataSqueezer).

----------------------------------------------------------------------

Comment By: Howard Lewis Ship (hship)
Date: 2002-09-02 09:41

Message:
Logged In: YES 
user_id=26816

You're on a tear today!

This looked good; I'm touching up a couple of things right now 
(i.e., to use TapestryStrings for localizable messages).  I'm 
also updating Framework.library to make this available to 
applications by default.

Also, is setup() a sufficient name?  I'd rather something that 
had the word "external" in it, perhaps setupForExternal() or 
setupExternalRequest() or just setupExternal().

Also, shouldn't there be an ExternalLink component?

Lastly, a common operation will be to encode a Map of values 
(especially if you are coming from the Struts world).  A static 
utility method for converting a Map into an array of objects 
(i.e., even elements are keys, odd elements are values) and 
converting such an array back into a Map would be darn 
useful.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=354754&aid=603132&group_id=4754


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to