Re: FileUploadField within RepeatingView

2010-04-27 Thread Giovanni Cuccu

Hi,
	please ignore my previous request. I'm investigating the issue and the 
cause seems related to a bug in my code. The bug is still here but this 
is another issue.

Regards,
Giovanni

Hi,
I'm trying to build a form with multiple file upload fields. Each 
upload field has a companion text field used for describing the file 
content.

I'm using a form with a RepeatingView:
here is a simple code snippet:
private FileUpload upload0;
private FileUpload upload1;


RepeatingView allegatiView = new RepeatingView(allegati);
add(allegatiView);
int i=0;
for(SegnalazioneAllegato segnalazioneAllegato: allegati) {
WebMarkupContainer allegatoContainer= new 
WebMarkupContainer(allegatiView.newChildId());

allegatiView.add(allegatoContainer);
allegatoContainer.add(new TextFieldString(descrizione,new 
PropertyModelString(segnalazioneAllegato,descrizioneAllegato)));
allegatoContainer.add(new FileUploadField(allegato,new 
PropertyModelFileUpload(this,upload+ i +)));

}
If I configure only one FileUploadField the fileupload succeds while if 
I use two FileUploadField instances I can't get the data because upload0 
and upload1 are both null.
I can't use MultiFileUploadField because each file must be submitted 
along with a description.

Is this a bug or am I missing something?
Is it possible to use multiple MultiFileUploadField instances witihin a 
form?

Thanks a lot,
Giovanni





--
Giovanni Cuccu
Responsabile area sviluppo - CUP 2000 Spa
Via del Borgo di S. Pietro, 90/c - 40126 Bologna
e-mail: giovanni.cuccu _at_ cup2000.it


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



FileUploadField within RepeatingView

2010-04-26 Thread Giovanni Cuccu

Hi,
	I'm trying to build a form with multiple file upload fields. Each 
upload field has a companion text field used for describing the file 
content.

I'm using a form with a RepeatingView:
here is a simple code snippet:
private FileUpload upload0;
private FileUpload upload1;


RepeatingView allegatiView = new RepeatingView(allegati);
add(allegatiView);
int i=0;
for(SegnalazioneAllegato segnalazioneAllegato: allegati) {
		WebMarkupContainer allegatoContainer= new 
WebMarkupContainer(allegatiView.newChildId());

allegatiView.add(allegatoContainer);
		allegatoContainer.add(new TextFieldString(descrizione,new 
PropertyModelString(segnalazioneAllegato,descrizioneAllegato)));
allegatoContainer.add(new FileUploadField(allegato,new 
PropertyModelFileUpload(this,upload+ i +)));

}
If I configure only one FileUploadField the fileupload succeds while if 
I use two FileUploadField instances I can't get the data because upload0 
and upload1 are both null.
I can't use MultiFileUploadField because each file must be submitted 
along with a description.

Is this a bug or am I missing something?
Is it possible to use multiple MultiFileUploadField instances witihin a 
form?

Thanks a lot,
Giovanni


--
Giovanni Cuccu
Responsabile area sviluppo - CUP 2000 Spa
Via del Borgo di S. Pietro, 90/c - 40126 Bologna
e-mail: giovanni.cuccu _at_ cup2000.it


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