Separate web params from connector values

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
coggers
Posts: 3

Separate web params from connector values

Wed Nov 16, 2016 9:12 pm

Hi Team

I have a CustomProtocolHandler implementation, the full connector values including the web params are being displayed in the editor-title of the header-bar, I only need to display connector values and not the web params, but I need the web params to be passed with the URL.

Example of how I access the document:

Code: Select all

http://www.server.com/oxygen-webapp/app/oxygen.html?url=connector%3A%2FtestTarget-1-AUTHOR%26username%3Duser%26token%3DACCESS_TOKEN


The url in CustomProtocolHandler implementation has null for the query which means the web params that I am passing are only being added as part of the connector URL path.

The following is displayed in the editor-title
testTarget-1-AUTHOR&username=user&token=ACCESS_TOKEN

What I need to display is only the connector values:
testTarget-1-AUTHOR

Accessing with a decoded url as shown below doesn't display the web parameters but it doesn't also add them as part of the query, so I loose them completely.

Code: Select all

http://www.server.com/oxygen-webapp/app/oxygen.html?url=connector:/testTarget-1-AUTHOR&username=user&token=ACCESS_TOKEN

I have tried many different ways, encoding part of the url etc.. but at no success.

Ideally what I need is the connector values “testTarget-1-AUTHOR” to be part of the URL path and the web params “username=user&token=ACCESS_TOKEN” to be part of the query or any other property that allows me to access them in the CustomProtocolHandler implementation.
However if this is not possible at the moment and there is a way of overriding the value displayed in editor-title could you please advise.

Thanks in advance
cristi_talau
Posts: 168

Re: Separate web params from connector values

Thu Nov 17, 2016 1:02 pm

Hello,

It seems to be a problem with the way in which the encoded document URL is structured. Before encoding it looks like:

Code: Select all

connector:/testTarget-1-AUTHOR&username=user&token=ACCESS_TOKEN


while the correct format would be

Code: Select all

connector:/testTarget-1-AUTHOR?username=user&token=ACCESS_TOKEN


(note the question mark after AUTHOR).

So the full Web Author URL should be:

Code: Select all

http://www.server.com/oxygen-webapp/app/oxygen.html?url=connector%3A%2FtestTarget-1-AUTHOR%3Fusername%3Duser%26token%3DACCESS_TOKEN


Best,
Cristian
coggers
Posts: 3

Re: Separate web params from connector values

Thu Nov 17, 2016 2:48 pm

Hi Cristian

Thanks very much that does solve the issue.

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 3 guests