Author: pyaschenko
Date: 2008-03-26 07:43:55 -0400 (Wed, 26 Mar 2008)
New Revision: 7242
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-2551
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java
===================================================================
---
trunk/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java 2008-03-26
10:59:00 UTC (rev 7241)
+++
trunk/framework/impl/src/main/java/org/richfaces/renderkit/MacroDefinitionJSContentHandler.java 2008-03-26
11:43:55 UTC (rev 7242)
@@ -7,6 +7,7 @@
import java.io.IOException;
import java.io.StringReader;
import java.io.Writer;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -75,9 +76,16 @@
protected List<?> parseExpressiion(String expressionString) throws SAXException {
try {
- List<?> result = new RichMacroDefinition(new
StringReader(expressionString)).expression();
+ if (expressionString.length() != 0) {
+ List<?> result = new RichMacroDefinition(new
StringReader(expressionString)).expression();
- return result;
+ return result;
+ } else {
+ List<Object> list = new ArrayList<Object>(1);
+ list.add("");
+
+ return list;
+ }
} catch (Exception e) {
throw new SAXException(e.getMessage(), e);
}
@@ -86,9 +94,9 @@
private void encodeExpressionString(String string) throws IOException,
SAXException {
- if (string.length() == 0) {
+ /*if (string.length() == 0) {
this.outputWriter.write("\'\'");
- }
+ }*/
List<?> parsedExpressiion = parseExpressiion(string);
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
---
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-03-26
10:59:00 UTC (rev 7241)
+++
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-03-26
11:43:55 UTC (rev 7242)
@@ -124,7 +124,7 @@
if (!window.opera)
{
var parentOffset = element.getOffsetParent().viewportOffset();
- ox -= parentOffset[0];
+ ox -= parentOffset[0];
oy -= parentOffset[1];
} else if (element.offsetParent)
{