You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2007/11/28 16:41:45 UTC
svn commit: r599031 - in /myfaces/tobago/trunk:
core/src/main/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKey.java
theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
Author: weber
Date: Wed Nov 28 07:41:44 2007
New Revision: 599031
URL: http://svn.apache.org/viewvc?rev=599031&view=rev
Log:
(TOBAGO-558) StringIndexOutOfBoundsException in MenuBarRenderer
<http://issues.apache.org/jira/browse/TOBAGO-558>
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKey.java
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKey.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKey.java?rev=599031&r1=599030&r2=599031&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKey.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKey.java Wed Nov 28 07:41:44 2007
@@ -80,6 +80,12 @@
}
}
+ public void reset() {
+ text = null;
+ accessKey = null;
+ pos = -1;
+ }
+
public String getText() {
return text;
}
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java?rev=599031&r1=599030&r2=599031&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java Wed Nov 28 07:41:44 2007
@@ -425,10 +425,9 @@
String onClickPostfix = onclick != null ? "') ; " + onclick : "";
for (SelectItem item : items) {
final String labelText = item.getLabel();
- label.setAccessKey(null);
+ label.reset();
if (labelText != null) {
if (labelText.indexOf(LabelWithAccessKey.INDICATOR) > -1) {
- label.setText(null);
label.setup(labelText);
} else {
label.setText(labelText);