Guidelines | CA Support Online | Community Events
CA Clarity General Discussion
Register  ·  Sign In  ·  Help
Jump to Page:   1
  Reply   Reply  

URL Redirect to a Clarity Page
Options    Options  
Christophe_D
New Member
Posts: 2
Registered: 10-13-2009


Christophe_D

Message 1 of 5

Viewed 506 times


Hi,

On the C.A. Sandbox, within a NSQL query definition, we can create linking with the action "URL Redirect to a Clarity Page".

 

Anybody knows if this value in the "Action" is an Out of The Box value or if it comes with the BRM content pack (or other)?

 

Thanks,

Christophe.

Kudos!
Solved!
Go to the Solution
Go to Solution
10-13-2009 07:16 AM
 
  Reply   Reply  

Re: URL Redirect to a Clarity Page
Options    Options  
CA Contributor maxad
CA Contributor
Posts: 346
Registered: 03-13-2008


maxad

Message 2 of 5

Viewed 482 times


This is not OOTB (and not to my knowledge in any content pack)

 

To enable this facility is quite simple, you need a dedicated page (based on pop-up template) and on that page a html portlet that uses javascript to 'scrape' the URL and perform the redirect.

 

ALL users should be given security access to both page and portlet (they will only see it fleetingly, but if they don't have access to them the redirct will fail with a 'you are not authorized' error)

 

I'm attaching both the page and portlet in xog form (zipped) The xog contains reference to Clarity 8.1.0.4247 but it should work in any 8x or 12x

 

The portlet's javascript is designed to be "graceful" if an error is detected (see image below) and it has been used extensivley in IE6 & 7 and FF2 & 3 (Chrome also)

 

Once this page/portlet exists it should register a link type called "URL Redirection" and you use that by passing a single string parameter which will be the URL you want to reach.

 

Remember that when doing intra-Clarity jumps this way you should use "relative" URLs  starting with "\niku\app?action=...." - strongly advise you avoid "absolute URLs" for Clarity pages! (If you don't follow this advice you will have problems moving queries/portlets from dev to test to prod. for instance)

 

I suggest you use the xog 'as is' (i.e. use the page and portlet id's of 'url_redirection' - this makes it very clear what that page and portlet do).

 

BTW:

1. This page/portlet was published  for the Australian User Group some time back - a good reason to join or create a user group :-)

2. The same page/portlet is used in at least 2 Clarity add-ons available from CA: "Data Integrity" and "Fiscal Focus"


 

Paul Maxwell Services Architect, CA

 

Attachment url_redirection_pg_portlet.zip (2 kb)
Attachment url_redirect_portlet_preview.png (5 kb)

Kudos!
Accepted Solution
Accepted Solution
10-13-2009 07:17 PM
 
  Reply   Reply  

Re: URL Redirect to a Clarity Page
Options    Options  
Christophe_D
New Member
Posts: 2
Registered: 10-13-2009


Christophe_D

Message 3 of 5

Viewed 453 times


Thanks  a lot for your answer, it works fine :)
Kudos!
10-14-2009 04:09 PM
 
  Reply   Reply  

Re: URL Redirect to a Clarity Page   [ Edited ]
Options    Options  
TConnery
Contributor
Posts: 93
Registered: 01-22-2008


TConnery

Message 4 of 5

Viewed 424 times


I'm interested in using this type of functionality but...  I don't get it..

 

I downloaded the xog, wrote it in and assigned rights to portlet and page but how do I test this?

 

Can you provide an example of usage?..   What code or variable needs to be modified?

 

Sorry...

Message Edited by TConnery on 10-16-2009 03:18 PM

 

++++++++++++++++++++++
http://twitter.com/thomasconnery
http://linkedin.com/in/tconnery
Kudos!
10-16-2009 03:18 PM
 
  Reply   Reply  

Re: URL Redirect to a Clarity Page
Options    Options  
CA Contributor maxad
CA Contributor
Posts: 346
Registered: 03-13-2008


maxad

Message 5 of 5

Viewed 412 times


this redirection expects you to provide the wanted URL - as a string

 

in (very brief) form

 

> query contains concatenation of basic URL with object instance id = [url attribute]

> query defines URL Redirection link which passes the above url attribute as the parameter for this link type = [url parameter]

> portlet displays a column of data which references the link defined from the query  

> user clicks on an item

> url redirection is called passing [url parameter]

> url redirection page is invoked

> url redirection portlet javascript reads whole url and ignores everything before and including "go2url" = [wanted url]

> javascript then sends the [wanted url] to the browser

> browser opens at really wanted location

 

[wow, that was hard to walk through!]

 

 e.g. your query must contain something like this:

 


select
id
, "//niku/app?action=projmgr.projectProperties&id=" || i.id as wanted_url
from inv_investments

 

 

So; you are now responsible for creating URLs that make sense, then you pass these into the URL redirection link, then you use that link in your portlet.

 

Easy? 

 

Note you can redirect to non-Clarity URLs and the concatenation used above is not the ONLY way to make URLs  - just a sample. 


 

Paul Maxwell Services Architect, CA
Kudos!
10-17-2009 05:13 AM
 
Jump to Page:   1