VaadinTouchKit: Some problems with compiled vi

Hello,
we are currently evaluating VaadinTouchKit for our application and did some codes. Most of the thinks are working fine and we are very impressed about this addon it looks really like a native ios app. However we have some problems, I hope someone can help us.

We have a vaadin6 application with multiple vaadin applications in it (backend, frontend, api). Now we tried to create in this application one more application with the vaadin Touchit. We created manually the ApplicationClass extending TouchKitApplication, adding a new entry to the web.xml class and created a new theme for this application called mobiletheme.

Now we are facing the following problems:

  1. We set the theme in the touckit application class but however if I want to add an icon to a button the application tries to search the icon in the I thin baseTheme and not in the created theme.
  2. Bigger problem:
    When we compile the widget and load the mobileend of the application everything is fine, but when we try to load the “old” application we first get an error message about a wrong gwt user.agent but after pressing ok the application loads normally. But the widget elements (Buttons, Tables, etc.) does look quit strange. I think there is a mixup of touchkit elements and “normal” elments, e.g. the touchkit loading indicator ist displayed instead the default vaadin loading indicator

When I remove the touckit jar recompile the vaadin widget the “old” application is fine again.

I hope someone can give me an advice how to solve these two problems.

Web.xml:


<!-- Touchend -->
	<servlet>
		<servlet-name>CAdminTouchend</servlet-name>
		<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
		<init-param>
			<description>
			Vaadin application class to start</description>
			<param-name>application</param-name>
			<param-value>at.nettania.dev.clubadminportal.vi.touchend.TouchendApplication</param-value>
		</init-param>
		<init-param>
			<description>
			Application widgetset</description>
			<param-name>widgetset</param-name>
			<param-value>at.nettania.dev.xportal.widgetset.ClubadminportalWidgetset</param-value>
		</init-param>
	</servlet>
	<!-- Mobileend -->
	<servlet>
    <servlet-name>CAdminMobileend</servlet-name>
    <servlet-class>com.vaadin.addon.touchkit.server.TouchKitApplicationServlet</servlet-class>
    <init-param>
        <description>Vaadin application class to start</description>
        <param-name>application</param-name>
        <param-value>at.nettania.dev.clubadminportal.vi.mobileend.MobileendApplication</param-value>
    </init-param>
    <init-param>
        <description>Application widgetset</description>
        <param-name>widgetset</param-name>
        <param-value>at.nettania.dev.xportal.widgetset.ClubadminportalWidgetset</param-value>
    </init-param>
	</servlet>

Touchkit application class:


@Override
	public void init() {
		// TODO Auto-generated method stub
		
		mainWindow = new TouchKitWindow();
		mainWindow.setWebAppCapable(true);
	    mainWindow.setPersistentSessionCookie(false);
	    
	    setMainWindow(mainWindow);
	    setTheme("mobiletheme");
	    // Set a nice default for user for demo purposes
	 	setUser("Test");
	}

Thnak you for your help,
Florian

Hi,

Try using TouchKit’s own servlet instead:
com.vaadin.addon.touchkit.server.TouchKitApplicationServlet

Vornitologist (the online version is still Vaadin 6 based) example app might help you to get started with basic setup:
http://demo.vaadin.com/vornitologist/

Also note, that you should use webkit based browser when developing touchkit apps. Currently the touchkits base theme and some of the components don’t support others but webkit.

cheers,
matti

Thank you for your help.
But I am using the com.vaadin.addon.touchkit.server.TouchKitApplicationServlet as you can see it in the web.xml file. I used this tutorial “vornitologist” to create my first steps with the touchkit and I watch the results in the Safari browser or on my iPhone. But the mobile application is only one part of a complete vaadin based application and must coexists to the normal not touchkit part.

Therefore I do not understand why the touckit application does not use the right theme meanwhile I have set the theme in the application class. Should I probably add the theme to the TouchKitWindow instead of the TouchKitApplication servlet?
And how can I resolve that the “normal” not touchkit based application does not use widget elements (e.g. buttons, tables) from the touckit.

Florian