The touchkit 1.0 handler does not display items properly on iphone 4 screens with the latest version of Vaadin. The handler needs to be rewritten like this (I have added the “request” parameter is the “super” call):
package com.example.testvaadin;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedWriter;
import java.io.IOException;
import com.vaadin.terminal.gwt.server.ApplicationServlet;
public class com.vaadin.touchkit.mobileapplication.MobileApplicationServletV2 extends ApplicationServlet {
private static final long serialVersionUID = 1337L;
/**
* Overrides the default ApplicationServlet to add some iPhone-specific
* meta-tags to the HTML header.
*/
@Override
protected void writeAjaxPageHtmlHeader(final BufferedWriter page, String theme, String uri, final HttpServletRequest request) throws IOException {
super.writeAjaxPageHtmlHeader(page, theme, uri, request);
page.append("<meta name=\"viewport\" content="
+ "\"user-scalable=no, width=device-width, "
+ "initial-scale=1.0, maximum-scale=1.0;\" />");
page.append("<meta name=\"apple-touch-fullscreen\" content=\"yes\" />");
page.append("<meta name=\"apple-mobile-web-app-capable\" "
+ "content=\"yes\" />");
page.append("<meta name=\"apple-mobile-web-app-status-bar-style\" "
+ "content=\"black\" />");
page.append("<link rel=\"apple-touch-icon\" "
+ "href=\"TouchKit/VAADIN/themes/touch/img/icon.png\" />");
page.append("<link rel=\"apple-touch-startup-image\" "
+ "href=\"TouchKit/VAADIN/themes/touch/img/startup.png\" />");
}
}