Hi Johan,

I thing that the example below is exactly the thing that generics are pretty
good:

populateItem(ListItem<Person> item) {
   add(new Link<Person>("edit", item.getModel()) {
       public void onClick() {
           setResponsePage(new EditPage(getModelObject()));
       }
   });

(and EditPage is by itself already generified to <Person>)

well, just that the Link<Person> is IMHO redundant and unnecessary(just dropped a note to Martijn, but since you brought that up...)

populateItem(final ListItem<Person> item) {
    item.add(new Link("edit") {
        public void onClick() {
            setResponsePage(new EditPage(item.getModelObject()));
        }
    });

So, it might have sense with ListItem, but not necissarily with Link...

Regards, --- Jan.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to