Image select

Hey i have a problem with nifty-gui. I set up the image select in xml, then redid it in java, in the hope of being able to access methods like getSelectedImageIndex(), however the only methods i can access with the imageSelectBuilder are setImageWidth, setImageHeight and addImage.
control(new ImageSelectBuilder(“worldChooser”) {
setImageHeight(new SizeValue(“80px”));
setImageWidth(new SizeValue(“80px”));

How can i access the methods in ImageSelect, instead of the ImageSelectBuilder?
I tried doing this in the screenController:

cISC = new CreateImageSelectControl();
imageSelect = cISC.create(nifty, nifty.getCurrentScreen(),

This doesn’t work, and creates an extra ImageSelect element

I managed to fix it using this:
@NiftyEventSubscriber(id = “texture_choice”)
public void onChange(final String id, ImageSelectSelectionChangedEvent event) {
System.out.println("picture index chosen: " +event.getSelectedIndex());