• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DirectAction URLs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DirectAction URLs


  • Subject: Re: DirectAction URLs
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 7 Sep 2005 11:36:52 -0700


On Sep 7, 2005, at 10:34 AM, David Schneider-Joseph wrote:

Thanks, that looks useful. However, emails will often be sent by the Application object,

I'm not sure that is the best design, but I'll let you worry about that.


without a WOContext present. It seems ugly to create a fake WOContext just to achieve this result, no?

Uglier than duplicating the code in WOContext in your code?


Chuck


On Sep 6, 2005, at 11:39 PM, Chuck Hill wrote:


See in WOContext:

public String completeURLWithRequestHandlerKey(String requestHandlerKey,
String aRequestHandlerPath,
String aQueryString,
boolean isSecure,
int somePort)


Chuck


On Sep 6, 2005, at 7:56 PM, David Schneider-Joseph wrote:



Hmm, that's one way to do it. Another idea I figured out is using the WOApplication.servletConnectURL() method. Unfortunately, that doesn't include the port, but my production server will be on port 80 so it won't be an issue, and it does get the rest of the path correctly. I'm sure I could hack the URL string to add WOPort in there, but it doesn't seem worth it.

Thanks for the suggestion. :)

On Sep 6, 2005, at 10:32 PM, Greg wrote:



In my application I have a Preference EO that is just a key/ value pair that gets written to the database. In the application I have a shared editing context for the preferences so that they are only fetched the once. I also have a configuration class that wraps a lot of the preferences. One specific config option is host. So all I have to do is reference the host via application.configuration.host and it will resolve correctly from the database. Also all paths etc are configuration options as well.

HTH,
Greg

On 07/09/2005, at 11:19 AM, David Schneider-Joseph wrote:




Hi all,

I have a mailing list administration software I'm developing. There is a direct action URL for unsubscribe requests, and I want to include this URL in the email. It would be easy for me to just copy and paste the URL as it is now. But what if:

A) I move to a different host or port?
B) I change the application base directory?

I want to just be able to refer to the class and method of the action, and get the corresponding URL, so that I do not have redundancy in my code. Is there any simple way to do that? Keep in mind that I also want to pass along form values to the method.

Thanks in advance.

David Schneider-Joseph
http://www.davidsj.com/


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40framedphotographics.com


This email sent to email@hidden










David Schneider-Joseph
http://www.davidsj.com/


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden



--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects


--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: DirectAction URLs
      • From: David Schneider-Joseph <email@hidden>
References: 
 >DirectAction URLs (From: David Schneider-Joseph <email@hidden>)
 >Re: DirectAction URLs (From: Greg <email@hidden>)
 >Re: DirectAction URLs (From: David Schneider-Joseph <email@hidden>)
 >Re: DirectAction URLs (From: Chuck Hill <email@hidden>)
 >Re: DirectAction URLs (From: David Schneider-Joseph <email@hidden>)

  • Prev by Date: Re: Enforcing uniqueness of data
  • Next by Date: Re: DirectAction URLs
  • Previous by thread: Re: DirectAction URLs
  • Next by thread: Re: DirectAction URLs
  • Index(es):
    • Date
    • Thread