NOTE: This is outdated information that applies only to Tapestry 4.


<form jwcid="appletForm@Form">
    <applet name="myApplet" code="Applet.class" archive="somejar.jar" width="310" height="335">      
      <span jwcid="@Insert" value="ognl:getAppletParameters()" raw="true"/>
    <input type="submit" jwcid="@Submit" listener="" value="Save" onClick="return getAppletValues()"/>    
    <input jwcid="someData@Hidden" value="ognl:someData"/>  

<script type="text/javascript">
function getAppletValues() {
   document.appletForm.someData.value = document.myApplet.getSomeData();
   return true;

The applet class:

 public String getSomeData() { return s; }
 public void setSomeData(String s) { this.s = s; }

The page java class:

 * Get the applet parameters.
 * @return Applet parameters
 public String getAppletParameters() {
   return "<param name=\"someData\" value=\"" + getSomeData() + "\">";

 public abstract String getSomeData();
 public abstract void setSomeData(String s);

TapestryAndApplets (last edited 2011-01-02 21:11:01 by BobHarner)