Author: Alex.Kolonitsky
Date: 2009-12-11 13:58:28 -0500 (Fri, 11 Dec 2009)
New Revision: 16113
Modified:
branches/community/3.3.X/samples/calendar-sample/src/main/webapp/pages/RF-8071.jsp
branches/community/3.3.X/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
https://jira.jboss.org/jira/browse/RF-8164
test-jsp: Calendar - String index out of range: 0
Modified:
branches/community/3.3.X/samples/calendar-sample/src/main/webapp/pages/RF-8071.jsp
===================================================================
---
branches/community/3.3.X/samples/calendar-sample/src/main/webapp/pages/RF-8071.jsp 2009-12-11
10:49:49 UTC (rev 16112)
+++
branches/community/3.3.X/samples/calendar-sample/src/main/webapp/pages/RF-8071.jsp 2009-12-11
18:58:28 UTC (rev 16113)
@@ -14,7 +14,8 @@
showFooter="false"
required="true"
requiredMessage="msg.error_validFromNotEmpty"
- enableManualInput="true" />
+ enableManualInput="true"
+ buttonIcon=""/>
</h:form>
</f:view>
</body>
Modified:
branches/community/3.3.X/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
---
branches/community/3.3.X/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2009-12-11
10:49:49 UTC (rev 16112)
+++
branches/community/3.3.X/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2009-12-11
18:58:28 UTC (rev 16113)
@@ -85,8 +85,12 @@
</input>
<jsp:scriptlet>
<![CDATA[
- String buttonIcon = org.richfaces.component.util.ViewUtil.getResourceURL((String)
component.getAttributes().get("buttonIcon"),context);
- String buttonIconDisabled =
org.richfaces.component.util.ViewUtil.getResourceURL((String)
component.getAttributes().get("buttonIconDisabled"),context);
+ String buttonIconAttr = (String)
component.getAttributes().get("buttonIcon");
+ String buttonIcon = buttonIconAttr == null || buttonIconAttr.length() < 1 ? null :
+ org.richfaces.component.util.ViewUtil.getResourceURL(buttonIconAttr,
context);
+ String buttonIconDisabledAttr =(String)
component.getAttributes().get("buttonIconDisabled");
+ String buttonIconDisabled = buttonIconDisabledAttr == null ||
buttonIconDisabledAttr.length() < 1 ? null :
+
org.richfaces.component.util.ViewUtil.getResourceURL(buttonIconDisabledAttr, context);
String buttonLabel = (String) component.getAttributes().get("buttonLabel");
variables.setVariable("buttonLabel",buttonLabel);
variables.setVariable("buttonIconDisabled",buttonIconDisabled);