Welcome to the IBM Collaboration Solutions Community IQJam
UsernamePassword
Reset Password | Register
   
Home | Tags | Help
Query_String value empty with agent URL from xpage 
Hi there,  

I'm developing an application using xpages in domino 8.5.2 running on a windows 2003 server.

My problem is this. I have a xpage on which I added an onload event which calls a client side javascript library.

XSP.addOnLoad(function(){getMyValues()});
 
This function (used for displaying a Fusion Chart swf chart) then calls a lotusscript agent with the fusion charts setDataURL api call. The url contains the agent name and the parameters like "/dbpath/agent?openAgent?val1=?val2=" .The agent returns xml.
 
The problem is that when I test the agent via a browser, I can add the parameters using the "&" sign and this works fine, but from within my xpage, I have to use the "?" sign for the agent to get the Query_String values.

When both val1 and val2 is empty I have no problem as the Query_String value contains all my parameters. The moment I add values to the parameters I get the following error:

2011/02/02 11:09:47 AM  HTTP Web Server: Invalid URL Exception [/myProject/myProject.nsf/ResourceAllocation?openagent?sDate=11/02/01?eDate=11/02/28]
 
I have also tried to change the data to normal string values like sDate=test1?eDate=test2 thinking that the "/" in the value was the problem, but this also gives me the exact same error.
 
What am I missing? Please help.

Thanks
Domino Development / XPages
Corne Roos - over 2 years ago |  |  | Viewed 389 times

There are 3 answers

2votes

The additional "?" characters are the problem. You can only have one in your URL, and that signals the start of the QueryString to the server. Your arguments should then be supplied using the ampersand / equals combination you mention when you test the agent manually. As to why Domino won't permit this format, I'm not sure; perhaps someone else who knows XPages can clarify?

Ben Poole - over 2 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community
1votes

Ben is absolutely correct, the format of URL you want to be building is ...?openagent&param1=1&param2=2

There is absolutely no issue with this format of URL with XPages.

Matt White - over 2 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community
1votes

You should be able to use an ampersand to separate the query string values, but if the editor is complaining try using & or & instead.

Andy Cunliffe - over 2 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community

Latest Answers for Domino Development / XPages 

How to call LS agent in xpage
Vijay Kumar - 6 months ago
Multi-values in an xPage view panel column
Judy Kilpinen - 8 months ago
From CSJS refresh a panel dijit.TooltipDialog
daniele grillo - about 1 year ago
How to get value from Repeater Control.
Atul Saxena - about 1 year ago
doing a partial update "beforepageload"
jeroen somhorst - about 1 year ago
How to get value from Repeater Control.
jeroen somhorst - about 1 year ago
How to get value from Repeater Control.
Mervin Thomas - about 1 year ago
Where Would I Delete My Cookie?
Lenni Sauve - over 2 years ago
Query_String value empty with agent URL from xpage
Andy Cunliffe - over 2 years ago
textfield formatting
Ben Poole - over 2 years ago
File Upload/File Download using Managed Beans
Toby Samples - over 2 years ago
File Upload/File Download using Managed Beans
Andy Cunliffe - over 2 years ago

Experts for Domino Development / XPages

There are no experts to display