Author: estherbin
Date: 2008-06-19 10:19:31 -0400 (Thu, 19 Jun 2008)
New Revision: 8851
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
Log:
Fix bug
http://jira.jboss.com/jira/browse/JBIDE-2366
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2008-06-19
13:29:07 UTC (rev 8850)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2008-06-19
14:19:31 UTC (rev 8851)
@@ -119,9 +119,16 @@
height = PERCENT_100;
}
// added by estherbin fix not worked junit JBIDE1713Test
- final Integer iHeight = ComponentUtil.parseWidthHeightValue(height);
-
- return "height: " + String.valueOf(iHeight) + ComponentUtil.PX_SUFFIX +
SEMI_COLON; //$NON-NLS-1$
+ Integer iHeight = null;
+ //Added by estherbin
+ //fix
http://jira.jboss.com/jira/browse/JBIDE-2366
+ try {
+ iHeight = ComponentUtil.parseWidthHeightValue(height);
+ } catch (NumberFormatException e) {
+ height = PERCENT_100;
+ }
+
+ return "height: " + getValue(height, iHeight); //$NON-NLS-1$
}
/**
@@ -135,11 +142,30 @@
width = PERCENT_100;
}
// added by estherbin fix not worked junit JBIDE1713Test
- final Integer iWidth = ComponentUtil.parseWidthHeightValue(width);
+ Integer iWidth = null;
- return "width: " + String.valueOf(iWidth) + ComponentUtil.PX_SUFFIX +
SEMI_COLON; //$NON-NLS-1$
+ //Added by estherbin
+ //http://jira.jboss.com/jira/browse/JBIDE-2366
+ try {
+ iWidth = ComponentUtil.parseWidthHeightValue(width);
+ } catch (NumberFormatException e) {
+ width = PERCENT_100;
+ }
+
+ return "width: " + getValue(width,iWidth); //$NON-NLS-1$
}
+ private String getValue(String width, Integer iWidth) {
+ String rst = "";
+
+ if (width.equals(PERCENT_100)) {
+ rst = width + SEMI_COLON;
+ } else {
+ rst = String.valueOf(iWidth) + ComponentUtil.PX_SUFFIX + SEMI_COLON;
+ }
+ return rst;
+ }
+
/**
*
*/