Unfortunately your suggestion doesnt' work. That is because the
"onchange" event only fires if i move an item from the left to the right
box or vice versa. what i want is to get a notification when an item is
clicked, not when it's moved. I managed to receive this notification by
registering a onclick listener with the 'choicesComponent' as shown in
the code of my inital mail.
My problem is that i want to find out which precise item has been
selected and use that information to get hold of the corresponding data
object (in my case MediaItem) which contains a property 'filename'. This
property i want to feed into an Image component to have it display the
corresponding image to the selected item in the Palette.
Am 19.02.2010 14:34, schrieb Michael O'Cleirigh:
getRecorderComponent().add(new FormComponentUpdatingBehavior("onchange"){
protected void onUpdate(AjaxRequestTarget
target) {
/**
I imagine something like this should do
the trick, but i can't find anything like it:
Media m = getSelectedItem();
imgPanel.setFilname(m.getFileName());
*/
Iterator selectedChoices =
myPalette.getSelectedChoices();
// let the image panel do something with
the selected choices.
target.addComponent(imgPanel);
});
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]