Bugs item #1194326, was opened at 2005-05-03 11:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1194326&group_id=119783
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Maurice Marrink (mrmean)
Assigned to: Nobody/Anonymous (nobody)
Summary: Changing the object of a model throws exception
Initial Comment:
Changing the model object in the onSubmit() of a Form
causes an exception. The model is a
CompoundPropertyModel btw.
getModel().setObject(null, new MyObject()); throws a
nullpointer, because an attempt is made to use ognl
with a null expression.
Caused by: java.lang.NullPointerException
at java.io.StringReader.<init>
(StringReader.java:33)
at ognl.Ognl.parseExpression(Ognl.java:112)
at ognl.Ognl.setValue(Ognl.java:494)
at
wicket.model.AbstractPropertyModel.onSetObject
(AbstractPropertyModel.java:189)
at
wicket.model.AbstractDetachableModel.setObject
(AbstractDetachableModel.java:111)
at
nl.wehkamp.fmo.demo.gui.betalingen.BetalingenPage$B
etalingenForm.onSubmit(BetalingenPage.java:146)
if we try setModelObject(new MyObject()) we get
another ognl exception because it tries to set a property
with the name of the form on the model object.
Caused by: wicket.WicketRuntimeException: OGNL
Exception: expression='input';
component='7.menuBorder.input'
at
wicket.model.AbstractPropertyModel.onGetObject
(AbstractPropertyModel.java:149)
at
wicket.model.AbstractDetachableModel.getObject
(AbstractDetachableModel.java:92)
at wicket.Component.setModelObject
(Component.java:1091)
at
nl.wehkamp.fmo.demo.gui.betalingen.BetalingenPage$B
etalingenForm.onSubmit(BetalingenPage.java:146)
when using setModel(new CompoundPropertyModel(new
MyObject())); no exception is thrown but also the
rendering is not updated to show the changes.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1194326&group_id=119783
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop