Wild click events on my XPage

Today I had a strange issue on an XPage application I was working on I it didn’t matter where I clicked
my button on the form got clicked. Very strange. First thing I started to look for was if I had some onClick event that was bind wrong. Nope that wasn’t the case.

Then I went over to the client side and thought I could find what event listener that was making the call but this doesn’t say anything to me.


Then I started to look at the XSP.Attachevents at the bottom of the xpage

But if you have a large xpage and 20 events attached to it, it’s hard to find what is what. The my suggestion is give you components real names. And it was then I found the problem.
Can you spot the difference

The working client side code
his this the XPage with the faulty code


on’t scroll more spoiler alert










Yes, the partial event listener is bound to an object that doesn’t exist view:_id1:_id5
why you might ask, I found that this happens if a button don’t have a name and is set to do a partial refresh.


Then you will get that you will click the button where every you click on the xpage. Hopefully fixed in a future release with an error or a correctly generated id.

  1. thanks for shearing

  2. I only tend to set an ID on a control when it is accessed programmaticaly since I have understood you benefit performance when you have as least generated IDs as possible?

  3. Fredrik Norling

    Buttons always have get an id auto assigned and this ocurr if you remove that id.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>