Handling cached form variables for WML devices

You can use an XDIME refresh tag to clear WML variables.

WML variables are global to the browser, which causes form values to be cached by the WML client. After the value for an input field in a form on a WML client has been set, displaying the field in a card with a new value will have no effect. The client will continue to display the cached value even after the portlet specifies a new value.

To remove this memory effect in Mobile Portal Accelerator, use the <refresh> tag for WML clients to specifically clear the value of each form variable each time the JSP is loaded. The following code snippet is an example of clearing form variables with the <refresh> tag:
<%-- Clear out the device variables for WML fields. --%>
<nativemarkup targetLocation="wml.card.onevent">
  <onevent type="onenterforward">
    <refresh>
      <setvar name="variable1" value=""/>
      <setvar name="variable2" value=""/>
      <setvar name="variable3" value="default value"/>
    </refresh>
  </onevent>
</nativemarkup>



Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.