You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/06/30 13:11:04 UTC
svn commit: r418237 -
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
Author: weber
Date: Fri Jun 30 04:11:04 2006
New Revision: 418237
URL: http://svn.apache.org/viewvc?rev=418237&view=rev
Log:
fix for TOBAGO-87 (NPE when decoding PageState without state value in request)
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java?rev=418237&r1=418236&r2=418237&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java Fri Jun 30 04:11:04 2006
@@ -223,11 +223,13 @@
+ SUBCOMPONENT_SEP + "form-clientDimension";
value = (String) facesContext.getExternalContext()
.getRequestParameterMap().get(name);
- StringTokenizer tokenizer = new StringTokenizer(value, ";");
- int width = Integer.parseInt(tokenizer.nextToken());
- int height = Integer.parseInt(tokenizer.nextToken());
- pageState.setClientWidth(width);
- pageState.setClientHeight(height);
+ if (value != null) {
+ StringTokenizer tokenizer = new StringTokenizer(value, ";");
+ int width = Integer.parseInt(tokenizer.nextToken());
+ int height = Integer.parseInt(tokenizer.nextToken());
+ pageState.setClientWidth(width);
+ pageState.setClientHeight(height);
+ }
} catch (Exception e) {
LOG.error("Error in decoding state: value='" + value + "'", e);
}