diff -r 4d198a32ac7d -r d4809db37847 plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB.html Thu Aug 19 17:48:04 2010 -0700 @@ -0,0 +1,51 @@ + + +performTransition()

performTransition()

+

Description:

+

The performTransition method operates as a screen update command, which tells the widget UI framework to update the widget screen. It performs the animation while the widget's view is being changed. Currently, only fading animation mode is supported.

+

The performTransition method is to be called together with the prepareForTransition method.

+

Syntax:

+
[void] widget.performTransition(void) 
+

or

+
[void] window.widget.performTransition(void)
+

Arguments:

+

This method does not take any arguments.

+

Return value:

+

This method does not return a value.

+

Example code:

+

Example HTML code:

+
<!-- Main view -->
+<div id='main'>
+  Hello World!
+  <input type="button" value="Config" onclick="toMain(0);" />
+</div>
+<!-- Main view ends -->
+<!-- Config view -->
+<div id='config'>
+  Your world is my world!
+  <input type="button" value="Main" onclick="toMain(1);" />
+</div>
+<!-- Settings view ends -->
+

Example JavaScript code:

+
function toMain(main) {
+  // preparing for Transition
+  widget.prepareForTransition("fade");
+  if (main) { // switching from config view to the main view
+    // hide config view
+    document.getElementById("config").style.display = 'none';
+    // show main view
+    document.getElementById("main").style.display = 'block';
+    }
+  else {  // switching from main view to config view
+    // hide main view
+    document.getElementById("main").style.display = 'none';
+    // show config view
+    document.getElementById("config").style.display = 'block';
+    }
+  // do the Transition to make the fade effect
+  widget.performTransition();
+}
+
\ No newline at end of file