Eventhandler for TwinColSelect component

How to attach the select listener on TwinColSelect components selected list (Right hand side) ? ValueChange event gives all the selected items but I want to attach the listeners on individual item level where want to show furhter data based on selection.

for example: Say I have country values. It will get displayed on left hand side of twinColSelect component and I can add them to selected list. after adding then I want to show states of those country in some onther component say List. to populate list I need to know which country user clicked from selected list.

How to achieve this? How to get the selectItemListener on selected part (right hand side component)

Regards,
Azhar

The client-side doesn’t send those events, so you would have to modify the client-side logic in order to receive such events. You might be able to do this by either extending the client-side code (not sure, because there might be private methods/variables that you would need access to) or you might be able to do it using an extension.

The TwinColSelect is actually a fairly simple component that can be replicated completely on the server-side. An option is to replicate the functionality using a CustomField and a couple of ListSelects and then attach listeners to the them. I’ve actually created
an add-on
using this approach that adds functionality to the TwinColSelect. You can consider using that as a base for your implementation or extending/modifying my solution.

Thanks kim. I got it working.