Bugs item #1179926, was opened at 2005-04-09 21:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1179926&group_id=119783
Category: core
Group: 1.0.0-rc1
Status: Open
Resolution: None
Priority: 5
Submitted By: Jan Mikkelsen (xjmix)
Assigned to: Nobody/Anonymous (nobody)
Summary: NPE using UploadForm
Initial Comment:
I have an UploadForm with a FileUpload component and
some other components, like Textfields. The problem is
that when I submit the form, I get a
nullpointerexception in MultipartWebRequest, here:
public String[] getParameters(final String key)
{
return getParameter(key).split(",");
}
There is a NPE because the value in parameters for
key="5.border.detailForm.fileInput" is null.
I can see that the values for the remaining
keys/components are ok.
This is how I define the form (model is a
CompoundPropertyModel):
private final class DetailForm extends UploadForm {
public DetailForm(String name, IModel model,
FeedbackPanel feedback) {
super(name, model, feedback);
TextField commentField = new
RequiredTextField("comment");
commentField.add(LengthValidator.max(30));
add(commentField);
TextField redirectUrlField = new
RequiredTextField("redirectUrl");
redirectUrlField.add(LengthValidator.max(300));
add(redirectUrlField);
List imageTypes = ImageType.getAll();
DropDownChoice imageTypeChoice = new
DropDownChoice("imageTypeObj", imageTypes);
imageTypeChoice.add(RequiredValidator.getInstance());
add(imageTypeChoice);
TextField specialIdField = new
RequiredTextField("specialId");
specialIdField.add(LengthValidator.max(10));
add(specialIdField);
fileUploadField = new FileUploadField("fileInput");
fileUploadField.add(RequiredValidator.getInstance());
add(fileUploadField);
add(new Link("cancelButton") {
public void onClick() {
redirectToInterceptPage(getSearchPage());
}
});
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1179926&group_id=119783
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop