Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Swap between SES and traditional URLs on the fly
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jason Durham  
View profile  
 More options Nov 4, 11:46 am
From: Jason Durham <jqdur...@gmail.com>
Date: Wed, 4 Nov 2009 10:46:24 -0600
Local: Wed, Nov 4 2009 11:46 am
Subject: Swap between SES and traditional URLs on the fly
This feature may exist, but I'm unable to find it in the
documentation.  My apologies to Luis if he's already documented such a
feature. :)

With another framework, it was simple to swap the entire application
between traditional URLs and SES URLs.  I know we can turn on/off the
SES interceptor rather easily.  However, this doesn't correct all of
the links I've created in a CB application.  For example...

SES URL:
<a href="#event.buildLink('user.edit')#/user/#someVar#">Edit User #someVar#</a>

That link has a "query string" that can't (reasonably) be altered at
runtime.  It would be nice to modify buildLink() to accept a structure
containing query string key/value pairs.

NEW URL:
<cfset qstring = {userID="55", context="foobar"} />
<a href="#event.buildLink(event: 'user.edit', qs: qstring)#">Edit User
#qstring.userID#</a>

Then, we could switch between the following two URLs with a simple setting...

<a href="index.cfm/user/edit/userid/55/context/foobar">Edit User 55</a>
.......or.......
<a href="index.cfrm?event=user.edit&userid=55&context=foobar">Edit User 55</a>

For comparison's sake, the framework I previously used simply used
application variables to compose the link...
<a href="#xit.editUser##myFramework.getApplication().queryStringSeparator#user #myFramework.getApplication().queryStringEqual#55#myFramework.getApplicatio n().queryStringSeparator#context#myFramework.getApplication().queryStringEq ual#foobar">Edit
User 55</a>

--
Jason Durham

--
Jason Durham


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Majano  
View profile  
 More options Nov 4, 4:53 pm
From: Luis Majano <lmaj...@gmail.com>
Date: Wed, 4 Nov 2009 13:53:04 -0800
Local: Wed, Nov 4 2009 4:53 pm
Subject: Re: [coldbox:3478] Swap between SES and traditional URLs on the fly

Jason,

We added this to 3.0.  There is an argument called "queryString" in the
buildLink method.  You pass in a query string and the method will convert it
to ses or leave it as is.

Luis

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google