IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this community and its apps will no longer be available. More details available on our FAQ.
Topic
  • 2 replies
  • Latest Post - ‏2015-11-05T05:38:05Z by Friendy
Friendy
Friendy
91 Posts

Pinned topic PluginRequestUtil adds the property instead of Updating

‏2015-11-03T14:59:53Z | ecmhv ecmsupport icn

So I am working on 2.0.3 and  this documentation states that it should update the property , so I called it for adding the docid property to the request (which should update the existing one)

    PluginRequestUtil.setRequestParameter(request, "docid", "my,{76FC22A3-565A-4B56-90CB-12653A00BA79},{526B01AD-E038-453E-A328-4D2D3FAF12B6}");

but it actually adds a second "docid" property , and not update the first one, so in the end I have two properties with docid.

so new request looks like

Attribute Name - alt_output,
Attribute Name - docid,
Attribute Name - objectStoreId,
Attribute Name - template_name,
Attribute Name - repositoryId,
Attribute Name - desktop,
Attribute Name - docid,  (this one gets add instead of updating)

  • Friendy
    Friendy
    91 Posts
    ACCEPTED ANSWER

    Re: PluginRequestUtil adds the property instead of Updating

    ‏2015-11-05T05:38:05Z  
    • rkyker
    • ‏2015-11-04T18:59:44Z

    If you are dumping out the list of parameter names returned by getParameterNames(), that method returns an array of the original request parameter names with the overridden parameter names appended. That may be why you are seeing the second docid above.

     

    When you call request.getParameter("docid") after calling PluginRequestUtil.setRequestParameter(...), is the value you passed to setRequestParameter() returned?

    no it was returning the same value , but after installing 2.0.3 FP2 now it returns the new value,
    so solution to this problem is update to 2.0.3.2 .

    Thanks
     

  • rkyker
    rkyker
    109 Posts

    Re: PluginRequestUtil adds the property instead of Updating

    ‏2015-11-04T18:59:44Z  

    If you are dumping out the list of parameter names returned by getParameterNames(), that method returns an array of the original request parameter names with the overridden parameter names appended. That may be why you are seeing the second docid above.

     

    When you call request.getParameter("docid") after calling PluginRequestUtil.setRequestParameter(...), is the value you passed to setRequestParameter() returned?

  • Friendy
    Friendy
    91 Posts

    Re: PluginRequestUtil adds the property instead of Updating

    ‏2015-11-05T05:38:05Z  
    • rkyker
    • ‏2015-11-04T18:59:44Z

    If you are dumping out the list of parameter names returned by getParameterNames(), that method returns an array of the original request parameter names with the overridden parameter names appended. That may be why you are seeing the second docid above.

     

    When you call request.getParameter("docid") after calling PluginRequestUtil.setRequestParameter(...), is the value you passed to setRequestParameter() returned?

    no it was returning the same value , but after installing 2.0.3 FP2 now it returns the new value,
    so solution to this problem is update to 2.0.3.2 .

    Thanks