GitHub user andruhon opened a pull request: https://github.com/apache/wicket/pull/254
provide more information on read only LambdaModel setObject exception It is sometimes hard to find which model is misused as ReadOnly model when it should be a ReadWrite one, because the UnsupportedOperationException doesn't provide enough information (some model of some component doesn't support setObject): ``` java.lang.UnsupportedOperationException: setObject(Object) not supported at org.apache.wicket.model.LambdaModel.setObject(LambdaModel.java:53) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3122) at org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1097) ``` this PR will make the unsupported stack trace to contain more detailed information like this: `Caused by: java.lang.UnsupportedOperationException: setObject(Object) on Model:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.Model]:object=[com.company.blanket.BlanketOrderBean@14c8757d]]:expression=[organisationShipTo]|com.company.blanket.CreateBlanketOrderPage$SelectLocationPanel$$Lambda$358/2112825589@6ac18206 is not supported` You can merge this pull request into a Git repository by running: $ git pull https://github.com/andruhon/wicket master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/254.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #254 ---- commit 19c8998e99754abb0138ff1cc33bd0a366034444 Author: Andrew Kondratev <andruhon@...> Date: 2018-01-02T22:25:24Z provide more information on read only LambdaModel setObject exception ---- ---