Customer login  |   Contact us
Home Company Products Support Purchase
Forum Home » Survey software » Opinio plugins

Topic: Retrieve surveyId in IPageActionSurvey
Replies: 1   Pages: 1   Last Post: Apr 14, 2009 9:02 PM by: irina


Back to Topic List Back to Topic List
Replies: 1   Pages: 1  
daviwebTMT

Posts: 3
Registered: Apr 10, 2009
Retrieve surveyId in IPageActionSurvey
Posted: Apr 10, 2009 12:36 PM
  Reply

My plugin implement interface IPageActionSurvey.

In method "getFunctionHTML":
public String getFunctionHTML(int functionNo, HashMap resources) {

I need the surveyId of the current survey.

I can find it in the HttpRequest:
HttpServletRequest request = (HttpServletRequest) resources.get(PluginConstants.RESOURCE_HTTP_REQUEST);
long surveyId = Long.valueOf(request.getParameter("surveyId"));


But I realize that if I manually change querystring (forcing another surveyId), other menu link still use the first (and correct) surveyId. Only my plugin use the surveyId pass through querystring. So, how can retrieve surveyId without use querystring? Is it possible?

irina

Posts: 315
From: Norway, Oslo
Registered: Sep 4, 2003
Re: Retrieve surveyId in IPageActionSurvey
Posted: Apr 14, 2009 9:02 PM
  Reply

HttpServletRequest request = (HttpServletRequest) resources.get(PluginConstants.RESOURCE_HTTP_REQUEST);

long surveyId = Long.parseLong(request.getParameter("surveyId"))


You plugin must of cause implement IPageActionSurvey and survey id will be added to the plugin link on the main survey administration page.



© 1998-2009 ObjectPlanet, Inc. Øvre Slottsgate 5, 0157 Oslo, Norway Tel (+47) 2233 3360 | Fax (+47) 2233 3361