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
This this the XPage with the faulty code
Don’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.