You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by meduolis <me...@gmail.com> on 2012/07/14 09:58:53 UTC

Generic for FileUploadField model

Hello, how to properly set generic for FilUploadField model?

I try like this, but it does not compile:


I get error message


:), help, please

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generic-for-FileUploadField-model-tp4650519.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Generic for FileUploadField model

Posted by meduolis <me...@gmail.com>.
Iam, thanks for trying to help, but my form have CompoundPropertyModel too,
but I don't want to use it for my FileUploadField, so I create new model for
this. Everything works fine, just I can not put generics correctly.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generic-for-FileUploadField-model-tp4650519p4650554.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Generic for FileUploadField model

Posted by Ian Marshall <Ia...@GMail.com>.
To explain better....

My form has the component

  FileUploadField fufUploadImage = new FileUploadField("fufUploadImage");
  frmForm.add(fufUploadImage);

The form's model is a compound property model, constructed using a
LoadableDetachableModel<MyModel>.

MyModel includes the data member

  public transient List<FileUpload> fufUploadImage = null;

I hope that this helps. Also, do visit

 
http://apache-wicket.1842946.n4.nabble.com/Converter-for-FileUpload-tp3881522p3882908.html

where Martin G helped me out on an allied issue.



For my FileUploadField field in a form, I use the model type

  List<org.apache.wicket.markup.html.form.upload.FileUpload>.


meduolis wrote
> 
> Wicket version: 1.5.3
> Java version: 1.7.0_02
> 
> Hello, how to properly set generic for FilUploadField model?
> 
> I try like this, but it does not compile:
> 
> 
> I get error message
> 
> 
> If I make it ArrayList:
> 
> 
> Then it says:
> 
> 
> I'm really confused :)
> 
> help, please


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generic-for-FileUploadField-model-tp4650519p4650546.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Generic for FileUploadField model

Posted by Ian Marshall <Ia...@GMail.com>.
For my FileUploadField field in a form, I use the model type

  List<org.apache.wicket.markup.html.form.upload.FileUpload>.


meduolis wrote
> 
> Wicket version: 1.5.3
> Java version: 1.7.0_02
> 
> Hello, how to properly set generic for FilUploadField model?
> 
> I try like this, but it does not compile:
> 
> 
> I get error message
> 
> 
> If I make it ArrayList:
> 
> 
> Then it says:
> 
> 
> I'm really confused :)
> 
> help, please
> 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generic-for-FileUploadField-model-tp4650519p4650545.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org