summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2007-03-06 13:01:24 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2007-03-06 13:01:24 +0000
commit74d4aa7ed1fadb0703951ebc9fa5a26faa89b85c (patch)
tree92576dc669c6c7e36e5be478478f5f9649da9a6f
parentb42aedde59ed1d3516a79ab3a5ead5268fa860fb (diff)
downloadvaadin-framework-74d4aa7ed1fadb0703951ebc9fa5a26faa89b85c.tar.gz
vaadin-framework-74d4aa7ed1fadb0703951ebc9fa5a26faa89b85c.zip
fixes #468
svn changeset:798/svn branch:trunk
-rw-r--r--WebContent/index.html6
-rw-r--r--src/com/itmill/toolkit/terminal/web/ApplicationServlet.java8
2 files changed, 8 insertions, 6 deletions
diff --git a/WebContent/index.html b/WebContent/index.html
index 8f9b648801..971990a86a 100644
--- a/WebContent/index.html
+++ b/WebContent/index.html
@@ -16,7 +16,7 @@
<div id="feature-browser">
<h3>Feature Browser</h3>
<div class="option">
- <span class="link"><a href="features/">Autodetected mode</a></span>
+ <span class="link"><a href="features/?renderingMode=detect">Autodetected mode</a></span>
<span class="desc">Use AJAX if supported by browser, otherwise fallback to HTML mode</span>
</div>
@@ -38,7 +38,7 @@
<h4>Hello World</h4>
<div class="option">
- <span class="link"><a href="hello/">Autodetected mode</a></span>
+ <span class="link"><a href="hello/?renderingMode=detect">Autodetected mode</a></span>
<span class="desc">Use AJAX if supported by browser, otherwise fallback to HTML mode</span>
</div>
@@ -50,7 +50,7 @@
<h4>Calculator</h4>
<div class="option">
- <span class="link"><a href="calc/">Autodetected mode</a></span>
+ <span class="link"><a href="calc/?renderingMode=detect">Autodetected mode</a></span>
<span class="desc">Use AJAX if supported by browser, otherwise fallback to HTMLmode</span>
</div>
diff --git a/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
index abf99f5cca..f8413a0fdd 100644
--- a/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
+++ b/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
@@ -563,10 +563,12 @@ public class ApplicationServlet extends HttpServlet implements
WebBrowserProbe
.handleProbeRequest(request, unhandledParameters);
- // If rendering mode is not defined try to detect it
+ // If rendering mode is not defined or detecting requested
+ // try to detect it
WebBrowser wb = WebBrowserProbe.getTerminalType(request
.getSession());
- if (wb.getRenderingMode() == WebBrowser.RENDERING_MODE_UNDEFINED) {
+ if (unhandledParameters.get("renderingMode").equals("detect")
+ || wb.getRenderingMode() == WebBrowser.RENDERING_MODE_UNDEFINED) {
String themeName = application.getTheme();
if (themeName == null)
themeName = DEFAULT_THEME;
@@ -589,7 +591,7 @@ public class ApplicationServlet extends HttpServlet implements
.get("renderingMode"))[0];
if (renderingMode.equals("html")) {
wb.setRenderingMode(WebBrowser.RENDERING_MODE_HTML);
- } else {
+ } else if(renderingMode.equals("ajax")){
wb.setRenderingMode(WebBrowser.RENDERING_MODE_AJAX);
}
}