Hi, I’m developing a mobile app using TouchKit that allows the user to take pictures with his mobile, but I can’t make it work. Firstly, when I include the GWT Image Upload addon to WEB-INF/lib folder and then I try to use the ImageUpload component I get this message in line 9:
“The type org.vectomatic.file.FileUploadExt cannot be resolved. It is indirectly referenced from required .class files”.
[code]
final ImageUpload fileUpload = new ImageUpload();
fileUpload.setCapture(true);
// Normalize the orientation and make size suitable for
// sending to server
EXIFOrientationNormalizer normalizer = new EXIFOrientationNormalizer();
normalizer.setMaxWidth(1024);
normalizer.setMaxHeight(1024);
fileUpload.addImageManipulator(normalizer);
fileUpload.addImageLoadedHandler(new ImageLoadedHandler() {
@Override
public void onImageLoaded(ImageLoadedEvent event) {
// Store the image data as encoded URL
setImage(event.getImageData().getDataURL());
}
});
// Reduce the size further for displaying a thumbnail
ImageTransformer thumbGenerator = new ImageTransformer();
thumbGenerator.setImageDataSource(fileUpload);
thumbGenerator.setMaxWidth(75);
thumbGenerator.setMaxHeight(75);
thumbGenerator.addImageLoadedHandler(new ImageLoadedHandler() {
@Override
public void onImageLoaded(ImageLoadedEvent event) {
// Store the thumbnail image data as encoded URL
// setThumbnail(event.getImageData().getDataURL());
}
});
Button image_Button = new Button();
image_Button.addClickListener(new ClickListener(){
@Override
public void buttonClick(ClickEvent event) {
// TODO Auto-generated method stub
fileUpload.click();
}
});
[/code]If I download the GWT-File libraries and add them to my lib the message dissapears but when I run the application I get the
“Widgetset does not contain implementation for ImageUpload…”
message.
Secondly, if I include the TouchKit addon and the GWT Image upload addon in the ivy.xml file and not in the WEB-INF/lib folder I get a different error when I run the application:
"
com.vaadin.server.ServiceException: java.lang.NoClassDefFoundError: com/google/gwt/user/client/ui/HasName"
Does anybody know what’s going on here? Any help will be appreciated,
Thanks in advance,
Matías