That is because the mayTrackChangesFor() method should only return true
when it makes a version manager. Why is that not the case?
If that method returns true the version manager can't be null because the
version info must be tracked.

johan


On 3/1/07, Aaron Hiniker <[EMAIL PROTECTED]> wrote:

I pulled the latest from trunk.  And I am getting this NPE:

16:30:14,543 ERROR [STDERR] java.lang.NullPointerException
16:30:14,544 ERROR [STDERR]     at
wicket.Page.componentStateChanging(Page.java:327)
16:30:14,545 ERROR [STDERR]     at
wicket.Component.addStateChange(Component.java:2553)
16:30:14,545 ERROR [STDERR]     at
wicket.Component.setModel(Component.java:2191)
16:30:14,545 ERROR [STDERR]     at
wicket.MarkupContainer.setModel(MarkupContainer.java:596)
16:30:14,546 ERROR [STDERR]     at
com.edicorp.erp.web.components.search.ProductSearchPanel.query(
ProductSearchPanel.java:144)
16:30:14,546 ERROR [STDERR]     at
com.edicorp.erp.web.components.search.ProductSearchPanel.onUpdate(
ProductSearchPanel.java:109)
16:30:14,546 ERROR [STDERR]     at
com.edicorp.erp.web.components.search.FilterPanel.fireOnChange(
FilterPanel.java:74)
16:30:14,547 ERROR [STDERR]     at
com.edicorp.erp.web.components.search.query.QueryPanel$QueryForm.onSubmit(
QueryPanel.java:197)
16:30:14,547 ERROR [STDERR]     at
wicket.markup.html.form.Form.delegateSubmit(Form.java:680)
16:30:14,547 ERROR [STDERR]     at
wicket.markup.html.form.Form.onFormSubmitted(Form.java:396)
16:30:14,547 ERROR [STDERR]     at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


I remember I was getting this NPE before, and I patched the source to
include this null check in Page.java:

        final void componentStateChanging(final Component component,
Change change)
        {
                checkHierarchyChange(component);

                dirty();
                if (mayTrackChangesFor(component, null))
                {
                        if ( versionManager != null )

versionManager.componentStateChanging(change);
                }
        }

It seems that everywhere else in Page.java there is a null check for
versionManager, except in this method.  Not sure, but perhaps the
problem lies in the #mayTrackChangesFor() method, but in any case if I
add this null check my code runs fine.

Aaron


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to