You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Foror <fo...@mail.ru> on 2008/01/10 17:00:13 UTC

PageTester and UploadedFile

As upload the file through the form when is used the PageTester?

This not worked:

Map<String, String> fieldValues = new HashMap<String, String>();

FileInputStream in = new FileInputStream(file);
byte[] data = new byte[(int) file.length()];
in.read(data);

fieldValues.put("avatar", new String(data));

PageTester tester = new PageTester(appPackage, appName, Filler.CONTEXT_PATH);
tester.submitForm(form, fieldValues);

>>>

public class MyPage {
       ...
       private UploadedFile avatar;
       ...
}



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