1.3.0 (pretty recent build)/ Java5 I was thinking about this some more. I believe (either due to autoboxing or standard reflection) that my primitive float if being returned from the PropertyResolver as a Float object, not the float primitive that it is defined as. As a result, the getObject() value's type does NOT match the getObjectClass() value.
I suppose one way for me to get past this is to explicit set the Type, but I would think that the framework might need to be adjusted somehow to prevent this discrepancy. Chuck ChuckDeal wrote: > > I have a custom Model that extends PropertyModel. I attach an instance of > that model that wraps a float value (not Float). As a result, > FormComponent.typeName gets set automatically to "float". Later on, > during rendering, the following exception is thrown. Should it really be > trying to resolve the typeName for a primitive type? > > Chuck > > ====================================== > org.apache.wicket.WicketRuntimeException: Unable to load class with name: > float > at > org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:78) > at org.apache.wicket.util.lang.Classes.resolveClass(Classes.java:75) > at > org.apache.wicket.markup.html.form.FormComponent.getType(FormComponent.java:662) > at > org.apache.wicket.markup.html.form.AbstractTextComponent.onBeforeRender(AbstractTextComponent.java:103) > at org.apache.wicket.Component.beforeRender(Component.java:846) > at > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1449) > <snip recursive part of stacktrace> > at org.apache.wicket.Component.beforeRender(Component.java:856) > at > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1449) > at org.apache.wicket.Component.beforeRender(Component.java:856) > at org.apache.wicket.Page.renderPage(Page.java:885) > at > org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:165) > at > org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:59) > at > org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103) > at > org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1037) > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1107) > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176) > at org.apache.wicket.RequestCycle.request(RequestCycle.java:499) > at > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257) > at > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127) > ====================================== > > Should it really be trying to resolve the typeName for a primitive type? > > Chuck > -- View this message in context: http://www.nabble.com/FormComponent-PropertyModel-with-primitive-data-type-tf3948561.html#a11213133 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user