applet integration

Hello I would like to integrate an applet into Vaadin. For Vaadin 6. * there was AppletIntegration but it does not seem to be supported for Vaadin 7. * According to the website. I saw the component embedded but it does not work with java applets and in debug mode returns “Unknown Embedded mimetype 'application / x-java-archive”.

Do you have a solution?

Hi to all

I am also trying to embed an applet to vaadin 7 application but it seems there is not any example or guidance about it. The vaadin 7 book says it is possible with Embedded object but it is not giving any clue. Any help on this topic will be appreciated much.

Thanks in advance

Gökhan Gülgezen

Hi!
I’ve ported Applet Integration to Vaadin 7.1

See:

https://github.com/Haulmont/AppletIntegration


https://github.com/Haulmont/AppletIntegration/releases

Thank you very much for the reply Yuriy

I added appletintegration-1.2.10.jar to WEB-INF/lib folder and tried to add it as a component like this :

import org.vaadin.applet.AppletIntegration;
import com.vaadin.ui.VerticalLayout;

public class StokView extends VerticalLayout {

public StokView() {
    super();
    initUI();
}

private void initUI() {
    AppletIntegration applet = new AppletIntegration() {

        private static final long serialVersionUID = 1L;

        @Override
        public void attach() {
            setAppletArchives(Arrays.asList(new String[] { "Othello.jar" }));

            setCodebase("http://www.w3.org/People/mimasa/test/object/java/applets/");
            setAppletClass("Othello.class");
            setWidth("800px");
            setHeight("500px");

        }
    };
    addComponent(applet);
}

}
After this I compiled the widgetset and it didnt give any error.
when I open this page it says :

Widgetset does not contain implementation for org.vaadin.applet.AppletIntegration. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.

Do you have any idea what could be the problem? Did I do something wrong or do I have something missing?
Thanks in advance

Gökhan Gülgezen

by the way the MasterwebWidgetset.gwt.xml file which is formed is this :

<?xml version="1.0" encoding="UTF-8"?>
<!--
 Uncomment the following to compile the widgetset for one browser only.
  
 Multiple browsers can be specified as a comma separated list. The
 supported user agents at the moment of writing were:
 ie8,ie9,gecko1_8,safari,opera
 
 The value gecko1_8 is used for Firefox and safari is used for webkit
 based browsers including Google Chrome.
-->
<!-- <set-property name="user.agent" value="safari"/> -->

<!--
 To enable SuperDevMode, uncomment this line.
 
 See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more
 information and instructions.
-->
<!-- <set-configuration-property name="devModeRedirectEnabled" value="true" /> -->


<inherits name="org.vaadin.applet.AppletintegrationWidgetset" />

Did you use strict compilation of widgetset? Warnings may be inconspicuous in a build log.

I just found the solution. I should have defined the base widgetset.gwt.xml in web.xml but because of the fact that I havent one, I added this above my VaadinServlet class with annotation

@VaadinServletConfiguration(productionMode = false, ui = MasterWebUI.class, widgetset = “com.gezen.masterweb.widgetset.MasterwebWidgetset”)

After this, I could manage to see the applet in my web page. Still thanks for the guidance.

Sincerely

Gökhan

hi

I have a question about the usage ıf the add-on. I want to send a variable to a server via applet and at server side I need to understand that a variable is sent and do extra work with it. Do you have an idea how I can accompolished this? I found a methos called vaadinUpdateVariable() but I dont know how to use it?

Thanks in advance

Gökhan