Bug in xPages 8.5.2? xp:image url=

When upgraded to 8.5.2 from 8.5.1 links on my website suddenly stopped working. after researching this I found the problem.

In my links I have code that switch image from expand to collapse using code

getComponent(“ex1”).url = “/collapse.gif”

This does not work in 8.5.2, instead of swithing icons I get a 404 error and redirects to this url: …/Portal.nsf/collapse.gif.xsp

<?xml version="1.0" encoding="UTF-8"?>

<xp:view xmlns:xp=“http://www.ibm.com/xsp/core”>

<xp:br></xp:br>

<xp:br></xp:br>

<xp:image url="/expand.gif" id="ex1"></xp:image>

<xp:link escape="true" text="Link" id="link1">

	<xp:eventHandler event="onclick" submit="true"

		refreshMode="complete">

		<xp:this.action><![CDATA[#{javascript:getComponent("ex1").url = "/collapse.gif"}]]></xp:this.action>

	</xp:eventHandler></xp:link></xp:view>

Subject: Solution

getComponent(“image1”).setUrl(“/expand.gif”);

as found from:

var img:com.ibm.xsp.component.xp.XspGraphicImage = new com.ibm.xsp.component.xp.XspGraphicImage;

img.setUrl()