title: Vaadin 7 and applet
body: <p>0.7 and I want to Call an Applet for use a Token.</p>
  
  <p>I did various tests:
  1) Use of AppletIntegration 1.2.9 but when I call applet there's an Exception "ClassNotFoundException PaintTarget"
  2) Download Legacy 1.2.10 by <a href="https://github.com/Haulmont/AppletIntegration/releases" rel="nofollow">https://github.com/Haulmont/AppletIntegration/releases</a> but when I cal the page I have the Exception ""Widgetset does not contain implementation for org.vaadin.applet.AppletIntegration. Check its @ClientWidget 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. Unrendered UIDL:</p>
  
  <p>org.vaadin.applet.AppletIntegration(NO CLIENT IMPLEMENTATION FOUND)" 
  3) I create a class AppletCustom</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>public class AppletCustom extends CustomComponent {
      public AppletCustom(String codebase, 
              String archive, 
              String code,
              String width, 
              String height,
              Map&lt;String, String&gt; params) {
          setCompositionRoot(new Label("&lt;div id='appletDiv'&gt;&lt;/div&gt;", ContentMode.HTML));
          StringBuilder sb = new StringBuilder();
                  /* create the applet */
          sb.append("var obj = document.createElement('object');");
          sb.append("obj.setAttribute('type','application/x-java-applet');");
          sb.append("obj.setAttribute('width','" + width + "');");
          sb.append("obj.setAttribute('height','" + height + "');");        
          
          sb.append("var codeParam = document.createElement('param');");
          sb.append("codeParam.setAttribute('name', 'code');");
          sb.append("codeParam.setAttribute('value', '" + code + "');");
          sb.append("obj.appendChild(codeParam);");        
          
          sb.append("var archiveParam = document.createElement('param');");
          sb.append("archiveParam.setAttribute('name', 'archive');");
          sb.append("archiveParam.setAttribute('value','" + archive + "');");
          sb.append("obj.appendChild(archiveParam);");
           
          sb.append("var param = document.createElement('param');");
          sb.append("param.setAttribute('name', 'codebase');");
          sb.append("param.setAttribute('value','" + codebase + "');");
          sb.append("obj.appendChild(param);");
          
          /* add params to the applet if you like */
          if(params != null &amp;&amp; !params.isEmpty()){
              Iterator&lt;Entry&lt;String, String&gt;&gt; it = 
                      params.entrySet().iterator();
              while (it.hasNext()) {
                  Map.Entry&lt;String, String&gt; pairs = (Map.Entry&lt;String, String&gt;) it.next();
                  sb.append("param = document.createElement('param');");
                  sb.append("param.setAttribute('name', '" + pairs.getKey() + "');");
                  sb.append("param.setAttribute('value','" + pairs.getValue() + "');");
                  sb.append("obj.appendChild(param);");
              }
          }        
          sb.append("document.getElementById('appletDiv').appendChild(obj);");
          JavaScript.getCurrent().execute(sb.toString());
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>and i Call it in the page. The applet is seen correctly but i must to return a value using the method</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>vaadinUpdateVariable("docName", docName + SIGNED_FILE_SUFFIX, true);</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can i resolve my problem?</p>