On Mon, 30 Apr 2012 10:05:46 -0700 (PDT) kshitiz <[email protected]> wrote:
> Thanks for the reply Dan...now consider a situation: > > You have 5 drop downs, each with onselectionchange enabled. When you > change the choice of any one drop down, the chosen value should be > passed as parameter to that drop down only, so that it will display > new value. Rest drop downs should not get changed. How will you do > that? I very much recommend looking at wicket-examples, they show very well how Wicket components and pages work together. For most usecases, your components will not have to look directly at page parameters *at all*, and certainly not at other components' parameters. > On way would be to allocate each drop down a unique id and then, > associate each parameter being passed to the same page with that id. > This will help to judge the coming parameter belongs to which drop > down. But is there any more efficient way? Your components need a unique id in Wicket anyway. You don't have to handle those parameters yourself though. Simply override DropDownChoice#wantOnSelectionChangedNotifications() to return true, and then #onSelectionChanged will be called *for this component only* when a new value is selected. Carl-Eric --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
