Igor, I have one more question about IWrapModel :

why the Component#defaultModelComparator doesn't check and unwrap IWrapModel
before calling the IModel#getObject() ?

        private static final IModelComparator defaultModelComparator = new
                private static final long serialVersionUID = 1L;

                public boolean compare(Component component, Object b)
                        //final Object a =
                        // the default model can act as IWrapModel
                        final Object a = 
                        if (a == null && b == null)
                                return true;
                        if (a == null || b == null)
                                return false;
                        return a.equals(b);

In the sample above  with DDC, if we use the DefaultingWrapModel,
defaultModelComparator will always return true (in case of default value
selection) and the default model object will never updated because of :
Component#setDefaultModelObject(final Object object)

                // Check whether this will result in an actual change
                if (!getModelComparator().compare(this, object))

View this message in context: 
Sent from the Users forum mailing list archive at Nabble.com.

To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to