Computed field, html content, and server side script

Hi everyone, I am still very new to xpages and server side script. I have this problem. I hope someone can help me out.

Ok, I have a computed field which generate some html code (structure list). What I would like to do is when a user click on an item/link, it executes some server side script (eg. set a sessionScope variable)

A sample of my computed field value could be:

Any ideas? If this is even possible? Thank you.