You are right.  I found out the 'markupProvider' is null by debugging, thanks
to Tom to "fores" me to do it.

In Wicket 1.3 & 1.4, I overrided 'getAssociatedMarkupStream(boolean
throwException)' so that the class extends from Fragment doesn't have to
provide 'markupProvider'.  After upgraded to Wicket 1.5, I simply set the
'markupProvider' to null so that it compiled, but ran into NPE.

So I changed my code from:
        public static class FormField extends Fragment {
                public FormField(String markupId, Component c, IModel label, 
IModel m) {
                        super("fragmentId", markupId, null, m);
                        this.labelModel = label;
                        this.c = c;
                }
                ......
        }

to:
        public static class FormField extends Fragment {
                public FormField(String markupId, Component c, IModel label, 
IModel m,
MarkupContainer markupProvider) {
                        super("fragmentId", markupId, markupProvider, m);
                        this.labelModel = label;
                        this.c = c;
                }
                ......
        }

The problem is there are many 'new FormField()' codes, a big changes.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-page-has-a-redirect-loop-tp4649664p4649746.html
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