[richfaces-svn-commits] JBoss Rich Faces SVN: r5738 - in trunk/sandbox/ui/progressBAR/src/main: resources/org/richfaces/renderkit/html/js and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Jan 30 10:28:10 EST 2008


Author: andrei_exadel
Date: 2008-01-30 10:28:09 -0500 (Wed, 30 Jan 2008)
New Revision: 5738

Modified:
   trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
   trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
Log:
fix error in case of absence of children components

Modified: trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java	2008-01-30 15:07:51 UTC (rev 5737)
+++ trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java	2008-01-30 15:28:09 UTC (rev 5738)
@@ -138,8 +138,10 @@
 	    AbstractProgressBarRenderer renderer) {
 	JSLiteral literal = null;
 	try {
-	    literal = new JSLiteral(renderer.getMarkup(context, this)
-		    .toString());
+	    StringBuffer markup = renderer.getMarkup(context, this);
+	    if (markup != null) {
+		literal = new JSLiteral(markup.toString());
+	    }
 	} catch (Exception e) {
 
 	}

Modified: trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js	2008-01-30 15:07:51 UTC (rev 5737)
+++ trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js	2008-01-30 15:28:09 UTC (rev 5738)
@@ -93,6 +93,9 @@
 		return context;
 	},
 	renderLabel: function (markup, context) {
+		if (!markup) {
+			return;
+		}
 		if (!context) {
 			context = this.getContext();
 		}




More information about the richfaces-svn-commits mailing list