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();
}
Show replies by date