tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-tapestry Wiki] Update of "TapestryAndApplets" by gabrielh
Date Mon, 24 Oct 2005 20:00:14 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-tapestry Wiki" for change

The following page has been changed by gabrielh:

New page:
You want to set the hidden input (called document.appletForm.someData.value) with the applet
method result of document.myApplet.getSomeData().
You want to pass the data back to the applet using the <param> tag, hence the ognl:getAppletParameters()

<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="ognl:listeners.save" value="Save" onClick="return
    <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() + "\">";



To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org

View raw message