Hi Tom, Did you see my response from last Wednesday ? It looks like you missed it.
On Thu, Aug 1, 2013 at 9:40 AM, Tom Eicher - von Unterwegs <[email protected] > wrote: > Any idea where I'm thinking wrong ? > Thanks, Tom. > > > Tom Eicher <[email protected]> schrieb: > > >Hello, > > > >I have an outer form, with a CPM for a business entity. > > > >An inner form > >Form<Void> uploadImageForm = new Form<>("UploadImageForm"); > > > >has a > >FileUploadField uploadImageField = > > new FileUploadField("UploadImageField"); > > > >and when I submit the inner form, wicket tries to find > >getters/setters for UploadImageField in my business entity, > >which obviously are not there: > > > >WicketRuntimeException: No get method defined for class: class > >XXXBusinessEntity expression: UploadImageField > > > >I tried many things to work around this problem, including > >Form<Void> uploadImageForm = new Form<>("UploadImageForm", null); > >and > >uploadImageField = new FileUploadField("UploadImageField", null); > >and > >setModel(null) > >and some more, however the only way to really get rid of this > >I found is: > > > >FileUploadField uploadImageField = new > >FileUploadField("UploadImageField", new UploadFieldModel()); > > > > static class UploadFieldModel implements IModel<List<FileUpload>> { > > List<FileUpload> f; > > @Override > > public List<FileUpload> getObject() { > > return f; > > } > > @Override > > public void setObject(List<FileUpload> object) { > > f=object; > > } > > @Override > > public void detach() { > > } > > } > > > >That doesn't sound too reasonable, does it ? > >I do not need or want the value to be put to any model, is there any > >more sensible way to do this ? (wicket 6.8.0 - will update soon) > > > >Cheers, Tom. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
