It seems that overriding Component#initModel() to return null does the
trick!
On 25/10/13 12:30, Edgar Merino wrote:
Hello, I'm having a problem with a FileUploadField, I'm using
CompoundPropertyModels through my application but for this single
element I would like to avoid having a model,
FileUploadField needs a model which implements IModelListFileUpload
have a look to these threads
http://apache-wicket.1842946.n4.nabble.com/file-upload-in-nested-form-with-CPM-needs-dummy-model-td4660468.html
Take a look over Section 11.7 File upload of the Wicket Guide:
http://wicket.apache.org/guide/guide/chapter11.html#chapter11_7
You need something like this:
fileUploadField = new FileUploadField(fileUploadField);
Form form = new Form(form){
@Override
Thank you Francois, but as I mentioned in an earlier post overriding
FileUploadField#initModel() to return null did the trick and seems a bit
cleaner that creating a Dummy model. Overriding initModel() makes sure
the model won't be looked up in the component parents.
Edgar Merino
On
sounds good !
François Meillet
Formation Wicket - Développement Wicket
Le 25 oct. 2013 à 20:13, Edgar Merino donvo...@gmail.com a écrit :
Thank you Francois, but as I mentioned in an earlier post overriding
FileUploadField#initModel() to return null did the trick and seems a bit