Gili wrote:

IBM's JDK 5 is in beta: http://www.javalobby.com/java/forums/t51875.html

According to their website, they plan on releasing JDK 5 final in the fourth quarter of 2005.

I believe you guys said you'd hold off on Java 5 support until IBM had a version out. Now that this is near please consider what changes you plan on making. Concurrency libraries come to mind, as do type-safe enums. Anything else?


Generics should help to avoid a lot of castings. I would like to see generics on models. The model would still be a clean Facade while retaining type safety for users.


interface IModel<T> {
        T getModelObject();
}

class Component<T> {
        IModel<T> getModel() ...
        T getModelObject() ...
}

abstract class ListView<S> extends Component<List<S>> {
        public ListView(String id, IModel<List<S>> model)
        public onRequest() {
                for (S s : getModelObject()) {
                        Item<S> m = newItem();
                        populateItem(m);
                }
        }
        public abstract populateItem(Item<S> item);
}


usage:

ArrayList<String> l = new ArrayList<String>();
l.add("a");
l.add("b");
new ListView<String>("id", l) {
        public populateItem(Item<String> item) {
                item.add(new Label("label", item.getModelObject()));
        }
};



Timo


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to